Commit Graph

149 Commits

Author SHA1 Message Date
Huabing.Xu 511e868ac4 migrate getAnchorPoint, getAnchorPointInPoints and relative member variable to Vector2 2014-04-15 16:59:16 +08:00
Huabing.Xu e351b778c1 migrate setAnchorPoint to Vector2 2014-04-15 16:47:29 +08:00
Huabing.Xu 6686b657a4 Migrate getPostion and correspondent member variable to Vector2 2014-04-15 16:28:59 +08:00
Huabing.Xu 071cbc7565 migrate setPosition to Vector2 2014-04-15 16:16:14 +08:00
Huabing.Xu ec2ef0f64b migrate convertXXXX to Vector2 step2 2014-04-15 14:41:09 +08:00
Huabing.Xu 633173005b migrate convertXXXX to Vector2 2014-04-15 14:29:12 +08:00
Huabing.Xu 44be9a38ec Node convertToNodeSpace and convertToWorldSpace use Vector2 2014-04-15 14:09:46 +08:00
Huabing.Xu 80f96398b3 1. changed comment message in CCNode.cpp
2. changed Director projection to Matrix
2014-04-14 09:30:51 +08:00
Huabing.Xu 1670e07300 Merge branch 'develop' into develop_migrate_math_lib_merge
Conflicts:
	build/cocos2d_libs.xcodeproj/project.pbxproj
	build/cocos2d_tests.xcodeproj/project.pbxproj
