Commit Graph

13104 Commits

Author SHA1 Message Date
minggo a1ef303f47 Merge pull request #18294 from minggo/sync-v316
Sync v316
2017-09-21 11:07:20 +08:00
Thorbjørn Lindeijer 7350aeca8c TMX: Added support for reading the object.rotation attribute (#11540)
Introduced with Tiled 0.10, this attribute stores the rotation of an
object in degrees clockwise.

Closes bjorn/tiled#921
2017-09-20 14:31:15 +08:00
minggo b275a3e2f0 fix conflict 2017-09-20 09:11:35 +08:00
minggo 66471154b0 do not compile unneeded file (#18290) 2017-09-20 09:05:27 +08:00
mogemimi a5374d0411 Fix minor typos (#18289) 2017-09-20 09:05:00 +08:00
yycmmc edd81d3528 use error macro to replace constant value 1410L (#18264) 2017-09-19 10:05:46 +08:00
minggo bb21a206a9 update vertex buffer to update color (#18283) 2017-09-19 09:41:10 +08:00
minggo 99f5fbb63f Fix VAO in CameraBackgroundBrush (#18278) (#18279) 2017-09-18 15:47:50 +08:00
pyrosphere 80c9292969 Fix VAO in CameraBackgroundBrush (#18278) 2017-09-18 10:50:00 +08:00
minggo 36f7f3c37e Merge branch 'v3.16' of github.com:cocos2d/cocos2d-x into syn-v316 2017-09-13 11:18:39 +08:00
James Chen 2fbb6fe32a [ci skip][lua] Bug fix in xhr:getResponseHeader("xxx") and better coding particle. (#18252)
* [lua] Bug fix in xhr:getResponseHeader("xxx") and better coding particle.

* More const auto &.
2017-09-13 10:54:35 +08:00
pandamicro 1929265a7c [ci skip] Fix web engine issues for 3.16 QA (#18251)
* Fix web test case issue in UIListView

* imgLoader callback use texture instead of image

* Update web ref
2017-09-11 21:03:22 -05:00
James Chen 6318324f4d [android] Fixes Cocos2dxActivity is re-created which causes crash if launching app first time and re-opening from icon (#18247) 2017-09-12 09:38:54 +08:00
CocosRobot 46e70d3c71 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#18236) 2017-09-08 10:49:17 +08:00
James Chen ddb3c49eec Workaround for getting AL_STOPPTED state after alSourcePlay(sourceId). (#18228) 2017-09-08 09:29:39 +08:00
minggo ce1c207aee add LayerMultiplex::switch(int ,bool) (#18224) 2017-09-08 09:28:57 +08:00
CocosRobot 5d2c3f5d43 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#18234) 2017-09-08 09:28:16 +08:00
halx99 557a6c0bf4 Add sourcePosition compatible support. (#18230) 2017-09-07 17:16:46 +08:00
minggo aca7c86739 set default search path to the path the same as .exe file (#18226) 2017-09-07 11:22:00 +08:00
minggo e161b613a4 make jnihelper thread safe (#18189) 2017-09-06 15:07:01 +08:00
minggo c89e35e22a Merge pull request #18216 from cocos2d/v3.16
V3.16
2017-09-06 14:59:36 +08:00
James Chen 7a65363208 Changes JS version to 3.16. (#18210) 2017-09-06 09:10:14 +08:00
James Chen 1fed9ae33b [ci skip]fix android AudioEngine Crash (#18124) (#18209)
* *fix android AudioEngine Crash

switch to background when sound effect is about to end, it's maybe crashed when switch to foreground again

* use "emplace" instead of "insert"
2017-09-01 11:30:10 +08:00
zoxin 7cd828119d [ci skip]fix android AudioEngine Crash (#18124)
* *fix android AudioEngine Crash

switch to background when sound effect is about to end, it's maybe crashed when switch to foreground again

* use "emplace" instead of "insert"
2017-09-01 10:16:04 +08:00
Valera 03635ecc4a Improved Cocos2dxLuaLoader.cpp (#18171)
* Improved Cocos2dxLuaLoader.cpp

* Added testcase for new LuaLoader
2017-08-25 09:32:02 +08:00
jett_yu d11674fd9c [ci skip]implementation conversion lua table to ObjC Dictionary (#18134) 2017-08-24 14:17:21 +08:00
James Chen 1360c2860a Fixes compilation errors for android audio module while building with x86 arch. (#18150)
* Fixes compilation errors for android audio module while building with x86 arch.

* Update bitops.h
2017-08-22 15:13:08 +08:00
Dmitry 6e013b5a8a fixed GLViewImpl::getMonitorSize() for desktop platforms (#18141) 2017-08-22 14:06:53 +08:00
CocosRobot b274322961 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#18183) 2017-08-22 10:06:38 +08:00
newnon 9815ccba62 Fix android problem (#18142) 2017-08-22 09:52:28 +08:00
newnon 70ea1fc4d1 fix for ios audio engine (#18146) 2017-08-22 09:46:15 +08:00
newnon a8026b0136 fix android problem with 24 bit depth buffer on some devices (#18148) 2017-08-22 09:43:07 +08:00
newnon 04b2dbbcdb Blend function for UIImageView (#18149) 2017-08-22 09:40:37 +08:00
pyrosphere 0bebd83f6b Fix alpha blending during the animation of TransitionCrossFade. (#18175) 2017-08-22 09:33:37 +08:00
James Chen 8adf780a3c fixed #17989: touch stops responding on android devices. (#18165)
It's caused by `FileUtils::getContents` is invoked in different threads and we use EventDispatcher::dispatchCustomEvent in `FileUtilsAndroid::getContents` to send an event to EngineDataManager.
Since EngineDataManager class is only for internal use and EventDispatcher isn't thread-safe, we make `EngineDataManager::onBeforeReadFile` public and invoke it `FileUtilsAndroid::getContents`.
2017-08-21 23:28:59 +08:00
minggo a6a5426986 [ci skip]update version and readme (#18169) 2017-08-17 14:34:22 +08:00
newnon afbf26ea3c fix FontAtlas crash on some Android devices (#18145) 2017-08-17 00:06:01 +08:00
newnon 9f98e4cf83 less warnings (#18144) 2017-08-14 22:31:31 +08:00
Tyler Dauch a7d7aaa368 Update AudioCache.h (#18136) 2017-08-10 17:40:24 +08:00
CocosRobot 1fa0f3d237 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#18129) 2017-08-07 17:01:27 +08:00
minggo 5a3244511a use correct selector to fix crash (#18132) 2017-08-07 17:00:35 +08:00
Joel Besada efe95fd899 [ci skip]Add Chipmunk JS binding for segmentQuery (#18107) 2017-08-07 11:57:45 +08:00
ggggamer dc9abcc669 FontAtlas::prepareLetterDefinitions's memory leak. (#18114) 2017-08-07 11:13:56 +08:00
bulzipke b5d871d53c Hide virtual button by user control. (#18100)
* Hide virtual button by user control.
It want a lot of people, including me.

http://discuss.cocos2d-x.org/t/solved-android-navigation-bar/31760/3
http://discuss.cocos2d-x.org/t/android-cocos2d-v3-12-about-virtual-button/30811/5
http://joyplot.com/documents/2016/09/27/cocos2d-x-navigation-bar/
http://falstar.hateblo.jp/entry/2016/07/10/180112

* I also added the lua/js template.
Thank you for your work :)
2017-08-07 11:12:26 +08:00
minggo 4be6eb5325 correct usage of reference count of LabelAtlas (#18117) 2017-07-31 09:05:55 +08:00
minggo b9cd599657 fix crash because of error offset (#18108) 2017-07-28 09:09:41 +08:00
CocosRobot db79a5ea6f [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#18102) 2017-07-26 17:03:19 +08:00
kepler-5 12fc75790b Fix pageview iterator invalidation (#18091)
* allow setting and getting of pageview indicator opacity. fix some documentation comments

* don't draw the indicator the selected indicator is currently overlapping

* add a tweaked opacity to one of the test cases

* remove unused variable

* convert tabs to whitespace

* change constexpr to static const

* fix iterator invalidation when adding or removing pages from the pageview
2017-07-25 20:11:02 +08:00
minggo b77c29f750 make RichText supports img tag with Sprite Frame name (#18087) 2017-07-24 10:35:52 +08:00
Felippe Durán 681e9aa752 Fix polygon sprite bug of resetting flip and color information in setSpriteFrame. (#18085) 2017-07-19 11:08:12 +08:00
minggo cdac595a68 fix iOS deltatime (#18084)
* fix ios delta time when resumes from background

* remove debug codes
2017-07-18 14:01:53 +08:00
Felippe Durán 78818ca275 Fix AudioEngine thread concurrency crash between myAlSourceNotificationCallback and _play2d iterating over _audioPlayers. (#18083) 2017-07-18 11:12:20 +08:00
minggo a6773f408a fix crash if there are more than 10 touches (#18082) 2017-07-18 09:47:12 +08:00
CocosRobot 54586d06a4 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#18081) 2017-07-17 16:51:50 +08:00
kepler-5 d42d969b46 Allow customizing opacity of PageView indicator nodes (#18059)
* allow setting and getting of pageview indicator opacity. fix some documentation comments

* don't draw the indicator the selected indicator is currently overlapping

* add a tweaked opacity to one of the test cases

* remove unused variable

* convert tabs to whitespace

* change constexpr to static const
2017-07-17 15:55:43 +08:00
子龙山人 0b99ba35f2 Fix ui slice issue (#18065)
* add tests to reproduce sprite slice issue

* fix scale9sprite change texture losing slice info

* fix tilemap crash issue
2017-07-17 15:52:01 +08:00
minggo 7da188734d use VAO/VBO to improve performance (#18066) 2017-07-17 15:16:42 +08:00
Wilson E. Alvarez bdfb71b05b Moved GLFWEventHandler to its corresponding header (#18063) 2017-07-13 17:34:28 +08:00
Wilson E. Alvarez 717bd1c248 Fixed typo. Added comments about GLFW 3.3 controller support. (#18064) 2017-07-13 17:29:54 +08:00
minggo 78e2bf5f93 do not use custom EGLContextFactory (#18062)
it will crash on some devices
2017-07-13 17:21:25 +08:00
CocosRobot 17f2a12a28 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#18061) 2017-07-13 11:13:38 +08:00
kepler-5 876e4222a9 More useful events and getters in UIScrollView (#18054)
* add begin and end events to UIScrollView

* add new state to copySpecialProperties

* functions to find what percent scrolled in a scrollview we are
2017-07-13 10:35:29 +08:00
James Chen f4bf68610c fixed #18055: [android] urlConnection.getResponseCode may trigger exception which needs to be handled. (#18056) 2017-07-13 09:53:54 +08:00
minggo 2fbbdef58d do not initialize VBO with big size for performance issue on some Android devices (#18060) 2017-07-13 09:52:07 +08:00
CocosRobot 81d70adece [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#18052) 2017-07-12 09:50:15 +08:00
halx99 18f173e3e6 Fixed vsnprintf compatibility with vc12 and vc14 (#18040)
* Fixed vsnprintf compatibility with vc12 and vc14

see reference: https://github.com/halx99/cocos2d-x/pull/30

* Update CCConsole.cpp

* Add comment.
2017-07-10 10:30:49 +08:00
Wilson E. Alvarez 5dd81e758a Add controller support for Linux and Win32 (#17990)
* Add controller support for Linux and Win32

* Fix iOS and Mac linker issue

* Fixed documentation. Removed unnecessary whitespace.
2017-07-10 10:30:04 +08:00
Ole Herman Schumacher Elgesem 1c55ad104d Use cocos2d::Rect to avoid ambiguity (#18048)
Signed-off-by: Ole Herman Schumacher Elgesem <oleherman93@gmail.com>
2017-07-10 10:29:30 +08:00
minggo e7c69e253a fix invalid dt at start on iOS release mode (#18041) 2017-07-10 10:06:25 +08:00
Tiago Martines 74a6fd3293 Do not define VERY_VERY_VERBOSE_LOGGING by default. (#18036) 2017-07-06 14:57:02 +08:00
halx99 78e0cbfc5f Use CurrentDirectory as defaultSearchRoot on Win32 (#18017)
Default, CurrentDirectory equals to ExeDir, but it's more  flexible, and will not break compatible.
2017-07-06 10:24:18 +08:00
CocosRobot#Set 012e9982d8 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically 2017-07-05 01:32:25 +00:00
kepler-5 d3eb857482 horizontal alignment support in RichText (#18027)
* horizontal alignment support in RichText

* split lambda into separate function

* tweak shadow test's content size so horizontal aligment doesn't give the illusion of behaving incorrectly

* fix alignment when the last char of a line is whitespace

* fix errors from merge

* fix bug in setting of size of image elements. scaling was applied effectively twice.

* removed debugging code. whoops
2017-07-05 09:25:12 +08:00
kepler-5 c8fc2dc3ef arithmetic operators for Color4F (#18028)
* arithmetic operators for Color4F

* remove template functions
2017-07-05 09:05:03 +08:00
halx99 f2e9785132 Export cocos2d::utils::findChild to lua-bindings (#18013) 2017-07-04 14:37:44 +08:00
kepler-5 bbe84f8d7a Remove unnecessary dynamic allocation (#18014)
* don't dynamically allocate PointArray's internal vector. take advantage of move semantics where possible.

* don't dynamically allocate RichText's _elementRenders vectors
2017-07-04 14:31:29 +08:00
afpro fec74ac549 CCImage.cpp misuse CC_USE_PNG (#18015) 2017-07-04 14:17:17 +08:00
minggo 6d9bd1bf65 fix stats of seconds per frame on iOS (#18025) 2017-07-04 13:38:03 +08:00
CocosRobot e7a2708812 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#18021) 2017-07-03 15:21:55 +08:00
minggo 84ccbde845 Sequence issue (#18009)
* fix SequenceWithFinalInstant test issue

* fix the issue that sequence will not finish for ever
2017-07-03 09:15:53 +08:00
halx99 795538ad9f Fix sourcePosition bug for ParticleSystem. (#18002) 2017-06-30 09:20:43 +08:00
Wu Zheng 41ef696019 luaoc static function return type fix (#17956)
* update remote repo

* Revert "update remote repo"

This reverts commit c92200d0ac4203c32048ea902e92535dcb4d0935.

* returnType BOOL

* luaoc return type encode
2017-06-26 14:04:55 +08:00
Wilson E. Alvarez eb85f190bd Add CCGLProgramStateCache header to cocos2d.h (#17976) 2017-06-26 13:53:17 +08:00
Wilson E. Alvarez 90af809b89 No need to get the Configuration and Director instances more than once in CCRenderer.cpp (#17978) 2017-06-26 13:52:49 +08:00
minggo 3208120ff9 fix warnings (#17971) 2017-06-23 17:47:20 +08:00
minggo 61839e7a5b fix warnings (#17970) 2017-06-23 17:46:37 +08:00
minggo 4ce443bac2 use prebuilt version of bullet (#17950)
* use prebuilt bullet

* prebuilt bullet work ok on linux

* update search path

* update search path

* fix compiling issue for lua/jsb projects

* prebuilt bullet work on windows

* update 3rd party lib version

* add bullet search path

* fix script bindings issue

* fix scripting binding
2017-06-21 13:39:38 +08:00
Wilson E. Alvarez 61815f57c0 Fixed Director memory leak (#17952) 2017-06-21 09:45:53 +08:00
Wilson E. Alvarez 0f75d3ac5a Added missing header for NDK v15 (#17943) 2017-06-20 09:04:51 +08:00
James Chen 567fa5b0a7 fixed #17800: [iOS] Streaming audio (normally a background music) maybe cut and may not be looped. (#17947)
* fixed #17800: [iOS] Streaming audio (normally a background music) may be cut and may not be looped.

* Updates including.
2017-06-20 09:04:04 +08:00
Wilson E. Alvarez a23924c95b Use const reference where possible. Dropped unnecessary namespace specifier (#17941) 2017-06-20 09:03:35 +08:00
Y-way 7894c5c4a3 Setting new texture for Sprite will reset the program state that is changed (#17938)
In my project:
1.set default texture.
2.set mine shader program
3.set new texture.

then, the sprite will reset my shader program.
2017-06-20 09:02:58 +08:00
Y-way e6210874dd Processing Lua file(UTF8+BOM) that is encrypted will crash,when free the buffer pointer that is changed pointer address. (#17937) 2017-06-20 09:02:40 +08:00
minggo 3e912ffee3 add a macro to stip fps related data and functions (#17934) 2017-06-20 09:02:13 +08:00
CocosRobot 78d5a809c8 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#17933) 2017-06-20 09:01:57 +08:00
shintaro.tanikawa f9c8bd4bc1 Add padding options to ListView (#17587)
* Add options to ListView for setting padding

* Add 'setPadding' method test cases.
2017-06-15 14:56:54 +08:00
minggo f79a138c2b revert updating flatbuffers (#17930)
* revert updating flatbuffers

* update external version
2017-06-15 13:42:50 +08:00
minggo 48c44d6a1a remove "system" usage (#17921)
* remove "system" usage
"system" is removed in iOS 11

* android uses old method
2017-06-15 11:07:08 +08:00
James Chen 5620e30f32 fixed #17922: [android] AudioEngine may crash while audio's over and stop state is triggered at the same time. (#17923)
* fixed #17922: [android] AudioEngine may crash while audio's over and stop state is triggered at the same time.
The Pull Request #17748 didn't resolve the issue since _track->getPrevState will be wrong while in scheduler callback. We need to capture it in lambda.
My Pull Request also merges PR #17716 to make filePath captured by lambda.

* Adds missing log tag in AudioEngine-inl.cpp
2017-06-13 17:44:04 +08:00
minggo 5c9ac37f50 initialize callback functions (#17918) 2017-06-12 10:43:45 +08:00
minggo 2b3baf4517 fix precision issue (#17908)
* fix precision issue

* fix shader error on mac
2017-06-12 08:57:40 +08:00
CocosRobot 992ac34a2d [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#17913) 2017-06-09 09:54:03 +08:00
minggo f263a43336 Spawn issue (#17911)
* fix isDone() in spawn

* remove unneeded void keyword
2017-06-08 17:07:43 +08:00
James Chen 845e177885 Uses better configuration for huawei optimization and remove rapidjson dependence in EngineDataManager (#17909)
* Uses better configuration for huawei optimization (#17838)

* Uses better configuration for huawei optimization

* Updates jar file and uncomment fps controlling code

* Sync code from 2.x
2017-06-08 17:06:46 +08:00
CocosRobot 7230593be0 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#17910) 2017-06-08 17:06:05 +08:00
minggo 61386b0a40 fix the issue the sequence action will not be invoked (#17906)
* fix the issue the sequence action will not be invoked

* add comment

* update _done in update() function
2017-06-08 14:52:36 +08:00
Satoshi 84463dbab4 fix CCLabel line height is reset (#17902) (#17903) 2017-06-07 16:56:02 +08:00
CocosRobot 12db177f5c [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#17905) 2017-06-07 16:54:36 +08:00
Undume 72ad341d24 Webview opacity and background transparency (#17831)
* Added three new methods for UiWebView. SetOpacityWebView(float), getOpacityWebView(), setBackgroundTransparent() in IOS

* Implemented methods for UiWebView. SetOpacityWebView(float), getOpacityWebView(). They only work using android sdk +11.

* New methods not implemented for Tizen.

* Added new button for testing the opacity in the cocos2d-x test application.

* Added setBackgroundTransparent to android, and his UI-Test.

* Added setBackgroundTransparent to android, and his UI-Test.

* Added keyword const to the getters.

* Android sdk reflection. +11sdk for chaging the opacity.

* Reflection used for the webview.setLayerType, webview.setAlpha, webview.getAlpha

* Unified exceptions.
2017-06-07 16:12:32 +08:00
CocosRobot 421bd16cb7 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#17904) 2017-06-07 13:44:00 +08:00
minggo c7899de857 only create gles 2 context (#17901) 2017-06-07 13:34:07 +08:00
minggo 4ca29ac1cf Merge v3.15.1 (#17897)
* remove APP_SHORT_COMMANDS setting (#17722)

some developers report it will cause error on Windows though i can not reproduce it. It is strange, the setting is used to resolve command length limitation on Windows.

* Particle font size should be a const value (#17676)

* Particle font size should be a const value

* Minor fix: CCStencilStateManager.hpp -> CCStencilStateManager.h in xcode project.

* JSB SocketIO.connect supports to pass a CA cert file (#17736)

* JSB SocketIO.connect supports to pass a CA cert file

* The second parameter of SocketIO.connect function is probably a `option` object. JSB just ignores it.

* The optimization for huawei. (#17832)

* The optimization for huawei.

* setAnimationInterval fix for all platforms.

* disable debug

* include fix.

* Uses better configuration for huawei optimization (#17838)

* Uses better configuration for huawei optimization

* Updates jar file and uncomment fps controlling code

* [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#17840)

* update release not and version (#17845)

* [android] Removes an unused variable sRegistered in Cocos2dxActvity.java. (#17861)

* Updates jar to resolve warning while packaging APK file. (#17863)

* update release date (#17870)

* fix compiling error
2017-06-05 13:37:50 +08:00
minggo 8fcf0d7fd9 fix gradle setting (#17896) 2017-06-05 11:35:48 +08:00
Wilson E. Alvarez 41cafe836e Calling PhysicsWorld::setDebugDrawMask(false) will no longer crash when DebugDrawMask was already set to false (#17875) 2017-06-05 10:56:52 +08:00
Tyler Dauch 01714514fa Update CCNode.cpp (#17890) 2017-06-05 10:39:25 +08:00
saumyamukul 0a69031db3 [Windows]Fix edit box spacing and alignment (#17807)
* Fix windows edit box crash, spacing, and alignment

Signed-off-by: saumya.mukul <saumya.mukul@mx.com>

* Cleanup

* Reset file attributes
2017-05-31 08:57:11 +08:00
newnon 639737286f before draw event (#17669) 2017-05-26 11:09:24 +08:00
Nick Dong afcffc7b3a Handle auto layout with scaled widget (#17822)
* handle auto layout with scaled widget

* add test for UILayout for Scaled Widget

* add test for UILayout - Scaled Widget - JS
2017-05-26 10:09:57 +08:00
hellobody 92e713bb1c fix to problem with updating APK in Google Play keeping old OBB (#17689)
* fix to problem with updating APK in Google Play keeping OBB from previous version

This patch fixes the problem when we are unable to keep OBB from previous version when we are uploading new .apk to Google Play.
It was discussed here:
http://discuss.cocos2d-x.org/t/problem-with-updating-apk-in-google-play-keeping-obb-from-previous-version-because-versioncode-changes/36039

* check for null pointer added

Found an issue which could lead to a crash because of null pointer exception.
If pathToOBB doesn't exist then File.list will return null which will cause fileNames array be null.
Now it is fixed.
2017-05-26 09:37:29 +08:00
dadi 3eadc05d36 Fix iskindof (#17785)
* Fix iskindof logic error

* fix iskindof

* No need to deal metatables in function iskindof_
2017-05-23 16:13:37 +08:00
CocosRobot dd880eedf7 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#17857) 2017-05-23 10:17:48 +08:00
minggo 69da862f12 fix action running times for instant actions (#17849) 2017-05-23 08:46:44 +08:00
minggo 013d8525ca make fps stable on iOS (#17852) 2017-05-23 08:46:13 +08:00
CocosRobot a857ebe831 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#17848) 2017-05-22 16:47:08 +08:00
minggo 54962ee509 LayerRadialGradient works on mac and iOS (#17826)
* LayerRadialGradient works on mac and iOS

* fix radius

* finish LayerRadialGradient and add test case

* use local coordinate in shader

* adjust function attributes

* implement getCenter()

* add some comments
2017-05-22 13:42:00 +08:00
David DeSimone 2f3a7df55a Fixing serious XMLHTTP leak when CC_ENABLE_GC_FOR_NATIVE_OBJECTS enabled (#17844)
* Fixing issue where XMLHttpRequests would not have their destructor fire if CC_ENABLE_GC_FOR_NATIVE_OBJECTS was set. This was due to mismanagement of JSHeap object tracing.

* Removing unused variables in js_add_object_root.
2017-05-22 13:40:07 +08:00
James Chen 474491a5d6 Call 'update' method in 'stop/stopAll' to cleanup immediately (#17846) 2017-05-22 11:12:17 +08:00
Atsumu Ono 85529eaa56 Add const keyword to Node::isScheduled (#17841) 2017-05-22 09:25:18 +08:00
Carlos Madrazo 5a52189821 small BillBoard optimizations (#17825)
* small BillBoard optimizations

-Quick return in visit if it is not visible and has no children.  
-Comment out getNodeToWorldTransform because it is death code (doesn't do anything)

* remove unused rotationQuaternion
2017-05-22 08:59:55 +08:00
Carlos Madrazo a24b40ac47 Allow visit Sprite without camera for render to texture (#17824)
* Allow visit sprite without camera for render to texture

A fix to allow render to texture like this 
'''
        Director::getInstance()->setProjection(Director::Projection::_2D);
        m_renderTarget->beginWithClear(1, 0, 0, 0.2, m_depthClear, 0);
        m_sprite->visit(Director::getInstance()->getRenderer(), Mat4::IDENTITY, 0);
        m_renderTarget->end();
        Director::getInstance()->setProjection(Director::Projection::_3D);
'''

* NULL -> nullptr
2017-05-22 08:58:42 +08:00
Atsumu Ono 08467be5a8 Add const keyward to Node::isScheduled and Scheduler::isScheduled (#17833) 2017-05-19 17:24:05 +08:00
James Chen 95baff7086 fixed #17835: pauseEventListenersForTarget doesn't work correctly while in dispatching event (#17836)
* add test.

* fixed #17835: pauseEventListenersForTarget doesn't work correctly while in dispatching event

* remove a unneeded check
2017-05-19 14:03:51 +08:00
CocosRobot 1bfbf35026 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#17830) 2017-05-19 09:41:55 +08:00
Vladimir Perminov 52b35acf95 [Win32,WinRT] Fix listFiles and listFilesRecursively use unicode. (#17813)
* [Win32,WinRT] Fix listFiles and listFilesRecursively use unicode.

1. Incorrect convertation to unicode
if (length != fullpath.size()) correct only ASCII char.
2. For convert unicode exist api, to avoid errors.
3. Equal first char on '.' - error
Need check full name file on "." and "..", otherwise exclude file and
folder begin '.'

Now not use macro UNICODE, for easy use unicode convert api(Otherwise,
you need to connect different versions WinRT and Win32).

* Fix minggo remark.

* Move to specific platform section.
2017-05-18 09:18:18 +08:00
子龙山人 48f6d1c0e5 Refactoring editbox and system label on win32 platform (#17828)
* refactoring windows editbox

* refactoring win32 system label

* fix jenkins ci issue

* remove unneeded function call
2017-05-17 16:20:21 +08:00
Vladimir Perminov 4fccfb2102 [Win32] Fix AudioDecoder fopen unicode. (#17815)
If use fopen to need convert utf8 string FileUtils::getSuitableFOpen.
ov_fopen and mpg123_open use fopen.
2017-05-16 09:45:33 +08:00
André Sousa 9ed89680bb Set camera type accordingly in Camera's init methods (#17809) 2017-05-16 09:17:15 +08:00
Vladimir Perminov 6753c6e98b [WinRT] Fix removeDirectory unicode. (#17812)
CCFileUtilsWinRT::removeDirectory need ut8 string.
temp is wstring(unicode).
2017-05-15 17:10:36 +08:00
子龙山人 9c2782f80a Merge pull request #17786 from AIGRIND-LLC/patch-1
Fix issue #15926
2017-05-15 11:37:21 +08:00
minggo c23330e528 webview supports https in jsb (#17805) 2017-05-11 10:25:43 +08:00
子龙山人 71bb11804d Merge pull request #17802 from zilongshanren/fixAndroidDisplayIssue
fix editbox invisible on some Android devices
2017-05-11 09:52:48 +08:00
Joshua Meng cc21ff32bf Issue #16188: Fix lua-script Sprite:playAnimationOnce(animation, args) blink bug (#17583) 2017-05-10 17:37:38 +08:00
zilongshanren 7695269e44 fix invisible issue 2017-05-10 17:32:58 +08:00
zilongshanren ad614a2952 remove unused variable declare 2017-05-10 16:54:09 +08:00
zilongshanren c609aec95d fix editbox invisible on some Android devices 2017-05-10 15:51:29 +08:00
子龙山人 6e718caa29 Merge pull request #17796 from mxenabled/saumya/android_edit_box_fixes
[Android] Fix edit box font size and alignment
2017-05-10 15:24:16 +08:00
Saumya Mukul 96ae677bb9 Missed padding for default vertical alignment 2017-05-09 09:38:01 -06:00
Saumya Mukul 11a43c0d91 Fixup 2017-05-09 09:36:16 -06:00
Saumya Mukul e24a8f1f8e Fix alignment flags 2017-05-08 16:55:44 -06:00
Saumya Mukul 662b98933c Fix edit box font size and padding 2017-05-08 16:30:46 -06:00
David DeSimone ca0a7f313e Changing AsyncTaskPool/Scheduler to better leverage move semantics (#17727)
* Changing CCAsyncTaskPool and CCScheduler to better leverage move semantics, to avoid several lambda copy constructor calls. Chaning call sites in the cocos engine to better leverage move semantics.

* Editing binding generator to not generate bindings for AsyncTaskPool::enqueue. Bindings were not previously generated for this function due to it's type signature involving a template parameter.

* Adding missing std::move call in AsyncTaskPool to skip a copy constructor call.
2017-05-08 13:39:17 +08:00
AIGRIND bf1f7de9f7 Fix issue #15926 2017-05-05 16:52:15 +02:00
AIGRIND afaa9be826 Fix issue #15926 2017-05-05 16:50:04 +02:00
zilongshanren ae8e83b021 fix editbox textChanged call times on Android platform 2017-05-05 11:23:22 +08:00
CocosRobot e7a9ffb396 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#17780) 2017-05-05 11:11:06 +08:00
minggo 6dcaa9fe3a do not use ES3 context if using multi sample (#17778)
multi sample in ES3 needs to use GLES3 function
2017-05-04 16:25:35 +08:00
Dimon4eg a3cb7de101 Fix reschedule issue with same key (#17706)
* fix reschedule issue

* correct code formatting

* Fix isScheduled

* improve a bit performance of executing functions in cocos thread

* added test to verify reschedule issue

* re-init timer in schedule if timer exists and alive
2017-05-04 16:24:20 +08:00
子龙山人 55b14cbde5 Fix android edit box duplicated text (#17775)
* fix editbox textChanged event called after fragment loaded

* fix editbox duplicatd text when change text in textChanged callback

* revert changes of placeholder modification
2017-05-04 15:04:47 +08:00
Vladimir Perminov 973d6aa955 Added function for calculating md5 hash from Data. (#17762)
* Added function for calculating md5 hash from Data.

getFileMD5Hash now use getDataMD5Hash.

For example, AssetsManagerEx VerifyCallback.
Get Data from file, check equal size, if equal to get md5 hash.

* Data::isNull check size equal 0

* Build on linux and android.
2017-05-04 09:21:22 +08:00
子龙山人 5c3993836e Merge pull request #17756 from perminovVS/set-font-atlas-memory-leak
Memory leak in setFontAtlas, if set equal font in Label.
2017-05-03 17:23:28 +08:00
Eric Zhong 59f9c35f34 fix downloader will not be conitnue (#17761)
if already has started six data task, then start 7th task will suspend, it will not be run
2017-05-03 10:57:42 +08:00
Aaron Baumbach 58b8e77d74 Moved CC_SYNTHESIZE and CC_PROPERTY macros onto a single line (#17765)
This permits comments to be visible in tooltips for the variable and it's associated accessor functions

e.g.
//The health of the entity, when this reaches zero the entity is dead
CC_SYNTHESIZE(float, m_health, Health)

Previously the above comment would only be displayed in the tooltip for the member variable
2017-05-03 10:12:31 +08:00
sbrednikhin 07bb0b2393 Avoid crash on large file download. (#17735)
Downloading large file to memory could cause stack overflow and crash, because old code created buffer `char buf[buflen];` in stack.
New code creates buffer in heap.
2017-04-28 13:38:23 +08:00
Kameiha e45cb88ead Support ETC1 Alpha Channel in the Spine Library (#17692)
* Update SkeletonBatch.cpp

* Update SkeletonBatch.h

* Update SkeletonRenderer.cpp
2017-04-27 10:04:59 +08:00
James Chen 77f2f82b7a [android] Audio Engine crash on Android when playing and stopping some audios repeatedly. (#17748) 2017-04-27 09:48:13 +08:00
RickyZheng001 f8e325792b V3.15 (#17752)
* remove APP_SHORT_COMMANDS setting (#17722)

some developers report it will cause error on Windows though i can not reproduce it. It is strange, the setting is used to resolve command length limitation on Windows.

* Particle font size should be a const value (#17676)

* Particle font size should be a const value

* Minor fix: CCStencilStateManager.hpp -> CCStencilStateManager.h in xcode project.

* JSB SocketIO.connect supports to pass a CA cert file (#17736)

* JSB SocketIO.connect supports to pass a CA cert file

* The second parameter of SocketIO.connect function is probably a `option` object. JSB just ignores it.
2017-04-27 09:25:20 +08:00
Vladimir Perminov afb95f2ced Memory leak, if set equal font in Label.
setCharMap, setBMFontFilePath and setTTFConfigInternal use getFontAtlas.
getFontAtlas retain font atlas always.
setFontAtlas not release, if atlas equal current.

For example call Label::setTTFConfig for equal ttfConfig.
2017-04-26 22:25:15 +03:00
子龙山人 1f1f1d8f1a fix ios label shrink overflow clamp letters issue (#17737) 2017-04-25 09:04:00 +08:00
CocosRobot ddb4dc893b [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#17733) 2017-04-21 09:16:25 +08:00
David DeSimone 246406bda1 Adding additional async functions to FileUtils (#17634)
* Adding async functions for FileUtils::listFiles and FileUtils::listFilesRecursively.

* Updating CCFileUtils::listFiles and CCFileUtils::listFilesRecursively to not expose their async version to
the JS and Lua scripting layers, due to a bug in the binding generator code.

* Updating comments in CCFileUtils.h to prevent improper JS bindings to be generated.

* Editing the cocos2dx.ini files, to prevent bindings for listFilesRecursivelyAsync and listFilesAsync to be generated.
2017-04-19 09:14:06 +08:00
minggo ee84d9f12e update v3.15 2017-04-14 13:45:32 +08:00
James Chen 3c1e36c2c3 Cleanup AudioEngine resource after exiting NewAudioEngineTest. (#17675)
* Unschedules update in AudioEngine implementation while AudioEngine::end is called.

* Cleanup AudioEngine resource after exiting NewAudioEngineTest.
2017-04-13 17:58:49 +08:00
James Chen 57170200dd fixed #17685: [android] Audio in game couldn't be mute while a ring or a call is coming (#17686)
* fixed #17685: [android] Audio in game couldn't be mute while a ring or a call is coming

* Updates comments in AudioEngine-inl.cpp and removes extra empty line in javaactivity-android.cpp

* Puts audio focus relative code to another java file named Cocos2dxAudioFocusManager.java
Renames setAudioFocusLost to setAudioFocus.

* Renames JNI function.

* Register audio focus in onResume and unregister it in onPause.
2017-04-13 10:44:08 +08:00
pandamicro 8acf8f84ed Merge pull request #17660 from ricardopetrere/patch-1
cc.Follow not working on mobile
2017-04-10 15:19:41 +08:00
James Chen 4dac6b3f36 Fixed WebSocket.cpp memory leaks (#17672) 2017-04-10 14:16:55 +08:00
James Chen 97adaabefb Don’t link with libGLESv1_CM.so (#17673) 2017-04-10 14:16:36 +08:00
James Chen 56ae741124 fixed #17665: [android] Crash while launching on the devices only support OpenGL ES 2. (#17671)
* fixed #17665: [android] Crash while launching on the devices only support OpenGL ES 2.
Fixes that egl.eglCreateContext may return non-null but EGL10.EGL_NO_CONTEXT value.
It will cause create a EGL env with a EGL_NO_CONTEXT egl context which will cause crash.

* Don’t link with libGLESv1_CM.so
2017-04-10 11:49:33 +08:00
Wilson E. Alvarez 21f51f0f48 Fixed WebSocket.cpp memory leaks (#17653) 2017-04-10 10:28:05 +08:00
Andrey 1c697796ea Fixed FileUtils::getFileSize() on android platform (#17632) 2017-04-10 10:16:21 +08:00
Steve Tranby e3e00906e3 Fix can't open URLs that have '&' character. (#17633)
See discussion: http://discuss.cocos2d-x.org/t/small-fix-for-application-openurl-linux/35993
2017-04-10 10:15:29 +08:00
James Chen 1f39fd5fdf CocosDenshionTest, unload doesn't work for android 5.0.1 devices (#17662) 2017-04-10 10:14:47 +08:00
newnon ad260980c7 projection fixes (#17487) 2017-04-10 09:15:40 +08:00
Ricardo Petrére c69823ba6f cc.Follow not working on mobile
When using a cc.Follow action, I've tested on mobile devices (Android & iOS) and it's not working. This changed fixed the problem.
2017-04-06 08:45:06 -03:00
minggo ea8ffa3c1c Merge pull request #17630 from minggo/merge-v315
Merge v315
2017-04-05 15:42:53 +08:00
Dale Stammen ce8a513c73 fixed build properties for compiling md5.c (#17638) 2017-04-05 10:28:57 +08:00
James Chen acc97516d8 Sensor timestamp fix, tizen uses micro-seconds as timestamp unit. (#17629) 2017-04-01 17:20:48 +08:00
minggo 9ed5127edc synchronize v3.15 2017-04-01 17:16:45 +08:00
minggo 1f57542d68 match the logic to unbind vao (#17628) 2017-04-01 15:37:22 +08:00
James Chen a924e29c2c Adds libmd5-rfc third-party library for calculating MD5 since the functions in <openssl/md5.h> aren’t exported in win10, plus <openssl/md5.h> seems to be private header. (#17625)
* Adds libmd5-rfc library since the functions in <openssl/md5.h> aren’t exported in win10, plus <openssl/md5.h> seems to be private header.

* Adds libmd5-rfc library for win32 and win10.

* Removes json/msinttypes folder from xcode since it’s only needed for win32 | win10.
2017-04-01 11:43:17 +08:00
pandamicro 4fe75a99b5 Update engine version (#17624) 2017-03-31 16:09:20 +08:00
James Chen 439f371758 fixed #17619: [android] Crash if uncache audio in the finished callback (#17620) 2017-03-31 09:38:45 +08:00
James Chen 2b3087ffc5 Fixes ConsoleUploadFile test could not work on android. (#17607)
* Should not use fread to read file from assets, uses FileUtils::getDataFromFile instead.
* Client socket should not be closed immediatelly after ::send. Otherwise, sever may will receive “Connection reset by peer - Errno 104” error on some platforms. It could be 100% reproduced on Android.
2017-03-29 14:23:33 +08:00
CocosRobot 31c0e27b4b [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#17606) 2017-03-29 14:23:15 +08:00
James Chen 1eea499466 fixed #17603: Connection error in Console uploadFile test. (#17604)
* fixed #17603: Connection error in Console uploadFile test.

* tab -> spaces

* tab -> spaces

* tab -> spaces
2017-03-29 09:17:37 +08:00
minggo 63a81b1f7e add 'virtual' for ActionManager functions (#17594) 2017-03-28 09:25:48 +08:00
minggo aa3bff6c12 fix comment and explicitly initialize _anchorPoint (#17597) 2017-03-28 09:25:25 +08:00
pandamicro d25cd8ddf4 [ci skip] Fix QA issues (#17596)
* Fix RenderTexture#clear API inconsistency

* Improve js-tests desktop page

* Fix issues in js test cases
2017-03-27 18:03:20 +08:00
James Chen 6217d8c5ca fixed #17591: [ios, mac, win32] Audio could not be played in the callback of AudioEngine::setFinishedCallback (#17593)
* Moves the implementation of AudioEngine::AudioInfo to cpp file.

* fixed #17591: [ios, mac, win32] Audio could not be played in the callback of AudioEngine::setFinishedCallback

* fixed #17591: Adds test case.
2017-03-27 17:28:39 +08:00
fred 790237bce1 Update CCNode.cpp (#16947)
The _transform property of CCNode would not be restored on setAdditionalTransform(nullptr)
causing in my project a rotation run away ...
2017-03-23 11:51:51 +08:00
minggo cab5195ad4 find .luac first (#17572) 2017-03-23 10:43:39 +08:00
blackcruiser 1b46096b15 unify sensor timestamp units in Android / iOS / Tizen (#17532) 2017-03-23 10:04:18 +08:00
mogemimi 8a327c77fa Fix various minor typos (#17570) 2017-03-23 09:30:42 +08:00
James Chen 85ded40a98 fixed #17497: Win32 performance is bad. (#17556)
* fixed #17497: Win32 performance is bad.
The 'Sleep(1)' in FPS controlling code isn't precise enough. Windows sets timer precision from 1ms to 15ms, we need to set the precision to the highest one (1ms). Although it's still not enough, we need to make some tricks in the FPS controlling code, that is, don't sleep if the interval is equal or less than 1 millisecond.

* Untabify code.
2017-03-22 15:03:00 +08:00
CocosRobot 72d47c7f39 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#17566) 2017-03-22 14:56:45 +08:00
j-jorge 168ffa639c Flag the end of ActionInstant and ActionInterval. (#17557) 2017-03-22 14:17:49 +08:00
James Chen ab9104f3ce Updates templates for switching AudioEngine in AppDelegate.cpp. (#17555) 2017-03-22 11:19:25 +08:00
minggo b0179340be Gles3 support (#17537)
* ios supports gles 3.0

* android supports gles 3
2017-03-21 09:41:55 +08:00
CocosRobot 95921836ca [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#17549) 2017-03-20 09:39:41 +08:00
rh101 f8eccb9608 Added VS2017 support in project files (#17548)
* [libcocos2d.vcxproj, libcocos2d.vcxproj.filters] Removed entries for non-existent files that were causing "Build is out of date" issues in Visual Studio
[project.pbxproj] Removed entries for non-existent file

* [libcocos2d.vcxproj.filters] Renamed CCStencilStateManager.h extension to .hpp.

* [libcocos2d.vcxproj, libcocos2d.vcxproj.filters] Removed entry for file CCDownloaderImpl.h which does not exist.

* Changed extension of CCStencilStateManager.hpp to .h

* Added support for VS2017 in project files.
2017-03-20 09:36:07 +08:00
minggo b5a1360a17 revert #17437 (#17545)
* revert #17437

* fix resource path
2017-03-20 09:28:12 +08:00
Tyler Dauch 39f264d5c3 Update Cocos2dxDownloader.java (#17528) 2017-03-17 10:47:39 +08:00
mogemimi 8be22ce55c Fix typos in comments and strings (#17534) 2017-03-17 10:44:38 +08:00
minggo 8f66d5465a [ci skip]Update version (#17525)
* update version

* update readme

* update english release note

* add some information
2017-03-16 14:14:43 +08:00
pandamicro 0e0987d337 Support notify progression in XMLHTTPRequest (#17509)
* Support notify progression in XMLHTTPRequest

* Fix indent

* Fix issues

* fix issue
2017-03-16 14:09:51 +08:00
rh101 27935acd64 VS and XCode project files have non-existent file references (#17512)
* [libcocos2d.vcxproj, libcocos2d.vcxproj.filters] Removed entries for non-existent files that were causing "Build is out of date" issues in Visual Studio
[project.pbxproj] Removed entries for non-existent file

* [libcocos2d.vcxproj.filters] Renamed CCStencilStateManager.h extension to .hpp.

* [libcocos2d.vcxproj, libcocos2d.vcxproj.filters] Removed entry for file CCDownloaderImpl.h which does not exist.

* Changed extension of CCStencilStateManager.hpp to .h
2017-03-16 13:54:50 +08:00
pandamicro 68fc0dbfa9 Add utils::getMD5Hash (#17520)
* Add FileUtils::getMD5Hash

* Improve name
2017-03-16 13:47:45 +08:00
blackcruiser e8c752126d fix an Accelerometer second to microsecond convertion error in Android platform (#17519)
1 second = 1000000 microsecond
2017-03-16 12:00:58 +08:00
James Chen 1f8eb3b7f5 fixed #17494: Adds setTimeout to wrap NSTimer since ‘timerWithTimeInterval:repeats:block’ is only available from iOS 10, macOS 10.12. (#17518)
* fixed #17494: Adds setTimeout to wrap NSTimer since ‘timerWithTimeInterval:repeats:block’ is only available from iOS 10, macOS 10.12.

* Sets _timeoutCallback to nullptr if onTimeoutCallback is called.
2017-03-16 11:04:36 +08:00
pyrosphere e3bff6452d Support for the tvOS micro gamepad as a CCController (#17517)
* Fixes cocos2d build for tvOS.

* Support for the tvOS micro gamepad as a CCController.
2017-03-16 10:33:36 +08:00
pandamicro 75383bdcde Jsb improvements (#17513)
* Cleanup ScriptingCore code

* Add jsb.ENABLE_GC_FOR_NATIVE_OBJECTS to indicate the memory model

* Use incremental GC

* Improve ScriptingCore::executeFunctionWithOwner performance

* Support ScriptingCore::executeGlobalFunction

* Reuse js objects for get_or_create_weak_jsobject reduce memory usage

* Fix sequence / spawn js object lost issue

* Improve wrappers with cppOwner system
2017-03-16 09:42:16 +08:00
James Chen 8c542d711d issue #17503: Avoid crash if initializing audio fails. (#17505)
* issue #17503: Avoid crash if initializing audio fails.

* Corrects logic of checking the return value of decodeMP3.
2017-03-15 16:46:19 +08:00
CocosRobot 87b4d7d54d [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#17507) 2017-03-15 16:23:50 +08:00
pandamicro 0eec73ba43 Bindings fix and assets manger ex fix (#17115)
* Fix custom event being discard during event emission

* Fix tilemap black line issue

* Fix auto bindings config

* Adapt websocket to new memory model

* Improve cocos2d_specifics code stability

* Fix issue with get_or_create_js_object function

* Improve memory usage in function wrapper invocation

* Use JS Function bind to avoid memory tracking issues

* Support size parameter to collect total byte size before update process

* Fix download resuming issue on Android

* Remove temporary assets when temporary manifest is invalid or out of date

* Use version compare handle to compare manifests versions

* Support max concurrent tasks setting & download verify callback

* Add Manifest::Asset conversion

* Avoid crash caused by wrappers

* Sync implementation of tested and published AssetsManagerEx from Cocos Creator

* Fix linux compilation issues
2017-03-15 16:09:02 +08:00
James Chen 16e1bf47ac fixed #17494: [iOS] CrashIfClientProvidedBogusAudioBufferList (#17500) 2017-03-15 13:50:56 +08:00
pyrosphere 18d2cdbc75 Fixes cocos2d build for tvOS. (#17498) 2017-03-15 10:01:38 +08:00
minggo 7d3b9de866 update gradle version and build tool version (#17496) 2017-03-14 18:13:47 +08:00
James Chen b842202541 fixed #17395: OpenAL A003 error if doing AL invocation before alcMakeContextCurrent(s_ALContext); (#17492)
Pause director if Audio Session is still in interrupted state, resume director in interrupted ended.
2017-03-14 13:56:12 +08:00
Bin Zhang 769f7830f0 Improve the AndroidStudio configurations of tests & templates (#17495)
* Improve the AndroidStudio configuration of test projects to fit the new implementation of cocos compile.

* Improve the AndroidStudio configuration of templates to fit the new implementation of cocos compile.
2017-03-14 13:41:28 +08:00
James Chen 90403fc632 Fixes memory issues catched by Xcode Analyze Tool. (#17489) 2017-03-14 11:09:31 +08:00
James Chen 1dccd7b85b fixed #17395: AudioEngine alSourcePlay error code:a003 in lua-tests. (#17485) 2017-03-13 11:37:23 +08:00
James Chen 47694b0b28 fixed #17474: [Android] It may trigger ConcurrentModificationException in Cocos2dxSound.java. (#17479) 2017-03-09 18:11:28 +08:00
James Chen 5c0c6d2e1e More powerful Uri class, adds unit test for Uri class. Refactors some code in SocketIO & Websocket. (#17472)
* More powerful Uri class, adds unit test for Uri class. Refactores some code in SocketIO & Websocket.

* Adds missing header file stdint.h

* Exports Uri class

* Uri belongs to network group

* Updates the location of group comment

* Removes an unused include.

* Updates Uri comment.
2017-03-09 10:14:39 +08:00
mogemimi 98d2236914 Prevent signed/unsigned mismatch (#17468) 2017-03-08 14:32:23 +08:00
minggo 9335986c73 fix the issue that onEnterTransitionDidFinish() is not invoked at first scene change (#17466)
refer to https://github.com/cocos2d/cocos2d-x/issues/17442 for detail information
2017-03-08 14:26:58 +08:00
Owen.Cai 7aa74fa994 csbload error bug (#17465)
* csbload error bug

* csbload error bug

* csbload error bug
2017-03-08 10:14:38 +08:00
Alanmars 0cde5c6fc1 *Fix: GLThread and other threads access sDownloaderMap in a thread-unsafe way, which will result in crash in some occasion on Android. (#16326) 2017-03-07 17:00:52 +08:00
James Chen 1c0e56efef fixed #17416: Wrong default port of SocketIO connection. (#17459)
Supports SSL connection for SocketIO.
Avoid memory corruption while disconnecting SocketIO, _ws->close() has to be at the end of ‘SIOClientImpl::disconnect()’.
2017-03-07 15:49:38 +08:00
James Chen fc0ad058a5 fixed #17427: lws_parse_url has wrong behavior, it parses ’ws://domain.com/abc/d’ to ‘path: abc/d’ rather than ‘path: /adb/d’. (#17455)
* fixed #17427: lws_parse_url have wrong behavior, it parses ’ws://domain.com/abc/d’ to ‘path: abc/d’ rather than ‘path: /adb/d’.
Adds Uri class and parses Url to scheme, host, port, path in engine side.

* Moves Uri implementation to Uri.cpp, adds getter functions.

* Updates win32 project.

* Updates win10 project.

* Adds include header for atoi error on android.

* Updates tizen project configuration.
2017-03-07 13:35:59 +08:00
CocosRobot fb730b5395 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#17456) 2017-03-07 11:29:17 +08:00
j-jorge 67d16bee98 Prevent unexpected calls to unscheduled selector in long updates. (#17431)
If the delta time dt passed to cocos2d::Timer::update(float) is longer than the
interval of the timer, then the timer will be triggered several times even if
the selector is unscheduled during the call.

This commit adds a flag in cocos2d::Timer stop the update loop if the selector
has been unscheduled.
2017-03-07 11:16:30 +08:00
CocosRobot e08cbc1c39 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#17453) 2017-03-07 09:45:23 +08:00
Bin Zhang b7f8dacd7c Solve the error logic in spine runtime. (#17448)
Sync the runtime to the state of this commit (both js & cpp runtime):
3ced1e1daf
2017-03-07 09:36:42 +08:00
j-jorge 6cd7314497 cocos2d::Sequence::isDone() checks that the last action is actually done. (#17437) 2017-03-07 09:36:09 +08:00
James Chen ce2f4e892f Websocket bug fix after PR#17440 was merged. (#17450)
* Websocket bug fix after PR#17440 was merged.

* typo fix
2017-03-07 09:35:14 +08:00
CocosRobot b32c84f8c2 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#17449) 2017-03-06 18:28:58 +08:00
James Chen bdcacd0031 Some fixes for search paths: (#17435)
* Some fixes for search paths:
1. Adds ‘_originalSearchPaths’ variable, ’getSearchPaths’ returns the original values set by ‘setSearchPaths’  or ‘addSearchPath’.
2. Adds a getter function ‘getDefaultResourceRootPath’.
3. ‘setDefaultResourceRootPath’ should also update search paths and remove file path cache internally.
4. ‘setSearchPaths’  supports to pass self (_originalSearchPath), could be used in ‘setDefaultResourceRootPath’ to update the final ’_searchPathArray’ for searching full path.
5. ‘addSearchPath’ fix, the default resource root path should be the last element in ‘_searchPathArray’.

* Checks whether the parameter ‘searchResolutionOrder’ passed in is the same as ‘_searchResolutionsOrderArray’.

* Don’t break the compatibility, add a new method called ‘FileUtils::getOriginalSearchPaths’.
2017-03-06 16:59:43 +08:00
Tiffanyx 69d92bbe49 fixed #17433: [webSocket ] webSocket random crash in win32 (#17440) 2017-03-06 14:18:58 +08:00
Dale Stammen 13a438dbfd win10 uwp fix for new Mouse events (#17434) 2017-03-03 12:40:32 +08:00
CocosRobot 7dbfc85a8f [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#17430) 2017-03-02 16:08:53 +08:00
radman0x c442275c8e 17357: Better encapsulate the definition of mouse buttons (#17358)
* 17357: Better encapsulate the definition of mouse buttons

Move definition of buttons from a list of #define's to an enum class and
make appropriate updates for successful compilation.

* 17357: Better encapsulate the definition of mouse buttons

Updates from code review:
* Removed changes to automatically generated files
* Removed std::ostream& convenience operator

* 17357: Fix mouse tests
2017-03-02 13:39:33 +08:00