Commit Graph

85 Commits

Author SHA1 Message Date
Timothy Qiu 5ad5cfed7a Yet another documentation fix.
Modified mismatching parameters doc caused by refactoring.
Added the missing doc of some parameters.
Removed Hungarian notation from parts of the code.
2013-08-01 21:40:13 +08:00
Timothy Qiu bc10c2a01f Change some doc due to the change of source code.
Fixed some incorrect use of doxygen command.
2013-08-01 17:47:37 +08:00
Timothy Qiu 07dca78987 Documentation fix: add missing parameter name. 2013-07-29 19:36:47 +08:00
James Chen e66e429bb2 issue #2430: Moving enum type to class for CCBReader. 2013-07-27 21:44:49 +08:00
Ricardo Quesada 8bf24f0475 ccGLXXX -> GL::xxx
Adds GL namespace. Deprecates the `ccGLFunctionName` functions. New functions are `GL::functionName`

Also, converts the class `DrawPrimitives` into a namespace
2013-07-25 18:42:53 -07:00
minggo acdd1cfe9d issue #2430:move GLProgram enum into class 2013-07-25 17:48:22 +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
James Chen 7c7d21dd03 issue #2407: more best practices fixes, more getter and const.. 2013-07-19 14:57:54 +08: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
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
James Chen 39fc98d7fb issue #2403: Removing unused implemented methods like setOpacityModifyRGB, isOpacityModifyRGB since they're defined in their super class. 2013-07-15 16:08:42 +08:00
minggo 6abe6fce78 closed #2393: fix conflicts 2013-07-12 18:04:32 +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
minggo 04465622b7 issue #2129:remove prefix of types in ccTypes.h 2013-07-05 16:49:22 +08:00
Ricardo Quesada adaa72fbb4 Adds const to getters
Many getters in cocos2d are not declared as const.
This patch adds const to many cocos2d properties, specially in CCNode and
subclasses
2013-07-03 17:22:15 -07:00
James Chen 56f8ab2675 Typo fixes in CCNode.h. 2013-06-21 13:47:29 +08:00
James Chen 93b6328303 issue #2129: Removing CC prefix for cocos2dx module. 2013-06-20 14:13:12 +08:00
James Chen c0d44cb2e4 fixed #2129: Rename m_iVar to _var, remove CC prefixes. 2013-06-15 14:03:30 +08:00
minggo cd5bcb87af issue #2284: merge master and fixed some conflicts 2013-06-13 17:54:05 +08:00
chengstory cfb424a6c9 1. add Component struct. 2013-06-04 17:38:43 +08:00
Lucian Varlan a70569ff03 OnEnterTransitionDidFinish was called twice when a node is added in onEnter
Fix ported from cocos2d-iphone:
99b7bef880
2013-05-27 16:07:09 +03:00
Xavier Arias 71df5706bd Added const to CCNode::getChildrenCount() 2013-05-12 20:45:41 +02:00
Xavier Arias 1c6c13b3e5 Added const to CCNode's getTag & getContentSize 2013-05-09 00:20:08 +02:00
James Gregory 9500448f87 Get CCGrid to work. 2013-05-06 20:58:46 -07:00
Sam Clegg 87f57d6ca6 Fix CCPhysicsSprite getPosition variants
CCPhysicsSprite was overriding only some of the getPosition
methods on a node resulting in, for example, getPositionX
and getPositionY not working for physics nodes.

This change also makes this overloads shared between box2d
and chipmunk implementations.
2013-04-15 07:35:49 -07:00
wu.hao 521fac290d fix: can't generate CCNode.h's document with doxygen 1.8.3 2013-03-13 14:56:17 +08:00
James Chen 7093807f3f CCNodeRGA isn't a pure abstract class anymore. Updated tools/tojs/cocos2d.ini. 2013-03-01 10:41:06 +08:00
minggo cd4f18c48f issue #1686:synchronize CCLayer.cpp 2013-02-27 18:21:35 +08:00
minggo 94076a5b9c issue #1686:synchronize CCSprite.cpp 2013-02-27 15:30:49 +08:00
minggo f571d66ed7 issue #1686:synchronize CCNode.cpp 2013-02-27 14:48:19 +08:00
James Chen 7dc64fc9a6 issue #1686: sync to CCLayer 2013-02-27 09:38:30 +08:00
James Chen fdf8595353 tab -> 4 space. 2013-02-22 16:16:16 +08:00
James Chen 476e3801eb tab -> 4 space. 2013-02-22 16:15:17 +08:00
James Chen b54b924923 fixed #1743: Adding an additional transform for CCNode. 2013-02-22 16:01:49 +08:00
jiang xiaohua d875edbd74 Additional a transformation matrix, Used in is not parent-child relationship but we still need to maintain transformation parent-child Example: GameObject_Parent(CCNode; create from CCNode) GameObject_sub1(CCNode; Create from the same CCSpriteBatchNode,the node's parent is CCLayer ) RenderComponents1( Create form the same CCSpriteBatchNode) Components2 .... GameObject_sub2 (CCNode; Create from the CCNode,the node's parent is GameObject_Parent ) RenderComponents1( not used batchNode) Now, GameObject_sub1 not GameObject_Parent node, but I want it to simulate the change of the son is GameObject_Parent; I Need additional the father's matrix in child Node ; 2013-02-20 22:33:28 +08:00
James Chen f2303b854a Fixed a typo, and regenerated luabinding codes. 2013-01-23 15:59:13 +08:00
walzer db59b047f0 remove "inline" keyword from set/getPositionX/Y() methods to make the compilation property without additional flags. 2013-01-21 20:57:06 +08:00
walzer b1285ca7a7 CCNode: add [set|get]Position[X|Y](void) back. 2013-01-21 16:26:33 +08:00
walzer 996d2be2b6 CCNode: add [set|get]Position[X|Y](void) back. 2013-01-21 16:26:02 +08:00
walzer 7b16494862 well documented CCNode 2013-01-17 11:20:25 +08:00
James Chen 6565fa92cc fixed #1649: Changed return type to const reference for member variable access. 2013-01-14 15:51:53 +08:00
dualface 268aa45d2c rename CCNode:scheduleUpdateScriptHandlerWithPriority() to CCNode::scheduleUpdateWhitPriorityLua()
remove unused functions
2012-12-10 16:09:23 +08:00
dualface d854f68c63 [scripting] add CCNode::scheduleUpdateScriptHandlerWithPriority() 2012-12-10 13:51:37 +08:00
dualface c8753f72ef [scripting] add CCNode::scheduleUpdateScriptHandlerWithPriority() 2012-12-10 13:48:27 +08:00