2014-04-11 11:18:13 +08:00
Huabing.Xu 591b1e9231 remove kmMat4 in Node.cpp 2014-04-10 23:12:29 +08:00
Huabing.Xu 231cdcb906 adjust comment message 2014-04-10 11:14:46 +08:00
James Chen 9d8d256bee issue #4729: Android build works ok. 2014-04-10 00:36:42 +08:00
Huabing.Xu 409b696bab remove kmMat4 interface in class Node 2014-04-08 23:05:33 +08:00
Huabing.Xu fcff284fd5 getParentToNodeTransform return Matrix 2014-04-08 22:13:59 +08:00
Huabing.Xu 3837c23ebe draw() using Matrix instead of kmMat4 2014-04-08 22:07:35 +08:00
Huabing.Xu b9af100493 visit() using Matrix instead of kmMat4 2014-04-08 21:45:54 +08:00
Huabing.Xu e8596094a4 Merge branch 'develop' into develop_migrate_math_lib_merge 2014-04-08 16:58:51 +08:00
Darragh Coy 9a6b93eae1 Add extra CCNode verification
Add a check to the CCNode destructor to catch a common cocos2d-x programming mistake - forgetting to call base class onExit() in derived class onExit() implementations. We can check for this invalid API usage by checking if the node is still marked as running on destruction. If the node still thinks it's running then it's likely the cleanup logic performed by Node::onExit() was not done.
2014-04-07 17:05:42 -07:00
Huabing.Xu 5d70170a4b getNodetoParentTransform getNodeToWorldTransform return Matrix instead of kmMat4 2014-04-04 18:41:29 +08:00
Huabing.Xu 6b4451482f remove matrixToKmMat4 function 2014-04-04 18:13:10 +08:00
Huabing.Xu f1b1678900 Director::getMatrix returns Matrix instead of kmMat4 2014-04-04 17:31:21 +08:00
Huabing.Xu 67e62ce73d readied director::getMatrix again. remove kmGLgetMatrix 2014-04-03 17:26:06 +08:00
Huabing.Xu 79f62f4351 comment out director::getMatrix temporarily 2014-04-03 10:33:59 +08:00
Huabing.Xu 49de7511f5 migrate Vertex3f to Vector3 2014-04-02 15:06:16 +08:00
James Chen ecad5ea3ce Fixed `ExtensionTest/CocoStudioComponentsTest` crash after applying PR #6011. 2014-03-28 14:55:15 +08:00
James Chen e87f6991cf User object has to be released before others, since userObject may have a weak reference of this node.
It may invoke `node->stopAllAction();` while `_actionManager` is null if the next line is after `CC_SAFE_RELEASE_NULL(_actionManager)`.
2014-03-28 14:09:51 +08: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 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
James Chen 45b98e7dc0 issue #4541: s_globalOrderOfArrival is an static variable of Node class. 2014-03-25 15:07:11 +08:00
heliclei c26b103b23 remove node name related features from v3.0 2014-03-13 10:45:02 +08:00
heliclei 2a3cb0847e refactor api name 2014-03-12 18:10:45 +08:00
heliclei a907580d0a use lambda callback 2014-03-12 14:15:45 +08:00
heliclei 80417f0f35 correct naming convetion 2014-03-11 15:27:28 +08:00
heliclei 8db680b9ee add EnumChildNodesByName, walk node tree with callback 2014-03-11 13:58:43 +08:00
James Chen 63292b5ba6 Merge pull request #5544 from heliclei/node-string-tag
CCNode:Add String tag, to support runtime manipulation
2014-03-10 18:26:51 +08:00
James Chen eca0bce1be Merge pull request #5633 from huangml/patch-1
closed #4319: Node::removeAllChildrenWithCleanup() does not remove PhysicsBody.
2014-03-10 10:55:54 +08:00
James Chen 7aec578b35 closed #3290: The order of onEnter works correctly on JSB and LuaBindings. 2014-03-08 22:07:55 +08:00
黄梦龙 8b737d8aab Update CCNode.cpp
removeAllChildrenWithCleanup() not remove PhysicsBody
2014-03-08 17:42:35 +08:00
Huabing.Xu 9fc6177570 fix bug for outdated transform status 2014-03-07 10:03:34 +08:00
heliclei 55080d713b refactor string tag to name 2014-03-05 17:03:25 +08:00
heliclei cbec0f9a15 CCNode:Add String tag, to support runtime manipulation 2014-03-05 00:15:01 +08:00
Ricardo Quesada 8bdfce9bbe Merge branch 'develop' into visit_draw_improved 2014-03-03 17:31:29 -08:00
Ricardo Quesada 81f5254e15 Removes setNormalizedPosition
This funciton is useful, but the code is buggy.
In should check the parents' position instead of Director::Size()
Let's do it correctly, and then re-add this function
2014-03-03 16:08:30 -08:00
Ricardo Quesada c386f88e32 Merge branch 'develop' into visit_draw_improved
Conflicts:
	CHANGELOG
	cocos/gui/UILayout.h
2014-03-03 11:27:42 -08:00
minggo 594342ea3e Merge pull request #5505 from dumganhar/event-dispatcher-refactor
[EventDispatcher] Adds 'pauseEventListenersForTarget', 'resumeEventListenersForTarget' and 'removeEventListenersForTarget'.
2014-03-03 17:56:57 +08:00
minggo be0ac5dc1c Merge pull request #5493 from boyu0/bug4150_physics_position_rotation
closed #4150: fix physics position and rotation bug.
2014-03-03 14:57:33 +08:00
James Chen 757425c54b issue #4165: Scheduler::scheduleCallback -> Scheduler::schedule, Scheduler::scheduleSelector -> Scheduler::schedule. APIs are clear for c++ developers now. 2014-03-03 11:00:30 +08:00
boyu0 c99b0a0b6a closed #4150: Fix missing "!" 2014-03-03 01:48:56 +08:00
James Chen f3949e078b [EventDispatcher] Adds 'pauseEventListenersForTarget', 'resumeEventListenersForTarget' and 'removeEventListenersForTarget'. 2014-03-02 17:41:18 +08:00
Ricardo Quesada cdc19eea1c Nodes: setAdditionalTransform() receives a pointer
and not a const reference.
If the pointer is `NULL`, then it won't use the additionalTransform
2014-03-01 08:26:54 -08:00