Commit Graph

282 Commits

Author SHA1 Message Date
boyu0 9f7bf4349c Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into iss2771_physical 2013-09-17 11:19:47 +08:00
minggo f9c5ece2d5 fix memory leak 2013-09-16 23:28:00 +08:00
boyu0 a48fee881d Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into iss2771_physical 2013-09-16 22:16:50 +08:00
boyu0 2c66f1b95e issue #2771: Implement the minimum set of physical API. Improve the PhysicsTest 2013-09-16 21:22:22 +08:00
James Chen b128018f76 Merge branch 'suppressed-C4996' of https://github.com/savdalion/cocos2d-x into savdalion-suppressed-C4996
Conflicts:
	extensions/CocoStudio/Armature/external_tool/GLES-Render.cpp
	samples/Cpp/TestCpp/Classes/ExtensionsTest/CocoStudioArmatureTest/ArmatureScene.cpp
2013-09-16 20:58:26 +08:00
signmotion 5dffb1b44e Deprecated methods are replaced (warning MSVC C4996 is suppressed). 2013-09-16 15:38:03 +03:00
minggo f47ce3f5bc Merge pull request #3607 from samuele3hu/developTest
Reset the addChild functions of SpriteBatchNode and add some lua deprecated functions
2013-09-15 22:45:32 -07:00
samuele3hu a3a915ead2 Reset the addChild functions of SpriteBatchNode and add some lua deprecated functions 2013-09-16 10:54:12 +08:00
James Chen dd7bfd7b60 Merge branch 'develop' of git://github.com/cocos2d/cocos2d-x into new-event-dispatcher-rebase
Conflicts:
	cocos2dx/CCDirector.h
	cocos2dx/keyboard_dispatcher/CCKeyboardDispatcher.h
	cocos2dx/keypad_dispatcher/CCKeypadDelegate.h
	cocos2dx/keypad_dispatcher/CCKeypadDispatcher.h
	cocos2dx/layers_scenes_transitions_nodes/CCLayer.h
	cocos2dx/menu_nodes/CCMenu.h
	cocos2dx/platform/CCAccelerometerDelegate.h
	cocos2dx/platform/android/CCAccelerometer.h
	cocos2dx/platform/ios/CCAccelerometer.h
	cocos2dx/platform/mac/CCAccelerometer.h
	cocos2dx/platform/win32/CCAccelerometer.h
	cocos2dx/script_support/CCScriptSupport.h
	cocos2dx/touch_dispatcher/CCTouchDelegateProtocol.h
	cocos2dx/touch_dispatcher/CCTouchDispatcher.h
	cocos2dx/touch_dispatcher/CCTouchHandler.h
	extensions/CocoStudio/Components/CCInputDelegate.h
2013-09-13 19:06:09 +08:00
samuele3hu d8bd65b2e8 issue #2784:Add class constructor js-binding document 2013-09-13 16:46:31 +08:00
samuele3hu 5ddd9ae23c issue #2784:Delete class destuctor js-binding and lua-binding document 2013-09-13 13:52:42 +08:00
samuele3hu a34ec99014 issue #2784:Add js-binding and lua-binding document 2013-09-13 11:41:20 +08:00
James Chen 6f37529236 [dispatcher] Adding 'Node::updateEventPriorityIndex' and making 'Node::addEventId(removeEventId)' method to be private. 2013-09-12 20:47:15 +08:00
James Chen da1101beeb [Dispatcher] New event dispatcher, first commit. 2013-09-11 22:09:34 +08:00
boyu0 7bba5f1b01 issue #2771: Add method Scene::createWithPhysics() end Scene::initWithPhysics() 2013-09-10 17:38:47 +08:00
boyu0 0806c5fe15 issue #2771: Fix CI compile errors. 2013-09-09 17:13:59 +08:00
boyu0 6585fd2162 issue #2771: Fix CI compile errors. 2013-09-09 16:58:55 +08:00
boyu0 cb08f2baf2 issue #2771: Change _physicsBody from node to sprite. Reimplement Scene::addChild. Adjust some API. 2013-09-09 16:36:19 +08:00
minggo c5b113c35e Merge pull request #3554 from ricardoquesada/fileutils_perf_improvements
Fileutils perf improvements
2013-09-08 19:50:12 -07:00
James Chen b8c82ae5a9 [develop] Warning fixes. 2013-09-08 11:26:38 +08:00
Ricardo Quesada b78382d5e5 Performance improvements in FileUtils / TextureCache
Added common "apple" platform to avoid duplicate files in FileUtils and other common files
Improves performance in fetching files.
2013-09-06 15:33:28 -07:00
Ricardo Quesada ee638b9c8b removes 'private' section from SpriteBatchNode 2013-09-02 16:56:14 -07:00
Ricardo Quesada 088a11ad0d Little performance improvements in SpriteBatchNode
_descendants: Array -> std::vector<Sprite*> since retain/release is no needed
Code is cleaner
Removes unused method (bug inherited from cocos2d-iphone)
Adds more doxygen strings
2013-09-02 16:44:25 -07:00
minggo 54a5f1e870 Merge pull request #3516 from minggo/perf_addchild_test_fix
Perf addchild test fix
2013-09-01 08:12:24 -07:00
minggo 2c6665ac3b add missing head 2013-09-01 22:41:11 +08:00
Ricardo Quesada b697e2bc99 uses std::sort() by default 2013-08-31 15:37:35 -07:00
Ricardo Quesada d41fdea999 objectComparisonLess -> nodeComparisonLess
and unified it.
No need to have 3 different copies.
The only copy is in CCNode.cpp
2013-08-31 15:18:28 -07:00
Ricardo Quesada 1393fb356a SpriteBatchNode: follows C++ best practices
removes hungarian notation
uses `int` instead of `unsigned int`
Add more asserts
2013-08-31 10:38:10 -07:00
James Chen 2578d15420 issue #2747: [Best C++ practice] Deprecating Sprite::displayFrame, adding Sprite::getDisplayFrame. 2013-08-28 18:17:05 +08:00
Ricardo Quesada 48ef1f24c3 fixes possible crash when using `SpriteFrameCache`
the returned dictionary was double-released. ouch.

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-26 18:08:56 -07:00
Ricardo Quesada 62c578667b API compliant with cocos2d-x best practices
Uses `int` instead of `unsigned int` as described in the cocos2d-x best practices

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-26 18:07:40 -07:00
Ricardo Quesada b6a90b81aa Adds missing include 2013-08-25 10:50:29 -07:00
Ricardo Quesada ea8eb601af Uses std::sort()
Uses std::sort() for inserting the nodes.

