Commit Graph

4750 Commits

Author SHA1 Message Date
samuele3hu 32d056df18 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into TableView 2013-09-04 14:03:21 +08:00
samuele3hu 6815e01f84 issue #2764:Add TableView lua binding and releated test sample 2013-09-04 14:02:22 +08:00
minggo 9dedb072e6 Merge pull request #3528 from natural-law/ForPlugin
Modify the method cocos_android_app_init()
2013-09-03 22:50:40 -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
zhangbin b854c25103 Add parameter in method cocos_android_app_init() to initialize plugin. 2013-09-02 16:10:08 +08: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 b7258abbe6 Merge pull request #3510 from samuele3hu/iss2433-lua-bindings-generator-new
Iss2433:Add deprecated class and enums and modify some project config and test samples
2013-08-31 03:52:41 -07:00
Ricardo Quesada 9ad1ab50fd compiles on ARM 2013-08-30 21:08:28 -07:00
Ricardo Quesada 09c0234821 Ooops, reverting optimization for C
still valid for Neon, but the current optimization is not valid for C.

Please, apply this patch otherwise cocos2d won't work correctly
on simulator, windows, linux, mac, etc...
2013-08-30 20:59:01 -07:00
samuele3hu 8f338cc209 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into iss2433-lua-bindings-generator-new
Conflicts:
	tools/tolua/cocos2dx.ini
2013-08-30 15:21:59 +08:00
samuele3hu f56c6f7087 issue #2433:Modify platform config and some test samples 2013-08-30 11:56:35 +08:00
Ricardo Quesada c599ecb260 revert back fps interval to 0.1s
Why was it set to 2 seconds?
2013-08-29 20:05:14 -07:00
Ricardo Quesada 530a0119ae `getNodeToParent()` returns a `const &`
This gives a little performance improvement.

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-28 18:31:32 -07:00
Ricardo Quesada f4101d8b25 receives a `const &` instead of `const *`
If is more accurate since a `NULL` AffineTransform is not allowed.

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-28 18:30:00 -07:00
Ricardo Quesada 57ce406bdb More reliable profiling.
clock is the first instruction to execute on `EndTimingBlock`

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-28 18:29:09 -07:00
Ricardo Quesada c4eb6c99ab kazmath: removes unneeded `memcpy`
gains about 5% in improvement

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-28 18:28:30 -07:00
Ricardo Quesada 85ed6d620b fixes some macro names
kActionInvalidTag -> Action::INVALID_TAG
kNodeTagInvalid -> Node::INVALID_TAG

and it is no longer a `#define` but an `int`

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-28 12:43:20 -07:00
James Chen 2578d15420 issue #2747: [Best C++ practice] Deprecating Sprite::displayFrame, adding Sprite::getDisplayFrame. 2013-08-28 18:17:05 +08:00
James Chen 3ad8de9f15 Minor fix of 'Color4F(const Color3B& color3B)'. r(color3B.r) --> r(color3B.r/255.0f) 2013-08-28 17:15:35 +08:00
minggo 48444c864c Merge pull request #3484 from ledyba/develop
Override LayerMultiplex::init()
2013-08-27 19:08:39 -07:00
minggo 5834fc2f37 Merge pull request #3470 from boyu0/iss2494_Point_isSegmentIntersect_bug
closed #2494: Fix bug when two line is incident, the Point::isSegmentIntersect() may return wrong result
2013-08-26 23:27:00 -07:00
minggo faa94fd074 Merge pull request #3482 from minggo/release_unneeded_codes
Remove unneeded codes
2013-08-26 23:23:41 -07: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 b3b3583583 CCNode perf improvements
AffineTransforms uses a const global variable for the `IDENTITY`
`removeObject` only seeks the index once

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-26 18:04:51 -07:00
psi 9b352d5ff4 Merge remote-tracking branch 'parent/develop' into develop
merged from parent
2013-08-26 21:36:38 +09:00
psi 1beea771b4 type 2013-08-26 20:42:41 +09:00
psi f0620b0e85 add overrode init method for LayerMultiplex 2013-08-26 20:38:23 +09:00
James Chen 6501c9bffd Merge pull request #3479 from pyrasis/tizen_2.2
[Tizen] Update project files
2013-08-26 03:23:14 -07:00
minggo 61d82924be update Android.mk to remove deleted cpp files 2013-08-26 18:01:42 +08:00
minggo ec3fa59ae3 remove unneeded files 2013-08-26 17:40:25 +08:00
boyu0 1e452bf0bc closed #2494: add isLineOverlap, isLineParallel, isSegmentOverlap method to Point. 2013-08-26 13:45:45 +08:00
minggo c186ed6a7f Merge pull request #3447 from NatWeiss/patch-5
Fixes full paths on Android (cleaner)
2013-08-25 18:35:57 -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
Lee, Jae-Hong bbf9053788 [Tizen] Update project files.
- Update file list.
- change order of link files.
2013-08-25 02:22:50 +09: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
boyu0 9a3a03d6ef closed #2494: Fix some typo 2013-08-23 14:41:49 +08:00
boyu0 3f23a4a661 closed #2494: Fix bug when two line is incident, the Point::isSegmentIntersect() may return wrong result 2013-08-23 14:37:56 +08:00
minggo bbbfc82541 Merge pull request #3463 from ricardoquesada/perf_test_invocation
Adds 2 new performance tests
2013-08-22 20:26:54 -07:00
minggo b746bda738 Merge pull request #3461 from dumganhar/iss2650-remove-typeinfo
closed #2650: Remove ccTypeInfo since we could get the hash value from typeid(T).hash_code() if using c++11.
2013-08-22 20:26:25 -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 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
James Chen ca78d2d129 closed #2650: Remove ccTypeInfo since we could get the hash value from *typeid(T).hash_code()* if using c++11. 2013-08-22 18:16:50 +08:00
minggo ddb4219d24 Merge pull request #3457 from boyu0/iss2434_gen_android_mk
closed #2434: Add android_mk_generator.py to generate Android.mk
2013-08-22 03:05:11 -07:00