Ricardo Quesada
ba6ab126c6
More best practices fixes
...
- class order fixes
- static methods (creators) at the beginning
- then constructors / destructors
- then init
- more `const` fixes
- adds some const getters
- some getters have 2 versions: `const` and no-const version
- renamed CocosDenshion::sharedEngine -> getInstance()
2013-07-18 16:30:19 -07:00
James Chen
7de69edad8
Merge pull request #3187 from dumganhar/ricardoquesada-more_best_practices_fixes
...
Merge https://github.com/cocos2d/cocos2d-x/pull/3183
2013-07-18 08:52:15 -07:00
minggo
208c1312f4
Merge pull request #3171 from samuele3hu/ScriptHandler
...
issue #2377:Modify some tolua_*_open functions place and Modify Websocket,OpenGL,ScrollView handlers operation
2013-07-18 02:48:37 -07:00
James Chen
a425dd3dc0
Merge branch 'more_best_practices_fixes' of https://github.com/ricardoquesada/cocos2d-x into ricardoquesada-more_best_practices_fixes
...
Conflicts:
cocos2dx/actions/CCActionTiledGrid.h
2013-07-18 15:46:14 +08:00
Ricardo Quesada
6e25301b43
more best practices fixes
...
- Adds more `const` in getters
- Overriden methods have the `override` keyword
- Reorganizes the structure of the class:
# creators first, then constructor, destructors, init
# then overridden methods
# variables at the end
- removes Hungarian notation from parts of the code
2013-07-17 16:56:19 -07:00
James Chen
f4edc7a922
closed #2413 : Warning fixes for overload virtual functions.
2013-07-17 16:25:13 +08:00
samuele3hu
c9f0f09dac
issue #2377:Del CallFunc and CallFuncN handler operation and Modify LuaWebScoket linux config
2013-07-17 14:44:28 +08:00
Ricardo Quesada
9958e0d7f9
Adds more readability to the class internals.
...
Changes:
- creator (static) methods, and singleton methods (static) are always at the top of the class
- Constructors, destructros, and init methods comes next
- Then the instance methods for the class
- Then the overriden methods
- and finally the ivars
Also, overriden methos have the "override" context keyword
2013-07-15 12:43:22 -07:00
minggo
eada29ee40
issue #2404:created CCDprecated.h and move all global functions and variables into it
2013-07-15 16:14:26 +08:00
minggo
6abe6fce78
closed #2393 : fix conflicts
2013-07-12 18:04:32 +08:00
minggo
58fe3c7563
closed #2393 : fixed conflicts
2013-07-12 15:07:44 +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
minggo
c37af8fa77
issue #2393:mark functions in CCPointExtensions deprecated
2013-07-11 16:38:58 +08:00
James Chen
a5470aaa45
Minor fix in BezierTo::initWithDuration and BezierTo::clone.
2013-07-11 15:41:05 +08:00
minggo
630937aa3d
Merge pull request #3124 from dumganhar/rename-method
...
issue #2300 : A fix of missing invoking 'initXXX' in clone method.(FadeOut, DelayTime).
2013-07-10 00:49:58 -07:00
James Chen
d830bb5f96
'tile' --> 'getTile', 'orignalTile' --> 'getOrignalTile'
2013-07-10 14:17:42 +08:00
James Chen
a6db6db334
issue #2300 : A fix of missing invoking 'initXXX' in clone method.(FadeOut, DelayTime).
2013-07-10 14:16:42 +08:00
minggo
91fc0b2a45
Merge pull request #3114 from dumganhar/iss2388-default-texture
...
closed #2388 : Creating a default texture for CCSprite if setTexture(nullptr) is invoked.
2013-07-09 21:03:20 -07:00
James Chen
86b6f26cee
issue #2388 : Fixing a bug in FadeIn::clone.
2013-07-10 11:58:07 +08:00
Éloi Rivard
05ae6f8518
Fixed some warnings
2013-07-09 16:33:21 +02:00
James Chen
a517e68c59
closed #2379 : Removing CCZone.h/.cpp.
2013-07-09 14:50:31 +08: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
976d4ad11e
Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into remove-copywithzone
...
Conflicts:
cocos2dx/actions/CCActionInterval.cpp
cocos2dx/cocoa/CCDictionary.cpp
samples/Cpp/TestCpp/Classes/NodeTest/NodeTest.cpp
2013-07-09 09:48:41 +08:00
Ricardo Quesada
9fe9341646
From C++ best practices
...
Uses static_cast<> instead of C casting.
2013-07-08 14:38:14 -07:00
dumganhar
b41dd9277d
issue #2300 : Warning fixes.
2013-07-08 23:12:11 +08:00
dumganhar
8f900d02b8
issue #2300 : Removing all 'copyWithZone' pattern.
2013-07-08 23:05:47 +08:00
James Chen
37f9c4415a
vertex --> getVertex, originalVertex --> getOriginVertex.
2013-07-08 15:12:06 +08:00
James Chen
1eacab0278
Merge branch 'iss2129-remove_prefix' of https://github.com/minggo/cocos2d-x into minggo-iss2129-remove_prefix
2013-07-08 10:51:07 +08:00
Ricardo Quesada
c65b6f1417
Adds const to more getters
...
adds `const` to more getters.
2013-07-06 22:01:21 -07:00
minggo
dfde41b932
issue #2129:fix conflicts
2013-07-05 17:32:50 +08:00
minggo
04465622b7
issue #2129:remove prefix of types in ccTypes.h
2013-07-05 16:49:22 +08:00
minggo
7e56bb57c8
Merge pull request #3076 from samuele3hu/execDev
...
issue #2244:Modify CallFunc event bug and modify a function name to createCCBreader
2013-07-05 01:32:06 -07:00
James Chen
268245635d
issue #2373 : Fixing a bug in CardinalSplineTo::clone function. this->_points needs to be cloned.
2013-07-05 15:08:52 +08:00
samuele3hu
9eb31df9f3
issue #2244:Replace the tab with space
2013-07-05 11:29:21 +08:00
samuele3hu
2aef49f251
issue #2244:Replace the tab with space
2013-07-05 11:24:28 +08:00
samuele3hu
bb244edae6
issue #2244:Modify a function name to createCCBReader
2013-07-05 10:25:37 +08:00
samuele3hu
b0e4757c24
issue #2244:Modify CallFunc event bug and modify a function name to createCCBreader
2013-07-04 17:54:02 +08:00
samuele3hu
570f2663f4
issue #2244:Modify ScriptData struct and functions related with sendEvent
2013-07-04 15:44:42 +08:00
samuele3hu
9b08cee01f
issue #22434:make some execute funs into one funs in ScriptEngineProtocol
2013-07-02 15:23:51 +08:00
James Chen
1b3d0c39ad
issue #2322 : Action now is inherited from Object and Clonable now.
2013-06-23 17:22:23 +08:00
Ricardo Quesada
64d7cd404e
Removes copy from Point.
...
Adds clone instead
2013-06-21 15:13:52 -07:00
Ricardo Quesada
6c0c48a3a9
Removes CallFuncO and CallFuncND
...
...which can be simualted with CallFunc and CallFuncN.
Adds std::function() support to CallFuncN.
Adds more samples
2013-06-21 14:58:52 -07:00
James Chen
b74db627af
Don't make Action be inherited from Clonable. Why?? Please refer to https://groups.google.com/forum/?hl=en#!topic/cocos2d-js-devel/dGJYz9wIb4Q , but we need to find out the real reason why VS compiler generate linking errors.
2013-06-21 11:19:17 +08:00
James Chen
8b2b95ab4d
[WIN32] class Action : public Object, public Clonable --> class Action : public Clonable, public Object
2013-06-20 18:02:37 +08:00
James Chen
93b6328303
issue #2129 : Removing CC prefix for cocos2dx module.
2013-06-20 14:13:12 +08:00
Ricardo Quesada
159ef1ec68
clone() doesn't use copy constructor
...
... and other bug fixes
2013-06-18 15:06:53 -07:00
Ricardo Quesada
d35cc3b0fa
Merge branch 'develop' into clone_reverse_fixes
...
Conflicts:
cocos2dx/actions/CCAction.cpp
cocos2dx/actions/CCActionEase.cpp
cocos2dx/actions/CCActionGrid.cpp
cocos2dx/actions/CCActionInstant.cpp
cocos2dx/actions/CCActionInterval.cpp
scripting/javascript/bindings/generated
2013-06-18 09:59:34 -07:00