Commit Graph

2941 Commits

Author SHA1 Message Date
Darragh Coy 824efceb3f Revert "Review feedback: fix memory leak discovered."
This reverts commit 07646f1c82.
2014-03-27 15:14:37 -07:00
Darragh Coy 8ee90389b4 Review feedback: Wrap the debug verification in additional macros which are disabled by default.
Require the user to enable 'CC_NODE_DEBUG_VERIFY_EVENT_LISTENERS' in ccConfig.h in order to enable the debug checks in debug builds.
2014-03-27 12:29:28 -07:00
Darragh Coy 6e19da12c3 Review feedback: Remove unnecessary check of EventListener::getSceneGraphPriority() for fixed event listeners.
Fixed priority event listeners never have an associated node.
2014-03-27 11:59:07 -07:00
Darragh Coy 07646f1c82 Review feedback: fix memory leak discovered.
Always safe release the listener we retain - shift where release happens to the end of the block. Reproduced the leak using the Xcode Leaks instrument in the RemoveListenerAfterAddingTest and verified fixed after apply this change.
2014-03-27 11:28:27 -07:00
Dhilan007 f2cc3a3ce2 Update variable name. 2014-03-27 17:48:16 +08:00
Dhilan007 5a572c1797 closed #4561:Fixed read file more than once for label created by different font size. 2014-03-27 17:04:05 +08:00
boyu0 cb1c3ccd1a closed #4573: Set particle visible to false then set to true cause crashes.
Because of the update order, _particleIdx may equal to zero.
2014-03-27 16:47:21 +08:00
CocosRobot e5ff0912a7 [AUTO]: updating luabinding automatically 2014-03-27 08:43:46 +00:00
James Chen 2e3b6b62de Merge pull request #6028 from Dhilan007/develop_label
closed #4494:: Easier for set texture parameters of label's cache textures.
2014-03-27 16:40:12 +08:00
Dhilan007 408107ff24 closed #4494::Easy to sets texture parameters of label's cache textures. 2014-03-27 15:35:51 +08:00
CocosRobot 8cec6b83d9 [AUTO]: updating luabinding automatically 2014-03-27 07:35:51 +00:00
Dhilan007 cac4e0bbbc closed #4569:Texture2D support for update partial texture 2014-03-27 15:11:04 +08:00
CocosRobot 7a3e40dd8e [AUTO]: updating luabinding automatically 2014-03-27 06:55:35 +00:00
James Chen c62144c350 Merge pull request #6022 from Dhilan007/develop_label4565
closed #4565:fixed logical error in Label::setFontAtlas.
2014-03-27 14:39:30 +08:00
Dhilan007 8a8fa743eb closed #4565:fixed logical error in Label::setFontAtlas. 2014-03-27 14:28:32 +08:00
andyque 928e9def8d closed #102, add CC_CONSTRUCTOR_ACCESS to CCProtectedNode 2014-03-27 14:27:30 +08:00
CocosRobot 33d6b04fb4 [AUTO]: updating luabinding automatically 2014-03-27 05:55:07 +00:00
minggo e52fc981cc Merge pull request #5977 from dabingnn/develop_fixID_Android_bug
Develop fix id android bug
2014-03-27 13:49:53 +08:00
CocosRobot b1859a4cac [AUTO]: updating luabinding automatically 2014-03-27 03:10:37 +00:00
James Chen aaab8881ae Merge pull request #6003 from pandamicro/LayerGradientCtor
Fixed #4566: Constructor added for LayerGradient
2014-03-27 11:06:49 +08:00
James Chen a3a0833401 Merge pull request #6014 from andyque/fix_issue4562
closed #4562, Stopped music could also be resumed on iOS
2014-03-27 11:04:05 +08:00
pandamicro f0bb69bc5f Revert "Reverse CONSTRUCTOR_ACCESS"
This reverts commit 44d446ef1d.
2014-03-27 10:59:47 +08:00
pandamicro 87384d8ffa Fixed #4566: Move LayerGradient's init functions into CC_CONSTRUCTOR_ACCESS section 2014-03-27 10:55:41 +08:00
andyque 26a04b38f2 closed #4562, fix audio resume bug after stop the music 2014-03-27 10:43:57 +08:00
pandamicro 2d5c295f99 Merge branch 'develop' into LayerGradientCtor 2014-03-27 10:14:57 +08:00
pandamicro 7f2255e485 Fixed #4566: Fix coding style problems 2014-03-27 10:01:46 +08:00
Darragh Coy 0ee1095e37 Fix crashes in event dispatch other related safety checks/fixes
1: Add a fix to prevent events from being sent to scene nodes which are destroyed. Previously when a node was being destroyed it would try to unregister any event listeners it would have. This process would fail however in the case where event dispatching was already underway because we can't modify the listeners list while we are iterating through it. This is a pretty common occurrence since we often tear down & switch scenes in response to button clicks etc. Fix the problem by nulling out the slot for the listener we are removing in this case, so that it's node no longer receives any events after it is destroyed. The event dispatching code will cleanup this unused/nulled slot once the event processing loop has terminated.

