Commit Graph

4523 Commits

Author SHA1 Message Date
James Chen a1c4c73c1c issue #2378: More setter/Getter, removing CC_PROPERTY_XXX macros. 2013-07-23 18:26:26 +08:00
James Chen ed5bd2309e issue #2378: Setter/Getter for AtlasNode, removing CC_PROPERTY_XXX macros. 2013-07-23 15:19:49 +08:00
James Chen 50ba072bac issue #2378: Setter/Getter for Director, removing CC_PROPERTY_XXX macros. 2013-07-23 15:19:26 +08:00
James Chen d6f15bc79f issue #2378: Setter/Getter for TextureAtlas, removing CC_PROPERTY_XXX macros. 2013-07-23 14:18:35 +08:00
minggo 8af95adbdf Merge pull request #3220 from minggo/develop
closed #2393:fix a bug caused by marking functions as deprecated
2013-07-22 23:17:03 -07:00
minggo b416511e6b closed #2393:fix a bug caused by marking functions as deprecated 2013-07-23 14:13:44 +08:00
James Chen 75a0cb6a29 issue #2378: Setter/Getter for CCTexture2D, removing CC_PROPERTY_XXX macros. 2013-07-23 14:05:05 +08:00
minggo f840564c05 issue #2412:remove platform.h/.cpp from vs project 2013-07-23 11:45:20 +08:00
minggo f6cfe3007f issue #2412:fix merging conflict 2013-07-23 10:41:11 +08:00
carlo morgantini 98bb0c26f3 working on the new label stuff 2013-07-22 14:43:45 -07:00
carlo morgantini 98c52cd98d new FontCache 2013-07-22 13:08:37 -07:00
carlo morgantini 5668607e0e merging with Ricardo stuff and fixin the new Label 2013-07-22 11:40:39 -07:00
bmanGH b983830bec 修复CCTexturePVR创建GLTexture时没有使用GLStateCache导致下一个Sprite::draw的时候可能会使用不正确的纹理 2013-07-23 02:23:40 +08:00
Éloi Rivard cca57e39de fixed a bug in emscripten makefile 2013-07-22 16:56:02 +02:00
James Chen 2aa1fae266 closed #2418: Unused spriteframes also need to be removed when purgeCachedData. 2013-07-22 18:13:13 +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 0164946779 issue #2344: ScriptEngineManager::sharedManager --> ScriptEngineManager::getInstance, ScriptEngineManager::purgeSharedManager --> ScriptEngineManager::destroyInstance. 2013-07-22 17:19:31 +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 a188fd4261 Merge branch 'ricardoquesada-property_synthesize_fixes' of https://github.com/dumganhar/cocos2d-x into ricardoquesada-property_synthesize_fixes 2013-07-22 14:45:38 +08:00
James Chen f32f1dff33 Cast fix: GLbyte --> GLubyte. 2013-07-22 14:45:01 +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
James Chen 50c280fb9d Fixing complication errors in CCTextureAtlas.cpp and jsb_cocos2dx_auto.cpp. 2013-07-21 19:10: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
Ricardo Quesada 2219bde542 bmfont sample working
...still TTF working OK
2013-07-19 16:49:51 -07:00
Ricardo Quesada 88928fff99 Merge branch 'developNewLabelMerge' into merge_new_label
Conflicts:
	cocos2d_libs.xcodeproj/project.pbxproj
	cocos2dx/textures/CCTexture2D.h
	samples/Javascript/Shared
2013-07-19 16:04:23 -07:00
Ricardo Quesada 1f0dac4ed0 Removes CC_PROPERTY / CC_SYNTHESIZE from some parts of the code
As agreed previously, CC_PROPERTY_XXX and CC_SYNTHESIZE_XXX should
not be used in the code.
This patch removes some of them. There are still many more to remove
2013-07-19 13:16:38 -07:00
carlo morgantini c977e6c3fa Merge remote-tracking branch 'ricorigin/developNewLabel_create' into developNewLabelMerge
Conflicts:
	cocos2dx/label_nodes/CCFontDefinition.cpp
	cocos2dx/label_nodes/CCFontDefinition.h
	cocos2dx/label_nodes/CCStringTTF.cpp
	cocos2dx/label_nodes/CCStringTTF.h
	samples/Cpp/TestCpp/Classes/LabelTest/LabelTest.cpp
