Commit Graph

60 Commits

Author SHA1 Message Date
samuelhu 1f07a659a6 issue #3069:Modify layer lua register and add some compatible lua binding functions 2013-10-31 09:49:04 +08:00
James Chen 48ce5e39fe EventDispatcher is managed by Director now, like Scheduler and ActionManager. 2013-10-26 15:04:01 +08:00
James Chen 9ed263056c Use eventDispatcher to dispatch event. Remove controller codes in Layer. 2013-10-25 10:53:46 +08:00
James Chen 1f3863e787 Event Dispatcher refactor commit. TestCpp could run. 2013-10-25 10:53:45 +08:00
minggo 6fc2be62f5 issue #2905: testcpp bild ok on Android 2013-10-15 18:00:03 +08:00
Dhilan007 5ea5c394e7 fix compile fail on vs2012. 2013-10-10 17:17:10 +08:00
samuelhu 6aa18423e6 issue #2792 : Performance Test: Sprite drawing 2013-09-30 16:22:55 +08:00
minggo 4c9771ba3c rename some class names to obey cocos2d-x coding style 2013-09-20 19:19:31 +08:00
James Chen f7fa92aea9 issue #2087: Sorts listeners only when flag is dirty. setPriority is only valid in fixed priority listener. 2013-09-18 17:46:00 +08:00
James Chen 9891077bba [dispatcher] Adding 'emit touch event' menu item. 2013-09-15 21:56:02 +08:00
James Chen e3cce1fd0b [dispatcher] 100 times for Touch event dispatch test. 2013-09-15 18:26:17 +08:00
James Chen 62a0dc41c3 [dispatcher] Adding TouchEvent dispatch test. 2013-09-15 17:49:36 +08:00
James Chen 997a5a36c1 [dispatcher] Renaming 'registerEventListenerXXX' to 'addEventListenerXXX'. 2013-09-14 09:02:49 +08:00
James Chen da1101beeb [Dispatcher] New event dispatcher, first commit. 2013-09-11 22:09:34 +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
minggo 8e0bce344c Merge branch 'alloc_perf_test' of https://github.com/minggo/cocos2d-x into alloc_perf_test 2013-09-06 13:45:59 +08:00
minggo 1664d3503d add PerformanceAllocTest.cpp/h to vs project and fix some compiling errors 2013-09-06 12:51:37 +08:00
Ricardo Quesada 1071ab9d37 Adds a new test: sprite with image 2013-09-05 21:35:15 -07:00
Ricardo Quesada 02500372ed Adds new perf test: alloc / dealloc 2013-09-05 20:02:04 -07:00
Ricardo Quesada be0c8cb1e8 adds two more perf tests
Node::addChild and Node::removeChild
2013-08-31 17:08:51 -07:00
Ricardo Quesada 0d96a0ce40 resets random seed before each test 2013-08-31 15:49:25 -07:00
Ricardo Quesada a5e0febc3e Adds better names to test
And new values for get(),add(),remove(),sort(),reorder()
2013-08-31 07:27:56 -07:00
Ricardo Quesada 5abb57e5f2 AddChild test fix
`sortAllChildren` should not be part of the test.
It is tested separatedly on another test
2013-08-31 06:59:44 -07:00
Ricardo Quesada c04409b6d5 More accurate test
Name is recalculated. No time is "wasted" in calculating it.