2: When removing an event listener in cocos2d::EventDispatcher, ensure immediately it gets removed from the node priority map and dirty nodes set in order to ensure we don't inadvertently access any dangling pointers to nodes.

3: Add debug checks to ensure nodes have no associated event listeners after they are destroyed. This check will catch the problem fixed by (1) if it is still present.

4: Add some extra debug sanity checks in the event dispatcher to ensure nodes are not added to the lists twice and that they are being properly removed from the lists under certain conditions.

5: In cocos2d::Node's destructor NULL out members after releasing them in case they somehow happen to be accessed during the destructor. Move the release of the event dispatcher to the very end, since we need to check against it in debug.
2014-03-26 13:12:44 -07:00
CocosRobot 8efb9ad4e0 [AUTO]: updating luabinding automatically 2014-03-26 12:09:41 +00:00
James Chen 1dbfc9e10a Merge pull request #5988 from andyque/fix_silder_hittest
closed 4560,  fixed slider hitTest position
2014-03-26 19:27:41 +08:00
pandamicro 44d446ef1d Reverse CONSTRUCTOR_ACCESS 2014-03-26 18:48:01 +08:00
pandamicro c08bf69370 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into LayerGradientCtor 2014-03-26 18:46:00 +08:00
pandamicro 63772f7d72 Fixed #4566: Constructor added for LayerGradient 2014-03-26 18:45:08 +08:00
CocosRobot ebc09373e3 [AUTO]: updating luabinding automatically 2014-03-26 10:42:58 +00:00
James Chen cdd7356512 Merge pull request #5969 from nutty898/develop_nutty_modifylayout_add_Boxes
closed #4534: Adding HBox, VBox layouts, refactoring 'doLayout' function.
2014-03-26 18:30:17 +08:00
CocosRobot 6e86e65038 [AUTO]: updating luabinding automatically 2014-03-26 10:25:55 +00:00
James Chen 849d7b9109 Merge pull request #5996 from chengstory/AddNewCreateNodeWay
Adding support of using CCComRender as parent for attached component
2014-03-26 18:20:34 +08:00
CaiWenzhi a05969c395 Move layout "exe" to cpp 2014-03-26 17:58:53 +08:00
zhangcheng f564c4e34a 1. Spirte -> Sprite.
2. _EMPTYNODE -> EMPTY_NODE.
2014-03-26 17:55:35 +08:00
zhangcheng c1ff610277 use capital letters for enum. 2014-03-26 17:21:09 +08:00
zhangcheng 1e6b9f7d9f remove isRenderer. 2014-03-26 17:02:37 +08:00
zhangcheng 58a61d94fb add use CCComRender as parent for attaching component 2014-03-26 16:39:32 +08:00
James Chen 22fdbbb198 Merge pull request #5980 from Dhilan007/develop_label2
Refactor implementation of label's shadow and fixed stroke was not 'outside stroke' for Label generated by 'Font name'
2014-03-26 16:32:04 +08:00
James Chen 1003847cd1 Mac build fix after merging https://github.com/cocos2d/cocos2d-x/pull/5989 2014-03-26 15:44:38 +08:00
James Chen 21ba509a35 Merge pull request #5989 from dumganhar/iss4559-ios-64bit
closed #4559: Wrong behavior of multi-touch on iphone5s/ipadAir (arm64 arch)
2014-03-26 15:27:57 +08:00
James Chen 691442d80d closed #4559: Wrong behavior of multi-touch on iphone5s/ipadAir (arm64 arch) 2014-03-26 15:04:11 +08:00
minggo 5e2ffc45ec Merge pull request #5985 from andyque/remove_pragma_mark
issue #4401, remove unused pargma mark macro
2014-03-26 14:58:37 +08:00
andyque 57d8f155df issue #4401. resolve conflicts 2014-03-26 14:54:50 +08:00
andyque 6449ced0ab closed #4560, fixed UISlider hitTest Point 2014-03-26 14:41:53 +08:00
Dhilan007 fa91bf1167 remove unused code and fixed warning. 2014-03-26 14:11:40 +08:00
CocosRobot 0140d6d3f7 [AUTO]: updating luabinding automatically 2014-03-26 06:03:04 +00:00
minggo a374241f65 Merge pull request #5924 from MSOpenTech/wp8-3.0-cocos2d-changes
Windows Phone 8,0 cocos2d-x 3.0  changes
2014-03-26 13:58:46 +08:00
James Chen 7a8db8271f Merge pull request #5930 from andyque/Branch_issue4429
closed #4429: Boolean value could not be written to specified plist file
2014-03-26 11:46:56 +08:00
Dhilan007 1247760d95 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into develop_label_fixs
Conflicts:
	cocos/2d/CCLabel.cpp