2013-07-19 12:24:25 -07:00
carlo morgantini 9f629835de some more cleanup 2013-07-19 11:19:35 -07:00
carlo morgantini 5068622c04 working on the new atlas stuff 2013-07-19 10:33:26 -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
boyu0 ebafab4583 delete the file added by misstake. 2013-07-19 16:19:19 +08:00
boyu0 948acd6e29 Refactor CCTexture2D and CCImage 2013-07-19 15:37:54 +08:00
James Chen 7356e7c4c0 issue #2407: Minor fix in CCTMXLayer.h 2013-07-19 15:03:28 +08:00
James Chen 7c7d21dd03 issue #2407: more best practices fixes, more getter and const.. 2013-07-19 14:57:54 +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
James Chen 2dc6a58d2c Merge branch 'more_more_best_practices_fixes' of https://github.com/ricardoquesada/cocos2d-x into ricardoquesada-more_more_best_practices_fixes 2013-07-19 11:59:24 +08:00
James Chen 9270a28275 issue #2404: return nullptr in Clonable::copy(). 2013-07-19 11:56:01 +08:00
James Chen 6ffac07a81 More getter functions: e.g. MenuItemFont::fontSize --> MenuItemFont::getFontSize 2013-07-19 11:08:47 +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
carlo morgantini 31b40263a7 render and font IOS are no more 2013-07-18 14:14:09 -07:00
carlo morgantini 9c53da22fa some more cleanup 2013-07-18 14:11:12 -07:00
carlo morgantini 5480810a9c clean up and now using FreeType for rendering fonts 2013-07-18 13:13:41 -07: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
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
boyu0 76e05ee802 Merge https://github.com/cocos2d/cocos2d-x into 2345 2013-07-18 17:47:43 +08: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 6277ae191b issue #2404: Removing duplicated codes in platform/mac/CCImage.mm. 2013-07-18 13:40:32 +08:00
James Chen 469e13607a issue #2404: Marking CC prefix class as deprecated. 2013-07-18 13:38:23 +08:00
carlo morgantini 80247d409b rendering using free type. This commit is a work in progress and should NOT be used 2013-07-17 17:31:28 -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
boyu0 70140bb4cb refactor CCImage and CCTexture2D 2013-07-17 17:12:04 +08: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
samuele3hu c9f0f09dac issue #2377:Del CallFunc and CallFuncN handler operation and Modify LuaWebScoket linux config 2013-07-17 14:44:28 +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 53ace33d26 issue #2407: Adds more readability to the class internals for 'ParallaxNode'. 2013-07-17 14:32:10 +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 cd136e6330 issue #2410: [Reverting] Don't use 'ccGLEnableVertexAttribs' when using VAO, use 'glEnableVertexAttribArray' instead. 2013-07-17 13:55:31 +08:00
James Chen 209392085c issue #2410: Reverting some changes about VAO. And adding CC_ENABLE_CACHE_TEXTURE_DATA to 'EVNET_COME_TO_FOREGROUND' in DrawNode. 2013-07-17 13:53:16 +08:00
James Chen 7b51599cbd closed #2410: Fixing a bug that loading a wrong texture in ShaderCache::loadDefaultShaders. This could fix DrawNode displays nothing when resume. 2013-07-17 12:55:27 +08: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
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
carlo morgantini 9cfe1b7823 new stuff for FreeType 2013-07-16 15:18:39 -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
minggo 52a27c5fc9 Merge pull request #3118 from jotel/text-shadow-opacity-fix
Now opacity option for shadow in CCLabelTTF works.
2013-07-16 02:39:36 -07:00
James Chen 5b06824036 closed #2410: Formatting codes in Texture2D::initWithString. 2013-07-16 16:47:35 +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
samuele3hu 241c01bec3 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into ScriptHandler 2013-07-16 14:47:46 +08:00
James Chen 2ed5a40a36 Merge pull request #3146 from tks2shimizu/develop
closed 2408: Add componentsSeparatedByString function for String class.
2013-07-15 23:00:12 -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 f9268c8054 small API changes
::create()
and const chars
2013-07-15 14:35:25 -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 93e75bad9f Merge pull request #3154 from minggo/add-deprecated-header
Add deprecated header
2013-07-15 03:20:32 -07:00
minggo bee3b60b5a Merge branch 'add-deprecated-header' of https://github.com/minggo/cocos2d-x into add-deprecated-header 2013-07-15 17:52:20 +08:00
minggo cb271e21d8 issue #2404:fixed some compiling warnings 2013-07-15 17:51:36 +08:00
minggo dc2daf31ea issue #2404:fixed some compiling errors 2013-07-15 17:29:35 +08:00
minggo 07ae0c6da2 issue #2404:remove unneeded files 2013-07-15 17:18:30 +08:00
minggo b97ea0815f issue #2404:re-add some global functions and variables and mark them as deprecated 2013-07-15 16:42:31 +08:00
James Chen 3bdf6b9c69 issue #2397: Mark Application::sharedApplication as deprecated function. 2013-07-15 16:37:38 +08:00
James Chen 759831c1d8 issue #2397: Application::sharedApplication --> Application::getInstance. 2013-07-15 16:24:42 +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
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
James Chen b6f78b257f closed #2403: Reverting commit 239323c to fix the bug that Tint and Fade action can't work for ProgressTimer. 2013-07-15 16:06:59 +08:00
James Chen a6a237c017 Merge pull request #3144 from jllust/Fix#2354
closed 2401: CCLabelBMFont crashes in glDrawElements of CCTextureAtlas::drawNumberOfQuads sometimes
2013-07-14 20:53:15 -07:00
minggo 2c499a6a9a Merge pull request #2658 from michaelcontento/use-onWindowFocusChanged-instead-of-onPause
[Android] use onWindowFocusChanged(bool) instead of onResume()/onPause()
2013-07-14 20:37:23 -07:00
samuele3hu 80a6811f9f Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into ScriptHandler 2013-07-15 10:39:08 +08:00
samuele3hu 51c3ced4ba issue #2377:Modify the ScripthandlerMgr struct and modify some lua test samples 2013-07-15 10:38:16 +08:00
Tomoaki Shimizu 5e285add28 Add componentsSeparatedByString function for String class.
For String Class and string, there is no function to split the string.
So, I added componentsSeparatedByString function.
The function name is the same as NSString.
2013-07-14 17:56:34 +09:00
Jason Lust 5455d20fc1 Fix Issue #2354
Once a Texture Atlas VAO has deallocated by glDeleteVertexArrays. The GLStateCache may have been recently set to that vaoID. When shortly after a new glGenVertexArrays gets the same vaoID but the glBindVertexArray is bypassed because of the GLStateCache is not aware the VAO was just invalidated, and new vertex are copied to the old freed address.
2013-07-12 19:51:42 -07:00
carlo morgantini 45f9edcdc3 some more work on freetype 2013-07-12 17:31:23 -07:00
carlo morgantini a4073025d5 Merge remote-tracking branch 'ricorigin/freetype' into developNewLabel<<<<<<< HEAD
=======

