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
James Chen
1db847ad7c
issue #2344 : ScriptEngineManager::sharedManager --> ScriptEngineManager::getInstance, ScriptEngineManager::purgeSharedManager --> ScriptEngineManager::destroyInstance
2013-07-22 17:24:54 +08:00
James Chen
2228614748
issue #2344 : JSB also uses 'ScriptEngineManager::sharedManager()->getScriptEngine()->sendEvent(XXX);' now.
2013-07-22 17:12:53 +08:00
James Chen
b58d18e20a
More unsinged int -> int in some places where it could be difficult to find underflow bugs. And some warnings fix.
2013-07-22 14:28:19 +08:00
Ricardo Quesada
89d210bdb3
CCAssert -> CCASSERT
...
and other best pracitces like:
capacity and "index" are ints and not unsigned int (google's recomendation).
It is easier to detect underflow bugs like this
plus other minor improvements
2013-07-19 22:01:27 -07:00
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
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
Ricardo Quesada
5d499d351d
Some more changes to make the code more c++ friendly:
...
- nodeToParentTransform -> getNodeToParentTransform() (the same for its friends)
- Deprecates the old methods
- adds 'consts' to those methods
- boundingBox() -> getBoundingBox()
- the new one is const
- Deprecates the old method.
- Adds overrides keywords in CCNodeRGBA and CCArmature
- AffineMatrix are mutables
2013-07-16 18:16:04 -07:00
samuele3hu
241c01bec3
Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into ScriptHandler
2013-07-16 14:47:46 +08:00
James Chen
13e939b55e
Merge pull request #3157 from ricardoquesada/override_love
...
closed 2407: Adds more readability to the class internals.
2013-07-15 22:05:33 -07:00
samuele3hu
1761669832
issue #2377:Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into ScriptHandlerMgr
2013-07-16 12:47:40 +08:00
samuele3hu
c955a559bf
issue #2377:Del register/unregister function in .cpp and .h files
2013-07-16 09:55:06 +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
pktangyue
652f679d50
override updateDisplayedColor and updateDisplayedOpacity method in Scale9Sprite class
2013-07-15 20:13:30 +08: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
James Chen
6038d69183
issue #2397 : sharedSpriteFrameCache --> getInstance, purgeSharedSpriteFrameCache --> destroyInstance.
2013-07-12 14:12:58 +08:00
minggo
bb758df0d0
issue #2393:mark ccp as deprecated
2013-07-12 14:11:55 +08:00
James Chen
2c1b26acf8
issue #2397 : EGLView::sharedOpenGLView() --> EGLView::getInstance()
2013-07-12 13:11:21 +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
093d9a507c
closed #2396 : indentation fix.
2013-07-11 17:07:41 +08:00
minggo
c37af8fa77
issue #2393:mark functions in CCPointExtensions deprecated
2013-07-11 16:38:58 +08:00
pktangyue
8f7d9093c9
Merge remote-tracking branch 'origin/develop' into patch1
2013-07-11 16:08:46 +08:00
James Chen
5727d7099b
issue #2395 : Scale9Sprite's default anchor point is center now.
2013-07-11 13:59:57 +08:00
James Chen
5eb849a789
closed #2381 : ControlSwitch was displayed ugly when adding more than one switch.
2013-07-09 17:23:13 +08:00
James Chen
596c4c3cf2
issue #2387 : Using static_cast instead of C style cast while iterating CCDictionary.
2013-07-09 14:40:43 +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
minggo
87125e4b2a
issue #2129:use capital words for static const member variables
2013-07-08 18:11:32 +08:00
pktangyue
3e5c62f905
fix CCScale9Sprite CapInsets bug for rotated sprite frame
2013-07-08 17:00:27 +08: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
samuele3hu
ec2f5376f1
issue #2244:Add namespace to some enums
2013-07-05 16:05:38 +08:00
James Chen
ec902c3550
issue #2373 : Adding missing overload const getter functions.
2013-07-05 15:08:52 +08:00
minggo
7bcafb46a4
Merge pull request #3051 from samuele3hu/execDev
...
issue #2244:make some execute funs into one fun in ScriptEngineProtocol
2013-07-04 03:33:12 -07:00
samuele3hu
570f2663f4
issue #2244:Modify ScriptData struct and functions related with sendEvent
2013-07-04 15:44:42 +08:00
YangLe
18b662c942
fix CCScale9Sprite for rotated sprite frame
...
fix Issue #1145
2013-07-04 00:03:44 +08:00
samuele3hu
9b08cee01f
issue #22434:make some execute funs into one funs in ScriptEngineProtocol
2013-07-02 15:23:51 +08:00
Justin Hawkwood
9067918d73
Set textview_hidden to true on init
2013-06-26 13:44:49 -07:00
samuele3hu
e36c6f544a
issue #2276 : Modify ScrollView and LuaScrollView class
2013-06-21 14:17:41 +08:00
samuele3hu
35f0b07aa6
Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into scrollview_develop
2013-06-21 11:16:46 +08:00
James Chen
0879a12516
issue #2129 : Re-adds 'CC' prefix to objective-c classes for all projects.
2013-06-21 11:14:03 +08:00
samuele3hu
a862543a4c
Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into scrollview_develop
2013-06-21 10:44:03 +08:00
Ricardo Quesada
578bce4bc8
Re-adds 'CC' prefix to objective-c classes.
...
And also makes it compile on Mac, which was broken
2013-06-20 17:46:22 -07:00
samuele3hu
15c69563e2
issue #2276 : Add ScrollView lua binding and test sample
2013-06-20 22:39:30 +08:00
James Chen
cb67ed0227
issue #2129 : Removing CC prefix for extension module.
2013-06-20 14:15:53 +08:00
James Chen
e281fdfa73
issue #2129 : Renaming EditBoxImplIOS to EditBoxImplIOS_objc since it will be conflict with CCEditBoxImplIOS after removing CC prefix.
2013-06-20 13:07:09 +08:00