2014-03-26 11:15:48 +08:00
Dhilan007 41ffa372e8 label: Refactor implementation of shadow. 2014-03-26 11:09:16 +08:00
Huabing.Xu bc15ac1415 closed #4552: change assert log message 2014-03-26 10:07:50 +08:00
James Chen f6c6d428ad Merge pull request #5926 from andyque/fix_tests_warnings
issue #4401, remove warnings under win32
2014-03-25 18:17:42 +08:00
CocosRobot c5d6e83673 [AUTO]: updating luabinding automatically 2014-03-25 09:30:11 +00:00
CaiWenzhi c976791f7d Merge branch 'develop' into develop_nutty_modifylayout_add_Boxes 2014-03-25 17:17:57 +08:00
CaiWenzhi 243b7e5822 Modify layout and add Boxes 2014-03-25 17:15:54 +08:00
Huabing.Xu 9aa8327d9c closed #4552: separate material ID and openGL ProgramID 2014-03-25 16:54:29 +08:00
James Chen b6589b0b5a Merge pull request #5931 from Dhilan007/develop_label
label: Support to clip transparent area of Label, content size will be updated with only non-transparent area.
2014-03-25 16:47:12 +08:00
LinWenhai 4b454fe7bb Update getter of ClipMarginEnabled. 2014-03-25 16:37:34 +08:00
minggo cc61df50e7 Merge pull request #5965 from natural-law/issue2880
Generate mipmap for the texture has mipmaps when reload textures.
2014-03-25 16:29:05 +08:00
James Chen 8f95e27dc7 Merge pull request #5943 from koowolf/websocket_fix
closed #4542: WebsocketTest crashes on win32, it may delete mutex which is still being locked
2014-03-25 16:28:18 +08:00
zhangbin 36892c3a98 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into issue2880 2014-03-25 16:21:41 +08:00
zhangbin d6ad9274c4 closed #2880, Generate mipmap for the texture has mipmaps when reload textures. 2014-03-25 16:19:34 +08:00
koowolf c37584ee5c closed #4542: fix crash in win32(delete mutex while still lock) 2014-03-25 16:14:21 +08:00
CocosRobot bdcd6ea198 [AUTO]: updating luabinding automatically 2014-03-25 08:13:42 +00:00
Dhilan007 674dffce21 Merge branch 'develop-label-stroke' of https://github.com/dumganhar/cocos2d-x into develop_label_fixs 2014-03-25 16:10:47 +08:00
James Chen 34245d4bd0 Merge pull request #5953 from dumganhar/merge5934
closed #4541: [ui] Removed Widget::addNode, added ProtectedNode.
2014-03-25 15:46:56 +08:00
James Chen c8a762c92b Merge pull request #5954 from CocosRobot/update_lua_bindings_1395733113
[AUTO]: updating luabinding automatically
2014-03-25 15:43:38 +08:00
CocosRobot 86f69a0b4e [AUTO]: updating luabinding automatically 2014-03-25 07:39:29 +00:00
minggo 3fc15e5e7d Merge pull request #5896 from splhack/remove_nativeactivity
Remove NativeActivity
2014-03-25 15:37:12 +08:00
minggo cab21adf4a Merge pull request #5919 from boyu0/bug4499_ParticleSystem_endRadiusVar_bug
closed #4499: Read ParticleSystem::modeB.endRadiusVar from "minRadiusVariance...
2014-03-25 15:34:36 +08:00
James Chen b40127ea99 Never include '.cpp' files. 2014-03-25 15:32:14 +08:00
James Chen 91347aca0c closed #4541: Removes wrong coments in CCProtectedNode.h. 2014-03-25 15:07:46 +08:00
James Chen 45b98e7dc0 issue #4541: s_globalOrderOfArrival is an static variable of Node class. 2014-03-25 15:07:11 +08:00
LinWenhai 19341ceaf4 add getter of ClipMarginEnabled. 2014-03-25 14:54:42 +08:00
CaiWenzhi 9a8cf6d813 Modify Windows Project 2014-03-25 14:28:58 +08:00
CaiWenzhi c0b67e6d1b Modify mk files 2014-03-25 14:28:58 +08:00
CaiWenzhi 2dffcb9808 Add ProtectedNode and remove "addNode" 2014-03-25 14:28:58 +08:00
James Chen 093b792221 Merge pull request #5946 from boyu0/iss3804_change_image_private_to_protected
closed #3804: Change private functions and variables in Image class to protected, since its subclasses may need them.
2014-03-25 14:07:58 +08:00
James Chen 32f647d38b Merge pull request #5940 from boyu0/iss4513_particle_readd_bug
closed #4513: Particle doesn't animate when it was removed and re-added to another node.
2014-03-25 14:05:12 +08:00
James Chen 004d5b421a Merge pull request #5947 from CocosRobot/update_lua_bindings_1395726548
[AUTO]: updating luabinding automatically
2014-03-25 13:53:38 +08:00
CocosRobot 5d2906ad8b [AUTO]: updating luabinding automatically 2014-03-25 05:50:20 +00:00
James Chen 400408f204 Merge pull request #5944 from aeonmine/develop
Fix a memory leak in ActionManagerEx::initWithDictionary.
2014-03-25 13:48:33 +08:00
James Chen 8d28884c9f Merge pull request #5806 from Dhilan007/develop_reImplementationWithLabel
issue #3821: Uses new label instead of LabelTTF in engine.
2014-03-25 13:46:17 +08:00
aeonmine 4edaa62ec7 Update CCActionManagerEx.cpp
modify intent
2014-03-25 12:41:16 +09:00
James Chen 5625c98443 Merge pull request #5942 from Dhilan007/develop_label2
label: 1) change default value of anchor point to Middle.
2) Shadow offset and outline size passed to new Label consider 'contentScaleFactor'
2014-03-25 11:39:53 +08:00
boyu0 db0fe60974 closed #3804: Change Image private function and variable to protected, for the subclasses can use them. 2014-03-25 11:13:44 +08:00
Kazuki Sakamoto 3fba61f384 Remove NativeActivity 2014-03-24 19:57:29 -07:00
mine_masahiro 3a0ee65a7e Fix ActionObject memory leak bug 2014-03-25 11:44:26 +09:00
Dhilan007 8278a510aa Label:fixed shadow offset didn't consider 'contentScaleFactor' 2014-03-25 10:41:53 +08:00
Dhilan007 859fe98502 label:1.change default value of anchor point. 2.Shadow offset and outline size passed to new Label didn't consider 'contentScaleFactor' 2014-03-25 09:58:16 +08:00
Dale Stammen 04b529d328 fixed use of nullptr in variable args for wp8 2014-03-24 15:09:24 -07:00
pandamicro 45d4397d20 Issue #3897: Make Constructors public in Cocos2d-JS 2014-03-24 22:05:19 +08:00
boyu0 759ec61639 closed #4513: Particle doesn't animate when readd it. 2014-03-24 18:08:55 +08:00
James Chen ae2027ea53 Remove unneed CC_DEPRECATED_ATTRIBUTE macro in SocketIO.cpp 2014-03-24 17:59:44 +08:00
James Chen e075b82dfe tab -> 4 spaces, whitespace cleanup. 2014-03-24 17:58:35 +08:00
James Chen b6a175457c Merge commit 'refs/pull/5923/head' of git://github.com/cocos2d/cocos2d-x into merge5923 2014-03-24 17:55:43 +08:00