>>>>>>> origin
2013-07-12 12:41:16 -07:00
carlo morgantini e4af13f1f6 use freetype 2013-07-12 12:39:47 -07:00
Ricardo Quesada a598db0db0 library compiled without bzip2 2013-07-12 11:58:42 -07:00
minggo 34b60e99f1 Merge pull request #3140 from minggo/iss2393-mark_deprecated
Use Point, Rect and Size member functions instead of global functions
2013-07-12 08:59:27 -07:00
minggo 249e67d1f7 closed #2393:fix a compiling error 2013-07-12 18:25:36 +08:00
minggo 6abe6fce78 closed #2393: fix conflicts 2013-07-12 18:04:32 +08:00
James Chen 8d0888aa60 issue #2398: Trigger an assert when the default texture of Sprite was created unsuccessfully. 2013-07-12 16:36:19 +08:00
James Chen ec1be2c1b2 closed #2398: [MAC] Adding Support for initializing Image with raw data. Otherwise, Sprite with no texture can't be created with default 2x2 texture which is RGBA raw data. 2013-07-12 16:35:07 +08:00
James Chen 1939534a2e [ci skip] Reverting cocos2dx/platform/android/java/project.properties. 2013-07-12 16:26:42 +08:00
James Chen 72f35aa14e issue #2397: Updating CCUserDefaultAndroid.cpp. 2013-07-12 15:32:37 +08:00
James Chen f7b9c54cd1 issue #2397: Updating CCUserDefaultAndroid.cpp. 2013-07-12 15:21:21 +08:00
minggo 58fe3c7563 closed #2393: fixed conflicts 2013-07-12 15:07:44 +08:00
James Chen d5447eaea5 issue #2397: Typo fix. 2013-07-12 15:01:51 +08:00
James Chen d1527f39f5 issue #2397: FileUtils::sharedFileUtils() is not needed to be defined in CCFileUtilsXXX.cpp 2013-07-12 15:00:10 +08:00
minggo 5d9fea1416 issue #2393:mark PointZero RectZero and SizeZero as deprecated 2013-07-12 14:47:36 +08:00
James Chen 4a7e884de8 issue #2397: UserDefault::sharedUserDefault() --> UserDefault::getInstance(), UserDefault::purgeSharedUserDefault() --> UserDefault::destroyInstance(); 2013-07-12 14:34:57 +08:00
minggo 15096b0716 issue #2393:mark CCPointMake CCSizeMake CCRectMake as deprecated 2013-07-12 14:30:26 +08:00
James Chen f8cd252c5c issue #2397: sharedNotificationCenter --> getInstance 2013-07-12 14:17:42 +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
James Chen a678d12615 issue #2397: FileUtils::sharedFileUtils --> FileUtils::getInstance() for all platforms 2013-07-12 12:03:39 +08:00
James Chen 88a28b041e issue #2397: Director::sharedDirector --> Director::getInstance() for all files. 2013-07-12 11:50:36 +08:00
carlo morgantini ea72e046c6 Merge remote-tracking branch 'ricorigin/freetype' into developNewLabel
Conflicts:
	cocos2d_libs.xcodeproj/project.pbxproj