This code is not final, but preliminary results show that std::sort() is 60% faster

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-24 10:56:07 -07:00
Ricardo Quesada c4735af1ef Adds more constants to Color
Adds more constants for Colors, in particular to `Color4B` and `Color4F`

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-22 17:19:07 -07:00
Ricardo Quesada d7590affda Merge branch 'develop' into dictionary_array_fixes
Conflicts:
	cocos2dx/cocoa/CCArray.cpp
	cocos2dx/cocoa/CCArray.h
	cocos2dx/label_nodes/CCLabel.cpp
	extensions/CCArmature/datas/CCDatas.cpp
	extensions/CCArmature/display/CCDisplayManager.cpp
2013-08-21 21:27:44 -07:00
Ricardo Quesada 2e221ee6cc Array & Dictionary fixes
In many places `Dictionary` and `Array` are not being initialized. In fact `Dictionary` doesn't  have the `init()` method creating potential leaks.
Also in objects like `Armature` and the new `LabelTTF`, the `Array` object is not being used a pointer. So it doesn't use the 2 phase initialization, creating potential leaks.

This patch fixes all those issues.

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-21 20:12:09 -07:00
Ricardo Quesada 4104cdc20e Better destructors logs
Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-21 20:08:51 -07:00
minggo 2de8963a0a fix warnings caused by deprecating some functions of Array 2013-08-22 10:45:47 +08:00
Ricardo Quesada 6c02102b17 Fixes crash when reordering 2013-08-19 17:27:31 -07:00
Ricardo Quesada 511ec1cc5d Compiles with improved CCArray
Compiles both with std::vector or ccCArray
2013-08-19 17:09:28 -07:00
Timothy Qiu bc10c2a01f Change some doc due to the change of source code.
Fixed some incorrect use of doxygen command.
2013-08-01 17:47:37 +08:00
Timothy Qiu f0ee1e62c0 Fixes tag typos: deprecatd -> deprecated 2013-08-01 17:09:23 +08:00
Timothy Qiu 88e11cab84 Surround code in document with code/endcode tags. 2013-08-01 16:57:42 +08:00
Timothy Qiu 978fc634be Use C++ code in C++ comments.
Removed Hungarian notation from parts of the code.
2013-08-01 16:40:56 +08:00
boyu0 304d636deb Closed #2345 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into 2345 2013-07-29 11:40:18 +08:00
boyu0 cecfc13bc4 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into 2345 2013-07-27 22:06:30 +08:00
James Chen e66e429bb2 issue #2430: Moving enum type to class for CCBReader. 2013-07-27 21:44:49 +08:00
Ricardo Quesada 8bf24f0475 ccGLXXX -> GL::xxx
Adds GL namespace. Deprecates the `ccGLFunctionName` functions. New functions are `GL::functionName`

Also, converts the class `DrawPrimitives` into a namespace
2013-07-25 18:42:53 -07:00
Ricardo Quesada 191aaebe2a More const fixes
`Menu::STATE_XXX` -> `Menu::State::XXX`
Removes more Hungarian notation
Removes Configuration::Type <- I added it a few months ago, and it was not being used. It is safe to remove it
2013-07-25 17:47:42 -07:00
Ricardo Quesada 07c6c904cc Removes more Hungarian notation and more
Adds Touch::DispatchMode. Removes Layer::TouchDispatchMode
2013-07-25 16:27:24 -07:00