And `Visit` test uses `Node` objects instead of `Sprite`s. So `draw` is not taken into account, just the visit.

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-28 18:32:45 -07:00
Ricardo Quesada 7fb56bd123 Adds "Visit Scene Graph" tests
A new tests to measure the performance of visit

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-28 12:39:57 -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 364288cf66 Adds "Sort all Children" perf test
Adds a new perf tests: "sortAllChildren"

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-23 13:14:57 -07:00
Ricardo Quesada 055c566bc9 Adds missing #include 2013-08-22 19:30:20 -07:00
Ricardo Quesada 38bfadf7f3 Adds 2 new performance tests
Invocation with `for_each()` and using `arrayMakeObjectsPerformSelector`

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-22 18:21:52 -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 f0a2f6cbf8 purge profiler data one + or - is pressed
Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-21 20:02:50 -07:00
minggo 2de8963a0a fix warnings caused by deprecating some functions of Array 2013-08-22 10:45:47 +08:00
Ricardo Quesada cf02cb4581 Fixes names in Performance Node tests
Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-20 18:05:35 -07:00
Ricardo Quesada e5551b2872 Compiles both with std::vector and ccCArray
Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-20 16:06:51 -07:00
Ricardo Quesada c9b250d4a4 Adds new tests to tests
and enables profiling

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-20 14:18:32 -07:00
boyu0 70df1a6061 closed #2517: Use LocalVarToAuto.py to change Samples src file 2013-08-16 16:05:27 +08:00
Ricardo Quesada 058935aa8d Removes Hungarian notation
Removes Hungarian notation from the code.
2013-07-25 15:53:24 -07:00
Ricardo Quesada 16d0b43181 Constant fixes
Director::PROJECTION_2D, 3D,... -> Director::Projection::_2D, _3D, ...
Label::TEXT_ALIGNMENT_... -> Label::HAlignment::...
Label::TEXT_VERTICAL_ALIGNMENT_... -> Label::VAlignment::...
Texture2D::PIXEL_FORMAT_... -> Texture2D::PixelFormat::...
BlendFunc::BLEND_FUNC_DISABLE -> BlendFunc::DISABLE

Also adds more constant for BlendFunc
2013-07-25 13:36:19 -07:00
minggo 77afae124b issue #2430:move Texture2D enum into class 2013-07-25 19:52:44 +08:00
Ricardo Quesada 1f37d4d00a More best practices fixes and other bug fixes
- Adds `CC_REQUIRES_NULL_TERMINATION` to methods that require a NULL at the end
- Removes more Hungarian notations in samples
- s/sprite/scene: fix from previous commit
- `CCLog` -> `log`
- `getLayerNamed` -> `getLayer`
- `getPropertyNamed` -> `getProperty`
- and other small fixes
2013-07-23 15:20:22 -07:00
Ricardo Quesada c158cd5be6 More best practices fixes
- Removes Hungarian notation from the CPP test (there are still some Hungarian to remove)
- Label and MotionStreak: Uses the CL() entry for the tests (lambda functions)
2013-07-22 17:25:44 -07:00
minggo 6abe6fce78 closed #2393: fix conflicts 2013-07-12 18:04:32 +08:00
minggo 5d9fea1416 issue #2393:mark PointZero RectZero and SizeZero as deprecated 2013-07-12 14:47:36 +08:00
minggo 15096b0716 issue #2393:mark CCPointMake CCSizeMake CCRectMake as deprecated 2013-07-12 14:30:26 +08:00
minggo bb758df0d0 issue #2393:mark ccp as deprecated 2013-07-12 14:11:55 +08:00
Ricardo Quesada cf262c28e2 getInstance() / destroyInstance() are used...
... instead of sharedXXX / purgeXXX.
They are more C++ friendly, and also easier to remember.

common files + Mac files + iOS files + tests/samples files were updated.

The old methods are deprecated now.
2013-07-11 15:24:23 -07:00
James Chen 9b9fe67d25 issue #2387: Using static_cast instead of C style cast in iteration of CCArray. 2013-07-09 14:29:51 +08:00
James Chen e28cf8d258 issue #2129: Windows doesn't support 'initializer list', using constructor instead. 2013-07-07 21:08:14 +08:00
minggo 04465622b7 issue #2129:remove prefix of types in ccTypes.h 2013-07-05 16:49:22 +08:00
James Chen 1fb9f44d15 issue #2129: Removing CC prefix for samples module. 2013-06-20 14:17:10 +08:00