2013-07-11 17:38:07 -07:00
Ricardo Quesada 2d0aed4f0e libfreetype for iOS and Mac
libfreetype for iOS and Mac
2013-07-11 17:20:10 -07:00
carlo morgantini a034d5bff5 ready to integrate FreeType 2013-07-11 17:17:29 -07:00
carlo morgantini 1caa6dfbd7 start integrating FreeType for font rendering 2013-07-11 15:43:45 -07: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
carlo morgantini 002ae77698 new dynamic TTF label stuff 2013-07-11 14:41:03 -07:00
samuele3hu c4de89870a Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into ScriptHandler 2013-07-11 16:43:25 +08:00
minggo c37af8fa77 issue #2393:mark functions in CCPointExtensions deprecated 2013-07-11 16:38:58 +08:00
James Chen a5470aaa45 Minor fix in BezierTo::initWithDuration and BezierTo::clone. 2013-07-11 15:41:05 +08:00
James Chen f414803e92 Minor fix of PR 3128. 2013-07-11 15:36:00 +08:00
samuele3hu ff29d2b5d4 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into ScriptHandler 2013-07-11 13:40:16 +08:00
samuele3hu 9007b9feee issue #2377:Replace the CallFunc script Handler and repair Testlua Bug 2013-07-11 13:38:25 +08:00
Ricardo Quesada 48b1ed9f8f re adds copy() as a deprecated method
...in order to make easier the port to v3.0
2013-07-10 18:11:37 -07:00
carlo morgantini 9264b3de1d more clean up 2013-07-10 11:59:05 -07:00
minggo bbaa938cf7 Merge pull request #3121 from tks2shimizu/develop
Add append function for String class.
2013-07-10 00:58:43 -07:00
minggo df53e5235c Merge pull request #3125 from dabingnn/Iss2386-ClippingNode-AsChild-Bug
closed issue #2386 : ClippingNode works wrongly when being set as a child
2013-07-10 00:54:44 -07:00
minggo 630937aa3d Merge pull request #3124 from dumganhar/rename-method
issue #2300: A fix of missing invoking 'initXXX' in clone method.(FadeOut, DelayTime).
2013-07-10 00:49:58 -07:00
Huabing.Xu 010a33c009 closed issue #2386 : Fix bug : add a new method to clear the stencil buffer bit used by ClippingNode 2013-07-10 15:33:43 +08:00
James Chen 146914b288 Merge pull request #3123 from pyrasis/tizen_2.2
Support Tizen 2.2 SDK
2013-07-10 00:15:31 -07:00
samuele3hu 31d0e492c2 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into ScriptHandler 2013-07-10 15:05:02 +08:00
samuele3hu cf1cbe1bd6 issue #2377:add scriptHandlerMgr and modify ActionManager.lua 2013-07-10 15:04:00 +08:00
James Chen d830bb5f96 'tile' --> 'getTile', 'orignalTile' --> 'getOrignalTile' 2013-07-10 14:17:42 +08:00
James Chen a6db6db334 issue #2300: A fix of missing invoking 'initXXX' in clone method.(FadeOut, DelayTime). 2013-07-10 14:16:42 +08:00
Lee, Jae-Hong 9322e5594b Support Tizen 2.2 SDK.
- Update project files.
- based on develop branch.
- HelloCpp, SimpleGame, HelloLua, TestLua available to build.
2013-07-10 13:04:08 +09:00
minggo 91fc0b2a45 Merge pull request #3114 from dumganhar/iss2388-default-texture
closed #2388: Creating a default texture for CCSprite if setTexture(nullptr) is invoked.
2013-07-09 21:03:20 -07:00
James Chen 86b6f26cee issue #2388: Fixing a bug in FadeIn::clone. 2013-07-10 11:58:07 +08:00
James Chen 7594136985 issue #2388: Updating comments for cc_2x2_white_image variable. 2013-07-10 11:57:35 +08:00
James Chen ad8a3ac1b5 issue #2388: One more static_cast. 2013-07-10 10:08:07 +08:00
James Chen f6e0b6ca0b issue #2388: Checking whether the texture exists. 2013-07-10 10:07:45 +08:00
Tomoaki Shimizu eca7db6a50 Add append function for String class.
The append function is useful when adding a string.
So, I added it to String class.
2013-07-10 10:50:13 +09:00
Jaroslaw Lewandowski 1fcd6883f1 fixing Linux build 2013-07-09 23:32:10 +01:00
Jaroslaw Lewandowski f1023232db Now opacity option for shadow in CCLabelTTF works. 2013-07-09 23:23:41 +01:00
Jaroslaw Lewandowski 626ba2686f Solving 'black screen' on android 2013-07-09 21:21:43 +01:00
Éloi Rivard 05ae6f8518 Fixed some warnings 2013-07-09 16:33:21 +02:00
Éloi Rivard e6354bbf0a Various linux eclipse projects compilation fixes 2013-07-09 15:23:19 +02:00
Éloi Rivard e5db95d2b9 Added deprecated functions ignoring in libcocos2d eclipse project 2013-07-09 15:23:19 +02:00
Éloi Rivard d853934f1b Added -std=c++0x flag in C++ eclipse projects 2013-07-09 15:23:19 +02:00
James Chen 87cec1622c closed #2388: Creating a default texture for CCSprite if setTexture(nullptr) is invoked. 2013-07-09 18:33:36 +08:00
James Chen f752196f8e issue #2379: Removing CCZone.cpp/.h for win32 project. 2013-07-09 15:42:37 +08:00
James Chen 582baa0bac issue #2379: Removing CCZone.cpp for Makefile. 2013-07-09 15:31:28 +08:00
James Chen 7f6811e61e issue #2379: Removing unused file - cocos2d.vcxproj.filter.orig. 2013-07-09 15:30:50 +08:00
James Chen a517e68c59 closed #2379: Removing CCZone.h/.cpp. 2013-07-09 14:50:31 +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 e5a80eed91 fixed conflict 2013-07-09 10:39:16 +08:00
James Chen 976d4ad11e Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into remove-copywithzone
Conflicts:
	cocos2dx/actions/CCActionInterval.cpp
	cocos2dx/cocoa/CCDictionary.cpp
	samples/Cpp/TestCpp/Classes/NodeTest/NodeTest.cpp
