Commit Graph

125 Commits

Author SHA1 Message Date
James Chen fb1b510557 issue #2404: Deprecated some methods in NodeLoaderLibrary.h/.cpp. 2013-07-24 18:00:02 +08:00
James Chen 00999b464e issue #2404: Reverting callback interface for CCBReader. 2013-07-24 17:59:21 +08:00
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
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 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 6abe6fce78 closed #2393: fix conflicts 2013-07-12 18:04:32 +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
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
dumganhar 8f900d02b8 issue #2300: Removing all 'copyWithZone' pattern. 2013-07-08 23:05:47 +08:00
James Chen e28cf8d258 issue #2129: Windows doesn't support 'initializer list', using constructor instead. 2013-07-07 21:08:14 +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
samuele3hu b0e4757c24 issue #2244:Modify CallFunc event bug and modify a function name to createCCBreader 2013-07-04 17:54:02 +08:00
James Chen 00d6510a0d Merge pull request #3014 from wtyqm/develop
close #2338: fix sub ccb node resource root path bug
2013-06-26 20:49:00 -07:00
wtyqm ab36c433fa fix sub ccb node resource root path bug
When load sub ccb type node , create a new ccbreader from parent
ccbreader. Should copy ccbRootPath from parent, otherwise, load
resource will fail if sub ccb node resource use special path
2013-06-27 09:41:38 +08: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
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
Ricardo Quesada 71ea3c7a3c Fixed headers. Compiles but it doesn't link yet.
Many methods not implemented yet.
2013-06-15 18:54:34 -07:00
Ricardo Quesada e40adb7ae7 EaseActions and more
Added more reverse() const
2013-06-15 12:38:32 -07: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
Ricardo Quesada 83b43ab93e Adds CALLBACK_0, CALLBACK_1 and CALLBACK_2
Handy macros for callbacks.
Instead of:
	std::bind(func_ptr, instnace, std::placeholder::_1)
you use:
	CALLBACK_1(func_ptr, instance)

And also removes more warnings from the tests
2013-06-11 16:30:05 -07:00
James Chen ec8ab8bd8b Updating multi-platform-xxx template for win32. 2013-06-07 12:57:28 +08:00
James Chen d72e9d10b5 Updating multi-platform-xxx template for win32. 2013-06-07 12:50:02 +08:00
samuele3hu 6dd077b8bd issue #2103 add cocosbuilder lua test sample 2013-06-05 15:17:00 +08:00
Jaroslaw Lewandowski 3f7c506638 Ability to save/retrieve CCData into/from CCUserDefault 2013-05-29 01:06:41 +01:00
Alexander Markevich b7f4eea207 Assert statement modifies 'mType'. 2013-05-13 14:26:56 +03:00
dpull cec80e62ef fix Null pointer access 2013-05-08 15:53:54 +08:00
Rohan Kuruvilla b7aa71dcfc Fixing crash while trying to load sprite frame when the file is missing. Reports error instead 2013-05-07 14:53:41 -07:00
Rohan Kuruvilla 3d356d0a8f Removing setting ignoreAnchorPoint for child CCB files. Was causing a bug with positioning 2013-05-07 14:53:41 -07:00
James Chen 685fe16e10 fixed #2076: Adding a method CCBReader::setResolutionScale for setting resolution scale manually 2013-04-23 10:39:59 +08:00
Andrew Goulding 98a7b9636d Added CCB_MEMBERVARIABLEASSIGNER_GLUE_WEAK
We've found it useful to use CCB_MEMBERVARIABLEASSIGNER_GLUE_WEAK in
situations where we don't want CCObject derived pointers retained. It's
also useful if you want to assign a pointer dynamically cast to an
abstract base class such as CCLabelProtocol.
2013-04-19 08:06:25 +10:00
James Chen b228a13218 Merge branch 'patch-1' of https://github.com/zhanghaojie/cocos2d-x into iss2054-s9sp-anchorpoint-ccb 2013-04-15 11:45:59 +08:00
James Chen a5d78830db fixed #1860: onNodeLoaded will be called twice if ccb was added as a CCBFile. 2013-04-15 10:39:44 +08:00
James Chen a1568d1f74 fixed #2040: Getting scale property from sub-ccb node may trigger an assert of 'CCAssert( m_fScaleX == m_fScaleY, "CCNode#scale. ScaleX != ScaleY. Don't know which one to return");'. 2013-04-15 10:18:35 +08:00
James Chen 9c563a883f Fixing a typo. 2013-04-09 18:08:43 +08:00
harikrishnar 24c9668a1b Added a getter to get the size of the data
Added a getter to get the size of the data
2013-04-09 00:28:50 +05:30
zhanghaojie 4c67fd979e fix property anchorPoint of CCScale9Sprite
fix property anchorPoint of CCScale9Sprite doesn't work in ccb. Because initSpriteFrame method reset anchor point
2013-04-05 23:58:23 +08:00
James Chen e2e9bc8ce0 Fixing memoryleaks. 2013-03-21 09:00:55 +08:00
Rohan Kuruvilla 19b66049b3 Fixing issues with rotationX, rotationY in CCBuilderReader 2013-03-19 23:43:00 -07:00
Rohan Kuruvilla 54bb643ad3 Adding support for RotationX and RotationY to CCBReader 2013-03-19 23:42:59 -07:00
James Chen 37acbbe4fb Adding a space for target variable. 2013-03-20 10:44:21 +08:00