Commit Graph

1478 Commits

Author SHA1 Message Date
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 2013f841ad Merge branch 'develop' into more_best_practices_fixes 2013-07-23 13:36:22 -07:00
James Chen 12bb640307 issue #2378: ParticleTest: _emitter->getOpacityModifyRGB --> _emitter->isOpacityModifyRGB 2013-07-23 20:47:19 +08:00
minggo f6cfe3007f issue #2412:fix merging conflict 2013-07-23 10:41:11 +08:00
Ricardo Quesada c158cd5be6 More best practices fixes
- Removes Hungarian notation from the CPP test (there are still some Hungarian to remove)
- Label and MotionStreak: Uses the CL() entry for the tests (lambda functions)
2013-07-22 17:25:44 -07:00
James Chen 9b0f2a6e33 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into iss2344-js-scriptprotocol 2013-07-22 17:25:29 +08: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
minggo 8660543d77 Merge pull request #3198 from samuele3hu/deprecatedfunc
issue #2404:Move deprecated functions in Lua
2013-07-22 00:27:06 -07: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
James Chen e81c0f944d Merge branch 'ricardoquesada-property_synthesize_fixes' of https://github.com/dumganhar/cocos2d-x into ricardoquesada-property_synthesize_fixes 2013-07-22 11:47:08 +08:00
James Chen 604c30f102 Merge branch 'openal-deletebuffers' of https://github.com/rafaelx/cocos2d-x into rafaelx-openal-deletebuffers
Conflicts:
	CocosDenshion/include/SimpleAudioEngine.h
	samples/Cpp/TestCpp/Classes/CocosDenshionTest/CocosDenshionTest.cpp
2013-07-22 10:06:14 +08:00
samuele3hu eed0297c59 Merge branch 'deprecatedfunc' of https://github.com/samuele3hu/cocos2d-x; branch 'develop' of https://github.com/cocos2d/cocos2d-x into deprecatedfunc 2013-07-22 09:39:57 +08:00
samuele3hu 1f5f6e8fa2 issue #2404:Modify configs 2013-07-22 09:36:00 +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 4043ca7e23 Merge pull request #3197 from dumganhar/ricardoquesada-more_more_best_practices_fixes
Merge PR https://github.com/cocos2d/cocos2d-x/pull/3192
2013-07-19 08:15:39 -07:00
samuele3hu 90af254fac Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into deprecatedfunc 2013-07-19 14:57:38 +08:00
samuele3hu 3b97353e14 issue #2404:Modify Deprecated.lua and set platform config 2013-07-19 14:57:02 +08:00
Lee, Jae-Hong 980a053e50 [Tizen] Fix compile error.
- Tizen SDK doesn't support override keyword yet.
- add class keyword before friend keyword.
2013-07-19 15:16:05 +09:00
minggo 687c088b51 issue #2412:remove blackberry and marmalade port because they don't support c++11 2013-07-19 13:55:03 +08:00
minggo 7704ab9161 issue #2412:remove platform.cpp/.h 2013-07-19 13:42:45 +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
rafael.x c4ef2c9250 Added to various functions a check whether an OpenAL source exists on which OpenAL functions can be called.
Playback of background music starts now with the previously set volume, independent of the OpenAL source state.
Added a delete on the SimpleSoundEngine object within CocosDenshionTest::onExit() so that alutExit() gets called to release allocated resources by OpenAL.
2013-07-19 01:00:24 +02: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
samuele3hu 236b675e21 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into deprecatedfunc 2013-07-18 23:29:41 +08:00
samuele3hu 78cd3e561e issue #2404:Move deprecated functions to Deprecated.lua 2013-07-18 23:27:07 +08: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
James Chen bf45fa86fe Merge pull request #3176 from dumganhar/iss2413-overload-virtual
closed 2413: Warning fixes for overload virtual functions.
2013-07-18 00:33:53 -07:00
James Chen 8176f2f178 issue #2404: Fixing wrong replacement of shape.m_Vertex2F. shape.m_Vertex2F --> shape.m_vertex2 2013-07-18 14:48:18 +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 d6f713a31b Merge branch 'sanityzing_code' of https://github.com/ricardoquesada/cocos2d-x into ricardoquesada-sanityzing_code
Conflicts:
	samples/Cpp/TestCpp/Classes/Box2DTest/Box2dTest.h
2013-07-17 17:06:47 +08:00
James Chen f4edc7a922 closed #2413: Warning fixes for overload virtual functions. 2013-07-17 16:25:13 +08:00
samuele3hu 847b87b297 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into ScriptHandler 2013-07-17 14:45:02 +08:00
James Chen e7452bc912 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into iss2407-class-order 2013-07-17 14:36:55 +08:00
James Chen c31e8a8afc issue #2407: Updating SpriteTest.cpp, Don't hide virtual override function. 2013-07-17 14:33:15 +08:00
James Chen b6fda7bf7c issue #2407: Removing unused codes in Box2dTest.h 2013-07-17 14:32:38 +08:00
James Chen d3bf9935cd Merge pull request #3166 from dumganhar/iss2410-blackscreen-android
Merge PR https://github.com/cocos2d/cocos2d-x/pull/3117
2013-07-16 23:25:01 -07:00
James Chen 56419b9e90 issue #2410: [Android] Adding listener for CCDrawNode when application resume from background.
Reset the order of reloading shaders and textures in main.cpp.
2013-07-17 12:53:30 +08:00
samuele3hu 6ce5bbf09a Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into ScriptHandler 2013-07-17 10:16:11 +08:00
samuele3hu 0f1ac9983f issue #2377:Modify some tolua_*_open functions place and Modify Websocket,OpenGl,Scrollview handlers operation. 2013-07-17 10:15:25 +08: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
James Chen 80590dcfc1 Merge pull request #3132 from samuele3hu/ScriptHandler
issue 2377:Add scriptHandlerMgr to manager lua script handler
2013-07-16 02:40:50 -07:00
samuele3hu 596eb9df3e issue #2377:Modify tojs/cocos2dx.ini and a function name 2013-07-16 16:45:57 +08:00
James Chen 510b29a2ff Merge branch 'android-textures-fix' of https://github.com/jotel/cocos2d-x into shared-codes
Conflicts:
	cocos2dx/textures/CCTextureCache.cpp
2013-07-16 16:33:02 +08:00
James Chen b543de648c [iOS, Mac]Adding jsb_deprecated.js to resource folder for JSB projects. 2013-07-16 15:35:13 +08:00
James Chen f09cf35dba Updating JS-test to the latest version. 2013-07-16 15:31:23 +08: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