2013-07-09 09:48:41 +08:00
Ricardo Quesada 9fe9341646 From C++ best practices
Uses static_cast<> instead of C casting.
2013-07-08 14:38:14 -07:00
dumganhar b41dd9277d issue #2300: Warning fixes. 2013-07-08 23:12:11 +08:00
dumganhar 9b126e79d7 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into remove-copywithzone
Conflicts:
	scripting/lua/cocos2dx_support/LuaCocos2d.cpp
2013-07-08 23:09:48 +08:00
dumganhar 8f900d02b8 issue #2300: Removing all 'copyWithZone' pattern. 2013-07-08 23:05:47 +08:00
minggo 87125e4b2a issue #2129:use capital words for static const member variables 2013-07-08 18:11:32 +08:00
James Chen d64fb7339c issue #2129: FontDefinition* --> const FontDefinition& 2013-07-08 15:18:16 +08:00
James Chen fe2a3c3d69 issue #2129: Using 'const FontDefinition&' instead of 'FontDefinition*' and resolving memory leak in FontDefinition LabelTTF::getTextDefinition() 2013-07-08 15:17:37 +08:00
James Chen 16ec50e86b issue #2129: Adding explicit for 'Color4B(const Color4F &color4F);' and 'explicit Color4F(const Color3B &color3B)'. 2013-07-08 15:16:22 +08:00
James Chen 4a0fe35d5a iss2129: bug fix in CCDrawNode.cpp 2013-07-08 15:15:22 +08:00
James Chen 37f9c4415a vertex --> getVertex, originalVertex --> getOriginVertex. 2013-07-08 15:12:06 +08:00
James Chen 3d4005ebbc issue #2129: Bug fix in "Color4B::Color4B(const Color4F &color4F)". 2013-07-08 14:53:47 +08:00
James Chen 1eacab0278 Merge branch 'iss2129-remove_prefix' of https://github.com/minggo/cocos2d-x into minggo-iss2129-remove_prefix 2013-07-08 10:51:07 +08:00
James Chen e28cf8d258 issue #2129: Windows doesn't support 'initializer list', using constructor instead. 2013-07-07 21:08:14 +08:00
Ricardo Quesada c65b6f1417 Adds const to more getters
adds `const` to more getters.
2013-07-06 22:01:21 -07:00
James Chen db0a15b02f Merge branch 'iss2129-remove_prefix' of https://github.com/minggo/cocos2d-x into minggo-iss2129-remove_prefix 2013-07-06 15:19:09 +08:00
James Chen 43260a2bf1 [Windows] Fixing complication errors for WINDOWS. 2013-07-06 10:49:13 +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
James Chen 268245635d issue #2373: Fixing a bug in CardinalSplineTo::clone function. this->_points needs to be cloned. 2013-07-05 15:08:52 +08:00
James Chen ec902c3550 issue #2373: Adding missing overload const getter functions. 2013-07-05 15:08:52 +08:00
James Chen d2746bbe90 issue #2373: Removing inline for virtual function. Adding more const getter functions. 2013-07-05 15:08:52 +08:00
samuele3hu 9eb31df9f3 issue #2244:Replace the tab with space 2013-07-05 11:29:21 +08:00
samuele3hu 2aef49f251 issue #2244:Replace the tab with space 2013-07-05 11:24:28 +08:00
James Chen 267823d473 Merge pull request #3077 from dumganhar/iss2371-template
Updating multi-platform-template for iOS and Mac, and deleting cocos2dx/proj.ios and cocos2dx/proj.mac since it isn't needed anymore, moving the prefix header file to previous folder.
2013-07-04 20:01:33 -07:00
James Chen a25dce5b2d issue #2371: Deleting cocos2dx/proj.ios and cocos2dx/proj.mac since it isn't needed anymore, moving the prefix header file to previous folder. 2013-07-05 10:52:46 +08:00
samuele3hu bb244edae6 issue #2244:Modify a function name to createCCBReader 2013-07-05 10:25:37 +08:00
samuele3hu c0e89a4ee9 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into execDev 2013-07-05 09:49:01 +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 b0e4757c24 issue #2244:Modify CallFunc event bug and modify a function name to createCCBreader 2013-07-04 17:54:02 +08:00
James Chen a67ac821f7 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into iss2371-add-lua-ios-mac
Conflicts:
	scripting/lua/cocos2dx_support/LuaCocos2d.cpp
