Commit Graph

272 Commits

Author SHA1 Message Date
lvlong 4f96037e15 1. Merge branch 'v3' of github.com:super626/cocos2d-x into v3
2. fix bug: memory leak!
2015-04-21 19:38:38 +08:00
Vladimir Perminov 4c33050536 Optimize Vec2
small function Vec2 move to Vec2.inl
Added:
setZero();

Change all code:
_vec2 = Vec2(x, y); -> _vec2.set(x, y);
Vec2 vec2 = Vec2(x, y); -> Vec2 vec2(x, y);
_vec2 += Vec2(x, y); -> _vec2.add(x, y);
_vec2 = Vec2::ZERO; -> _vec2.setZero();
Vec2 vec2(Vec2::ZERO); -> Vec2 vec2;
2015-04-19 20:40:52 +03:00
lvlong f55af40016 fix bug: label action in multiple cameras. 2015-04-17 10:19:20 +08:00
Wenhai Lin 1949348124 Physics: Fixed the rotation of physics body is wrong if the rotation for node is set before body attached. 2015-04-10 17:01:21 +08:00
Wenhai Lin 97082cb169 Physics: Fixed position of physics body is wrong when the position of parent node changes 2015-04-10 15:39:39 +08:00
minggo afd4e94c4c Merge pull request #10160 from lite3/wildpointer
fix wild pointer
2015-02-12 18:01:10 +08:00
minggo b233d6928e Merge pull request #10238 from Dhilan007/v3-scale9sprite-fix
Fixed Scale9Sprite can't run move/scale/rotation action in physics scene
2015-01-28 15:16:23 +08:00
Nite Luo 8f539a0107 Make PositionZ independent from global Z 2015-01-27 15:41:58 -08:00
Wenhai Lin f2335fb3bc Fixed Scale9Sprite can't run move/scale/rotation action in physics scene 2015-01-27 16:13:45 +08:00
kompjoefriek ca48c5e5dd Fixed lots of compiler warnings
- signed / unsigned mismatches
- using int as bool
- Removed throw() from CCFrame.h, why is explained here:
http://www.gotw.ca/publications/mill22.htm
2015-01-23 02:02:33 +01:00
lite3 0923a28e4d fix wild pointer 2015-01-21 21:01:57 +08:00
yangxiao 2a2330438c fix anchor point bug 2015-01-20 14:10:11 +08:00
Huabing.Xu af9e49b28d cache director pointer to improve rendering performance 2015-01-13 10:28:25 +08:00
minggo 465bf48442 Merge pull request #9879 from suzukaze/fix-indents
Replace tabs with spaces in cocos/2d dir
2015-01-09 14:59:27 +08:00
Takao Kato ba0beaffdc fixed getParentToNodeTransform. it returned a wrong transform if _transformDirty was true. 2015-01-09 09:58:09 +08:00
Jun Hiroe e4d560b658 Replace tabs with spaces in cocos/2d dir 2015-01-08 20:17:45 +09:00
Wenhai Lin 61438f7297 [Physics]Reduce temporary object creation and save mathematical labor 2015-01-08 14:25:06 +08:00
Wenhai Lin 8524a5fb97 Improve performance of physics 2015-01-07 17:08:04 +08:00
yangxiao 0db70977f9 wrong scale order 2014-12-25 10:39:48 +08:00
yangxiao 510633ba72 wrong spelling 2014-12-25 10:33:49 +08:00
yangxiao 6eed142e03 rename _rotation_quat to _rotationQuat 2014-12-24 18:12:00 +08:00
yangxiao 17207673ff merge cocos 2014-12-24 17:34:58 +08:00
yangxiao 88e0f025ef make it clean 2014-12-24 17:18:09 +08:00
yangxiao 22ae384edf Rotation representation with quaternion fix #9510 2014-12-24 17:07:54 +08:00
minggo dea483b6ef performance improve 2014-12-23 18:07:22 +08:00
yangxiao e8c7f30541 add quaternion 2014-12-22 17:23:44 +08:00
joewanchen 713d19c830 initialize _contentSizeDirty. 2014-12-15 19:43:54 +08:00
Dhilan007 4bc4f43b28 Reducing unnecessary function call 2014-11-24 15:27:20 +08:00
Vladimir Timofeev 2835b094da Cleanup order of fields initialization.
Make initialization order to match declarations.
This change twice reduces number of warnings when compiling on MacOS X with Xcode 6.1
Warnings was like "Field 'XXXX' will be initialized after field 'YYYY'"
2014-10-30 17:28:41 +03:00
Dhilan007 a5f838496c Move `CCCamera.cpp/h` `CCLight.cpp/h` into 2d 2014-10-20 16:25:24 +08:00
Dale Stammen ec5af7ae90 added missing CC_USE_PHYSICS 2014-10-14 14:12:27 -07:00
minggo 8aa03e107f Merge pull request #8209 from boyu0/fix_physics_crash
fix bug: physics crashes when remove/add children too quick.
2014-10-08 13:48:03 +08:00
Ricardo Quesada 342d934a0e scheduler and macro fixes
* kRepeatForever -> CC_REPEAT_FOREVER
* schedule_selector -> CC_SCHEDULE_SELECTOR
* [new] Node::schedule(const std::function<>& callback, const std::string &key)

