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>
Modified mismatching parameters doc caused by refactoring.
Added the missing doc of some parameters.
Removed Hungarian notation from parts of the code.
Adds GL namespace. Deprecates the `ccGLFunctionName` functions. New functions are `GL::functionName`
Also, converts the class `DrawPrimitives` into a namespace
`Menu::STATE_XXX` -> `Menu::State::XXX`
Removes more Hungarian notation
Removes Configuration::Type <- I added it a few months ago, and it was not being used. It is safe to remove it
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
- 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()
- 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
- 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
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
... 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.