2013-07-04 17:15:09 +08:00
James Chen 84ce80dcd2 issue #2371: [Mac] glClearDepth --> glClearDepthf, glDepthRange --> glDepthRangef, glReleaseShaderCompiler --> NULL . 2013-07-04 16:31:50 +08:00
James Chen 50a8067b74 issue #2371: std::vector<std::string>::iterator --> auto in CCFileUtils.cpp. 2013-07-04 16:30:35 +08:00
samuele3hu 570f2663f4 issue #2244:Modify ScriptData struct and functions related with sendEvent 2013-07-04 15:44:42 +08:00
minggo ddf54a4f49 Merge pull request #3054 from simpliplant/windows_keyboard_support
Hardware keyboard support (Windows support + Mac fix)
2013-07-03 23:37:13 -07:00
minggo 4880543305 Merge pull request #3073 from xxuejie/add-namespace-to-macro
Add namespace prefix to selector macros
2013-07-03 23:28:16 -07:00
minggo f019700b91 Merge pull request #3072 from minggo/const_love
Fix compiling errors of #3070
2013-07-03 23:19:14 -07:00
Xuejie Xiao a1fbee0bdf Merge remote-tracking branch 'upstream/develop' into add-namespace-to-macro
Conflicts:
	cocos2dx/cocoa/CCObject.h