Updates all smaples
2014-10-03 09:38:36 -07:00
Ricardo Quesada 42ace3e59c Adds lambda support in node
It is now possible to schedule lambda functions in Node::schedule()
No need to subclass
2014-10-02 21:25:55 -07:00
boyu0 2b0afa6063 fix bug: physics crashes when remove/add children too quick. 2014-09-30 08:15:46 +08:00
minggo 31c508ef6d deprecated Node::_setZOrder() 2014-09-09 10:55:27 +08:00
minggo 6b99ce6ec0 Merge pull request #7939 from minggo/remove-_setLocalZOrder
remove Node::_setLocalZOrder()
2014-09-09 10:49:09 +08:00
minggo 5cca8cc87d remove Node::_setLocalZOrder() 2014-09-03 17:26:50 +08:00
andyque fab9a0052b fix normalizedPosition bug 2014-09-03 09:16:31 +08:00
Ricardo Quesada 2c068cd1f5 Merge pull request #7915 from ricardoquesada/xcode_mark_todo_fixme
Adds MARK: TODO: FIXME: in code
2014-08-29 12:55:14 -07:00
Ricardo Quesada c149bfca00 Adds MARK: TODO: FIXME: in code
Replaces XXX with FIXME:
Xcode 6 beta 4 supports this new format
2014-08-29 12:54:24 -07:00
minggo 826e1018cb fix conflict 2014-08-29 16:55:09 +08:00
minggo afaea360fd Merge pull request #7908 from dabingnn/v3_fix_bugs
V3 fix bugs
2014-08-29 16:45:52 +08:00
minggo e4920ffdea fix conflict 2014-08-29 15:45:21 +08:00
minggo 3679d66c8e remove unneeded includes 2014-08-29 15:39:52 +08:00
Huabing.Xu 7c870cfcc1 fix skew matrix bug 2014-08-29 09:50:26 +08:00
Ricardo Quesada 20d22a1c8a Users new `// MARK: ` feature to mark sections
Instead of using `#praga mark` which was not compatible with other
compilers, it uses the `// MARK:` which is compatible with all compilers
2014-08-28 14:56:15 -07:00
minggo 6a8270f33b Merge pull request #7900 from minggo/setposition-optimize
not create Vec as possible for setting position
2014-08-28 14:31:54 +08:00
minggo 681c3c06f1 Merge pull request #7558 from newnon/v3_actions_by_tag_improvements
stopAllActionsByTag && removeAllActionsByTag
2014-08-28 14:24:37 +08:00
minggo 9fb977ff99 not create Vec as possible for setting position 2014-08-28 11:41:18 +08:00