2013-07-04 13:59:36 +08:00
Xuejie Xiao 3401c909d8 Add namespace prefix to selector macros 2013-07-04 13:35:11 +08:00
minggo c327bc7906 issue #2373:add const in pkg files 2013-07-04 12:50:17 +08:00
samuele3hu c5e5c49332 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into execDev 2013-07-04 09:52:28 +08:00
Ricardo Quesada 1d011510af setTexParams() is passed as a const reference
All structs (PODs), should be passed as const reference.
eg: Size, Point, ccTexParams, etc... should be passed as const reference.
2013-07-03 17:59:22 -07:00
Ricardo Quesada 216c6eada5 Adds more const in getters
In Sprite and Texture2D
2013-07-03 17:44:41 -07: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
Ricardo Quesada 77dbe995d4 Merge branch 'develop' into ios_mac_one_project 2013-07-03 11:39:00 -07:00
James Chen 3fa5c776b8 issue #2359: Using PositionColor shader when texture is NULL in Sprite.
TODO: PostionTextureColor shader should support empty texture.
2013-07-03 23:34:45 +08:00
Rene Klacan 294f9f34f7 KEYBOARD_SUPPORT renamed to CC_KEYBOARD_SUPPORT 2013-07-03 15:51:24 +02:00
James Chen 7892f1ac9d Merge pull request #3053 from dumganhar/iss2285-js-motionstreak
Adding MotionStreak test for TestJavascript.
2013-07-03 01:36:07 -07:00
Rene Klacan 92c382be04 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into windows_keyboard_support 2013-07-03 10:19:35 +02:00
James Chen 501afdd2e3 closed #2359: Sprite will become white block when using CCControlSwitch.
setShaderProgram should not be in Sprite::setTexture since setTexture is not related to shader.
2013-07-03 16:16:30 +08:00
James Chen 331c688f6f Merge pull request #3063 from dumganhar/DarraghCoy-selector_cast_safety
Merge PR#3058:  Adding extra safety to selector casting macros
2013-07-03 01:09:09 -07:00
minggo bf47cf55c7 Merge pull request #3059 from jotel/shadow-fix
Text Shadows fix
2013-07-03 01:00:03 -07:00
minggo 2f88109a96 Merge pull request #3055 from DarraghCoy/add_rect_union_with_rect
Add Rect::unionWithRect
2013-07-03 00:42:55 -07:00
minggo de15064317 Merge pull request #3062 from minggo/iss2346-opengl-error
Fixed a bug in CCTMXLayer when set uniform
2013-07-03 00:31:10 -07:00
minggo f089e62e8f closed #2361:fix a crsash caused by Set::removeAllObjects 2013-07-03 15:26:58 +08:00
minggo 1bd5398f91 Merge branch 'cc_draw_solid_circle' of https://github.com/DarraghCoy/cocos2d-x into cc_draw_solid_circle 2013-07-03 14:45:36 +08:00
samuele3hu 5a64c9e1b3 issue #2244:Add some constructor 2013-07-03 14:19:00 +08:00
James Chen 661a934e82 Merge branch 'selector_cast_safety' of https://github.com/DarraghCoy/cocos2d-x into DarraghCoy-selector_cast_safety 2013-07-03 14:06:53 +08:00
samuele3hu 82ba8b0198 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into execDev 2013-07-03 11:20:17 +08:00
Ricardo Quesada 2b73d0cb5f ios and mac projects unified in one simple xcode project
Not finished yet:
 - iOS only includes Test Cpp (Simple Game not working yet on iOS)

It is easier to maintain and add more targets, files, etc.
2013-07-02 18:20:38 -07:00
Jaroslaw Lewandowski d26fa847d8 - Fixing shadows for text with stroke in iOS
- Improved text shadows in Android (they look the same as in iOS)
2013-07-02 22:45:07 +01:00
Darragh Coy abbbc3191e Add extra safety to selector casting macros
Use static_cast<> instead of C-Style casts in the callfunc0_selector() etc. series of macros as this will allow the compiler to perform more stringent error checking and catch out cases where incompatible function signatures are being casted. This helps prevent very subtle and difficult to track down bugs where the signature of the function being casted is not what Cocos2dx expect - which can cause strange things to happen and corrupt the current stack frame.
2013-07-02 14:36:09 -07:00
Darragh Coy e6270e64de Bugfixes to the Set class.
1: If adding an object to the container then only retain the object again provided it's not already been added. The underlying std::set does not support duplicate entries. (see: www.cocos2d-x.org/boards/6/topics/10876)
2: When removing an object only CC_SAFE_RELEASE it if it was actually contained in the set. (see: http://www.cocos2d-x.org/boards/6/topics/10876)
3: Fix a bug in 'removeAllObjects' where the underlying std::set container was not being cleared. (see: https://github.com/cocos2d/cocos2d-x/issues/2283)
2013-07-02 14:24:14 -07:00
Darragh Coy e247b5d960 Add ccDrawSolidCircle
Similar to ccDrawCircle() primitives drawing function except the circle is filled.
2013-07-02 13:39:16 -07:00
Darragh Coy da58f035c5 Add CCRect::unionWithRect
Add a new CCRect utility function called 'unionWithRect' which computes the minimum rectangle that contains the current rectangle and another given rectangle, similar to to the following .NET function: http://msdn.microsoft.com/en-us/library/ms521839.aspx
2013-07-02 11:39:49 -07:00
James Chen ed1fa76fd6 issue #2285: ccColor3B --> const ccColor3B& for MotionStreak::create. 2013-07-02 17:46:45 +08:00
Rene Klacan fc8b60a2cf fixed issues on win32 and mac keyboard 2013-07-02 11:39:18 +02:00
minggo 55202b978a Merge pull request #3048 from dabingnn/iss2328-refractor-etc
Iss2328 refractor etc
2013-07-02 01:37:55 -07:00
Huabing.Xu 5929c7662c issue #2328 refractor etc support:
1. GL_ETC1_RGB8_OES not defined will return not support hardware etc
2. remove some space and comments
2013-07-02 15:36:47 +08:00
samuele3hu ec801ae89d Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into execDev 2013-07-02 15:29:19 +08:00
samuele3hu 9b08cee01f issue #22434:make some execute funs into one funs in ScriptEngineProtocol 2013-07-02 15:23:51 +08:00
James Chen b843d3cd88 LayerColor::initWithColor should return false when Layer::init() returns false. 2013-07-02 14:45:06 +08:00
Huabing.Xu 5aa0299160 adjust cocos2d.vcxproj.filters 2013-07-02 14:09:01 +08:00
Huabing.Xu 041bef148a Merge branch 'origin/develop'
Conflicts:
	cocos2dx/proj.ios/cocos2dx.xcodeproj/project.pbxproj
	cocos2dx/proj.win32/cocos2d.vcxproj.filters
2013-07-02 13:47:02 +08:00
James Chen 4e5ee103ec Fixing errors on windows. 2013-07-01 18:22:09 +08:00
Huabing.Xu 9642930779 give Texture2D::_pixelFormat a default value in construction 2013-07-01 18:16:56 +08:00
Huabing.Xu 4e9e893c8e 1. Add C++ code to decode ETC file
2. Configuration and function supportsETC()
2013-07-01 17:40:57 +08:00
James Chen c2ce65a32b issue #2347: Compiled ok for android, marmalade and nacl, windows needs to be tested too. 2013-07-01 17:35:51 +08:00
James Chen 1ae41d07aa closed #2347: Keyboard is supported from cocos2d-x 3.0. 2013-07-01 17:15:49 +08:00
James Chen 0d040bae76 closed #2347: Macros like CC_KEYBOARD_SUPPORT should not be in header file. 2013-07-01 16:48:42 +08:00
minggo ce3cea2fdb closed #2346: use shader program to set uniform 2013-07-01 16:02:46 +08:00
samuele3hu fe8e30c3e0 issue #2243:Add a uniform fund in ScriptEngineProtocol 2013-07-01 15:04:14 +08:00
Squallium c770a4bdc8 Added ccFPSImages entity as linked resource 2013-06-30 22:00:29 +02:00
Sergey Shambir 1c52517770 CocosDenshion: added effects customization for 7 platforms.
1. Pitch/pan/gain support on iOS, Mac, Linux+FMOD, Android+SoundPool;
2. Unified OpenAL code with pitch/pan/gain on Linux, Tizen, Blackberry,
Native Client;
3. Bug fixed: rewindBackgroundMusic() no longer stops music on unified
OpenAL engine.
4. Optional mp3 support for Linux+OpenAL (OPENAL_MP3 make option);
5. Pan/gain (not pitch) support for Android+OpenES.
6. Reorganized CocosDenshion tests in TestCpp.

Known issues:
1. No support for windows, emscrippten, marmalade.
2. No pitch effect on Android+OpenES. It requires backend redesign:
http://code.google.com/p/android/issues/detail?id=24592
2013-06-29 13:44:16 +04:00
James Chen b76798505c closed #2342: Fixing indention. 2013-06-29 15:04:43 +08:00
James Chen bb2f19535b closed #2342: Fixing compilation errors when CC_ENABLE_CACHE_TEXTURE_DATA is enabled. 2013-06-29 15:01:50 +08:00
Justin Hawkwood 37ca32e75c Corrected code to use textDefinition properties 2013-06-29 15:00:17 +08:00