Commit Graph

905 Commits

Author SHA1 Message Date
James Chen e28cf8d258 issue #2129: Windows doesn't support 'initializer list', using constructor instead. 2013-07-07 21:08:14 +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 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
Jaroslaw Lewandowski 3f7c506638 Ability to save/retrieve CCData into/from CCUserDefault 2013-05-29 01:06:41 +01:00
Lee, Jae-Hong 27428dc5f4 Adding defines and enums for Tizen. 2013-05-16 19:49:16 +09:00
carlo morgantini c9e875869e comment fixed 2013-05-15 16:37:08 -07:00
carlo morgantini 04c890522d class renamed and moved to ccTypes.h 2013-05-15 16:35:25 -07:00
carlo morgantini bc9a74218c added a new utility for comparing 2 ccColor3b 2013-05-15 16:29:33 -07:00
James Chen 99664b5998 Merge pull request #2391 from sbc100/log_asserts
fixed #2152: Logging assert messages to the console and renaming CCScriptSupport::executeAssert to CCScriptSupport::handleAssert.
2013-05-13 19:56:28 -07:00
James Gregory 4f56f93269 Add #defines for Emscripten platform 2013-05-06 20:58:43 -07:00
Sam Clegg 4f6de1bcad Rename CCScriptSupport::executeAssert -> CCScriptSupport::handleAssert
Also remove the first "cond" argument, since it is always false.
2013-05-06 12:25:13 -07:00
Sam Clegg e699919bc6 Log assert messages
Now, assert messages as visible in the trace output
as well as the line number of condition that failed.
2013-05-06 12:25:13 -07:00
James Chen f7b2ca2125 Fixing compilation errors when enable CC_ENABLE_PROFILERS. 2013-03-25 11:47:27 +08:00
minggo 648e9a7bf1 issue #1529:use NSUserDefaults on iOS and SharedPreferences on Android to implement CCUserDefault 2013-03-06 16:36:44 +08:00
minggo f37b1525b4 issue #1529:use NSUserDefault to implement CCUserDefault on iOS 2013-03-05 14:53:37 +08:00
Sam Clegg 33c422d1d5 Add new port: Native Client 2013-03-02 12:15:24 -08:00
James Chen 56340f9555 Merge branch 'iss1686-synchronize' of https://github.com/minggo/cocos2d-x into iss1686-synchronize
Conflicts:
	cocos2dx/proj.ios/cocos2dx.xcodeproj/project.pbxproj
2013-02-28 13:01:45 +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
James Chen 473e8e6139 issue #1753: Upgrading SpiderMonkey to Firefox19.0, iOS works ok. 2013-02-27 15:16:49 +08:00
James Chen 7dc64fc9a6 issue #1686: sync to CCLayer 2013-02-27 09:38:30 +08:00
James Chen ac17f67686 issue #1712: Adding getting dpi support for iOS and Android. 2013-02-16 19:36:21 +08:00
minggo 7d02925d7e issue #1703:include tinyxml2 files in android/iOS project 2013-02-06 11:15:54 +08:00
walzer 4ae43e5901 fix typos in doxygen of CCSprite and CCProtocol 2013-01-14 21:51:47 +08:00
walzer c9c227873f Merge branch 'gles20' of https://github.com/cocos2d/cocos2d-x into gles20 2013-01-14 17:07:07 +08:00
walzer 1ab552b482 Add a sample doxygen sample in CCSprite.h and CCProtocol.h 2013-01-14 16:54:20 +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
folecr 58874dc7a5 CCAssert uses CC_ASSERT directly
* ... after call to cc_assert_script_compatible()
 * CCAssert will now report the correct line number
2013-01-10 12:26:12 -08:00
James Chen 9ef74bef80 fixed #1636: Deleted CC_ENABLE_CHIPMUNK_INTEGRATION and CC_ENABLE_BOX2D_INTEGRATION in ccConfig.h since they are moved to extension, it doesn't depend on engine any more.
Added platform macro for CCEditBoxImpl* files.
2013-01-05 11:10:24 +08:00
minggo 539bb56256 Merge pull request #1799 from tks2shimizu/gles20
Added CCFloat, CCDouble and CCBool
2013-01-03 19:32:35 -08:00
James Chen b120874a87 fix compilation errors. 2012-12-29 11:23:31 +08:00
Tomoaki Shimizu 87146d82e1 Added CCFloat, CCDouble and CCBool 2012-12-27 23:15:13 +09:00
James Chen f159df2e13 Compilation warning fix for CCAssert macro. 2012-12-27 16:48:02 +08:00
minggo 0adc6abe30 Merge pull request #1776 from dualface/make_ccassert_compatible_lua
[luabinding] make CCAssert compatible Lua
2012-12-26 23:28:32 -08:00
James Chen 7d9f06b48c fixed #1625: Updated TestCpp. 'ccg' --> 'CCSizeMake' . And exchanged the parameter order for 3D action tests. 2012-12-27 10:55:25 +08:00
James Chen bb486af6a7 Added stackable action support. Exchanged the order of action. 2012-12-26 18:59:31 +08:00
dualface 57bccc7e4a remove CC_LUA_ENGINE_ENABLED macro 2012-12-26 18:33:55 +08:00
dualface cc69e39c8a [luabinding] make CCAssert compatible Lua 2012-12-22 10:13:37 +08:00
minggo cb2427e780 do some modification 2012-12-04 17:25:40 +08:00
James Chen ebd522e3fa issue #1564: Return a new object instead of 'const reference' for some get methods. 2012-11-20 16:34:55 +08:00
James Chen c5b5b978fa issue #1555: Made win32 works ok. 2012-11-16 17:08:34 +08:00
minggo a701eaecce issue #1555:update to v2.1 beta3 2012-11-14 18:05:15 +08:00
minggo 5fd56370d8 issue #1555:fix a bug about CCGLProgram 2012-11-13 11:06:32 +08:00
minggo bfa78a8d73 Merge branch 'gles20' of https://github.com/cocos2d/cocos2d-x into iss1555-update 2012-11-12 11:02:30 +08:00
minggo d2a5723973 issue #1555:add CCDrawNode 2012-11-09 12:08:18 +08:00
Mat Hopwood 24115675b0 Marmalade Cocos2d-x Main Repo Changes
These are changes to the main Cocos2d-x repo that Marmalade would like
to request for inclusion in the main repo
2012-10-19 16:38:58 +01:00
James Chen 48b146a098 issue #1469: Exported 'cocos2dVersion'. 2012-10-10 15:08:11 +08:00
James Chen 0dfa1b566b Fixed compilation errors of blackberry platform. 2012-09-26 11:16:44 +08:00
walzer 06f639edab update copyright to 2012, update cocos2d version to 2.0.3
1. update all copyright from 2010-2011 to 2010-2012 cocos2d-x.org
2. update COCOS2D_VERSION to 0x00020003
3. update const char* cocos2dVersion() to "cocos2d-2.0-x-2.0.3"
2012-09-24 21:22:20 +08:00
dualface 93b669b936 Merge branch 'gles20' of git://github.com/cocos2d/cocos2d-x into gles20 2012-09-20 09:27:45 +08:00
dualface cf5f3dedc7 [Win32] disable CCTextureAtlas use VAO, some windows display adapter driver cannot support VAO 2012-09-17 17:58:21 +08:00
Donald Alan Morrison 4cbd993091 Minor English Spelling Corrections. A few grammar corrections. 2012-09-17 00:02:24 -07:00
James Chen a2b5916301 Using 'getHashCodeByString(typeid(*native_obj).name())' instead of 'reinterpret_cast<long>(typeid(*native_obj).name());'.
Since on win32 platform, 'reinterpret_cast<long>(typeid(*native_obj).name());' invoking in cocos2d.dll and outside cocos2d.dll(in TestJavascript.exe) will return different address.
But the return string from typeid(*native_obj).name() is the same string, so we must convert the string to hash id to make sure we can get unique id.
2012-08-29 14:49:03 -07:00
James Chen 06f240fa5e Moved '#include <stdint.h>' to 'platform/ios(android,linux,blackberry)/CCStdC.h' since win32 don't have a stdint.h. 2012-08-29 14:49:02 -07:00
Rohan Kuruvilla 8d7516a0ef Test project for cocos2d-x js. 2012-08-27 10:07:31 -07:00
Rolando Abarca e757d55a29 updates cocos2d-x API to support getObjectType() 2012-08-27 05:45:11 -07:00
ningxu 5baa19992d Update cocos2dx/include/ccConfig.h 2012-08-21 10:56:12 +08:00
James Chen 6c9b4d3357 fixed #1420: Merged gles20 branch of blackberry port from Dale's repo and fixed some bugs. 2012-08-20 15:49:02 +08:00
Dale Ducharme 4004a8ac61 Cocos2dx for gles2. 2012-08-17 17:45:21 -04:00
minggo cc39dc55f4 issue #1405:remove unneeded functions of CCFileUtils 2012-08-08 18:39:33 +08:00
minggo 3395bba327 Merge branch 'gles20' of https://github.com/cocos2d/cocos2d-x into iss1405_multi_resolution 2012-08-08 17:42:45 +08:00
minggo 5d8f909af4 issue #1405:multi resolution works ok 2012-08-07 14:29:46 +08:00
James Chen ed69b62461 fixed #1419: Update cocos2d.h. 2012-08-03 11:16:34 +08:00
James Chen 086e63103d fixed #1419: Merge gles20 linux port.
There are still some issues:
1. CocosDeshionTest crash.
2. FontTest result is not correct.
2012-08-03 11:07:59 +08:00
pengfei tong a37fd743e0 [FIX] testjs 2012-08-02 16:23:31 +08:00
pengfei tong b93d0b5ebf [LOG] add linux port 2012-08-02 13:02:59 +08:00
minggo ac70f8def5 Merge branch 'gles20-adjust-structure' into merge 2012-07-23 11:36:46 +08:00
James Chen 5e5b008742 issue #1399: Built four android projects(HelloCpp, HelloLua, TestJavascript, TestCpp) successfully on Ubuntu System. 2012-07-21 13:49:20 +08:00
Nat Weiss d4b6d1262b Adding Mac support! 2012-07-20 21:23:40 -07:00
James Chen 557f654cf3 Built successfully on android. 2012-07-20 17:06:00 +08:00
minggo f9c40f7372 issue #1399: work ok on iOS after adjusting directory structure 2012-07-19 17:22:36 +08:00
minggo 90448ec7d0 issue #1269:fix some compiling error because of including error header files 2012-06-19 16:20:46 +08:00
minggo 2666df9472 issue #1269:mrege latest code and fix conflict 2012-06-19 13:57:33 +08:00
minggo 9ec29d715a issue #1269:make tests HelloWorld HelloLua and testjs refer subproject cocos2dx 2012-06-19 13:50:11 +08:00
James Chen c3653f651a Merge branch 'gles20' of https://github.com/cocos2d/cocos2d-x into gles20-ccbi 2012-06-18 19:02:02 +08:00
James Chen 579e6a1100 issue #1333: export CCTouch class. 2012-06-18 18:32:17 +08:00
minggo c1f5d173ef fixed #1332: add cocos2d version 2012-06-18 16:16:09 +08:00
minggo d0f905992a issue #1292:make some function names more readable 2012-06-15 15:10:40 +08:00
minggo c965c8d770 fixed 1181: synchronize latest codes 2012-06-15 10:27:52 +08:00
minggo 9d9e2579e3 issue #1181: save render texture when comming to background 2012-06-14 18:37:57 +08:00
James Chen 3a410c14a1 Merge branch 'gles20' of https://github.com/cocos2d/cocos2d-x into iss1324_create
Conflicts:
	cocos2dx/extensions/CCBReader/CCBReader_v2.cpp
	cocos2dx/extensions/CCControlExtension/CCScale9Sprite.cpp
	cocos2dx/label_nodes/CCLabelBMFont.cpp
	cocos2dx/menu_nodes/CCMenuItem.cpp
	cocos2dx/menu_nodes/CCMenuItem.h
	cocos2dx/misc_nodes/CCRenderTexture.h
	cocos2dx/tileMap_parallax_nodes/CCTileMapAtlas.cpp
	tests/tests/ExtensionsTest/CocosBuilderTest/HelloCocosBuilder.cpp
	tests/tests/LabelTest/LabelTest.cpp
2012-06-14 17:36:31 +08:00
James Chen 23574172ff issue #1324: Added create() for static member functions that new an autorelease object, updated cocoa folder. 2012-06-14 16:05:58 +08:00
minggo 15ad463fbe issue #1322: vertical alignment ok on iOS 2012-06-13 16:20:58 +08:00
minggo ccbfd24c21 issue #1310: synchronize ActionManagerTest ActionEaseTest ActionsProgressTest ActionsTest 2012-06-11 18:25:57 +08:00
James Chen 2ce7c86c50 fixed #1315: TileMapTest can't be shown correctly in retina mode. 2012-06-11 14:44:32 +08:00
James Chen 26cf81e42e Merge branch 'gles20' of https://github.com/cocos2d/cocos2d-x into gles20
Conflicts:
	cocos2dx/CCScheduler.h
	cocos2dx/include/ccTypes.h
2012-06-08 14:14:13 +08:00
James Chen c5cf23c859 issue #1310: First commit since sync to rc2. 2012-06-08 14:11:48 +08:00
minggo cc16320445 issue #1310: syncronize actions 2012-06-08 13:55:28 +08:00
James Chen c5f7f15090 issue #1194: Added extension namespace, all extension classes are in cocos2d::extension namespace, added CCTextureWatcher and CCListView. 2012-04-27 18:47:49 +08:00
James Chen 1d94ba05a0 fixed #1189: updated linebreak and tab(4 space) for all source files. 2012-04-25 18:17:04 +08:00
James Chen 0f36a89c7e issue #1188: Refactor directory. Compile successfully on android and win32(vs2008 debug). 2012-04-25 16:18:04 +08:00
James Chen 26763c200b Merge branch 'gles20' of https://github.com/cocos2d/cocos2d-x into iss1177_platform
Conflicts:
	tests/proj.ios/test.xcodeproj/project.pbxproj
2012-04-24 15:44:53 +08:00
minggo 1e20f2b6db fixed #1185: reload image data and recreate buffer of object when backing to foreground 2012-04-24 15:02:18 +08:00
James Chen 521155e9e2 issue #1177: Added some common methods for CCPoint,CCSize,CCRect. Added MutiTouchTest demo. 2012-04-23 14:30:38 +08:00
James Chen 0c6d21c0f9 Merge branch 'gles20' of https://github.com/cocos2d/cocos2d-x into iss1177_platform 2012-04-20 17:34:47 +08:00
James Chen d1d0fd619a issue #1177: Added CCEGLViewProtocol class as CCEGLView's super class. Updated win32, android project configuration. 2012-04-20 15:23:00 +08:00
minggo f3d97bd9b6 fixed #1180: synchronize CCConfiguration 2012-04-20 11:39:12 +08:00
James Chen 230b8a386b issue #1176: Changed linebreak symbol to UNIX format ('\n'),replaced 'tab'
with four spaces. Also,
1. Used macro NS_CC_BEGIN instead of namespace cocos2d {, NS_CC_END instead
of }.
2. Removed some unused files.
3. Renamed the name of some folders, for example,
"test.android"-->"proj.android" .
2012-04-19 14:35:52 +08:00
James Chen 4068be84e9 Refactored project folders. 2012-04-19 11:46:08 +08:00
James Chen 783b2fe79b Removed some unused codes regard to WOPHONE. 2012-04-19 10:46:37 +08:00
James Chen 7d7baf81a2 refactor updated... 2012-04-18 18:43:45 +08:00
James Chen e673bfae90 fixed #1114: Updated SchedulerTest and ShaderTest. Used CCControlSlider instead of UISlider. Added some resources. 2012-04-18 13:58:24 +08:00
James Chen c501255a7a Merge branch 'gles20' of https://github.com/cocos2d/cocos2d-x into iss1114_CCControlExt 2012-04-18 09:40:08 +08:00
James Chen f8dfe1fca0 issue #1114: Updated ShaderTest.Added ShaderBlur. 2012-04-17 18:31:31 +08:00
minggo cfdc5edf87 Merge branch 'gles20' of https://github.com/cocos2d/cocos2d-x into iss1139_screen_black 2012-04-17 17:55:59 +08:00
minggo 04c0d794af fixed #1139: fix the bug that screen becomes black when backing to foreground on Android 2012-04-17 17:55:26 +08:00
James Chen 413bc3c343 Finished CCControlSwitch.Added CCActionTween. 2012-04-17 16:00:18 +08:00
James Chen d4f1dcfc44 finished CControlColourPickerTest.
moved extension resources to 'extensions' folder.
2012-04-17 11:12:05 +08:00
James Chen 044729dab9 Updated CCControlExtension 2012-04-16 23:16:03 +08:00
James Chen 959acd556f first commit CCControlExtension. 2012-04-16 18:58:43 +08:00
James Chen 77919439bc fixed #1166: Added CCArray::arrayWithContentOfFile function. 2012-04-16 15:41:01 +08:00
James Chen a71e5be0d8 Merge branch 'gles20' of https://github.com/cocos2d/cocos2d-x into gles20_optimize_data
Conflicts:
	cocos2dx/shaders/CCGLProgram.cpp
2012-04-16 12:45:47 +08:00
James Chen 9ace0d2fdc Fixed memory leaks in CCString and CCDictionary, Updated CCFileUtils_ios.mm.Remove inline prefix for some member function of CCString, so that make it compiled successfully on android and ios. 2012-04-16 10:57:37 +08:00
Phenix Yu e623cd6357 Merge branch 'gles20' of https://github.com/cocos2d/cocos2d-x into gles20
Conflicts:
	cocos2dx/include/CCTexture2D.h
	cocos2dx/include/ccMacros.h
	cocos2dx/textures/CCTexture2D.cpp
	lua/cocos2dx_support/LuaCocos2d.cpp
2012-04-15 15:46:01 +08:00
James Chen d01f1277af optimize data struct. 2012-04-14 19:11:57 +08:00
Phenix Yu 61a7ca71c5 fixed getContentSize pass by reference issue
update project setting for release mode
2012-04-14 17:13:38 +08:00
James Chen b780edde7a By Default, we enable VAO support for ios and win32 and disable it for other platforms. 2012-04-13 18:18:47 +08:00
James Chen 3c0653ffa7 fixed #1164: 1. Add the render mode which uses VBO without VAO in CCParticleSystemQuad.
2. delete some unused codes for win32 port.
3. Add CC_REBIND_INDICES_BUFFER macro.
2012-04-13 17:24:50 +08:00
minggo 34c805590f Merge branch 'gles20' of https://github.com/cocos2d/cocos2d-x into iss1156_director 2012-04-13 14:11:58 +08:00
minggo b43d5aa654 fixed #1156 syn CCDirector 2012-04-13 14:11:35 +08:00
James Chen 94e056d964 fixed #1160: Renamed 'CGFloat' to 'CCFloat'. 2012-04-13 14:09:02 +08:00
minggo a20f3fe638 remove unneeded codes 2012-04-13 11:57:25 +08:00
minggo 9bbac0d33d issue #1156: remove unneeded macros and functions 2012-04-13 11:45:41 +08:00
minggo 028cf7874e issue #1156: remove unneeded macros and functions 2012-04-13 11:22:17 +08:00
Phenix Yu ab8af9e04c retina for win32 2012-04-11 16:41:12 +08:00
James Chen 2885664c85 fixed #1136: Fixed some bugs as follows:
1. Using std::string parameter as the key of CCDictionary
2. Deep copy for CCDictionary and CCArray, the classes of elements's type must implement copyWithZone.
3. Added toBool() function to CCString.
4. Retina support for all platforms.
5. Include "CCString.h" and "cocoa/CCNS.h" in cocos2d.h.
6. Added a new constructor(CCArray::CCArray(unsigned int capacity)) for CCArray. And fixed a bug in CCArray.
7. Fixed a memory leak in CCLabelBMFont.cpp.
8. Fixed an error in strings.xml.
2012-04-10 17:17:24 +08:00
James Chen 5ad6c38500 Fixed two memory leaks in CCArray::copyWithZone and CCDictionary::copyWithZone. 2012-04-10 15:01:29 +08:00
James Chen b4d74700e4 Merge branch 'iss1094_gles20_particlebat' of https://github.com/dumganhar/cocos2d-x into new_ipad
Conflicts:
	tests/tests/ParticleTest/ParticleTest.cpp
2012-04-09 10:28:21 +08:00
James Chen baa27540a0 Updated the implementation of ccc4f. Initialize the ccResolutionType resolution variable in CCTextureCache::addImage. 2012-04-09 09:55:06 +08:00
minggo 4c61035231 return correct content size 2012-04-08 22:37:58 +08:00
minggo 75d6972da8 remove unneeded macros 2012-04-08 14:26:50 +08:00
minggo 355e27dada merge commit 928a28e37d3469fcd41aff14cb136b1415f2fc86 2012-04-08 14:16:29 +08:00
James Chen 4baebb8cab issue #1094: renamed CCPoolManager::getInstance() to CCPoolManager::sharedPoolManager(), and added CCPoolManager::purgePoolManager() method. Using pointer rather than global variable to make a singleton.
fixed a memory leak in CCParticleSystem.
2012-04-08 12:50:15 +08:00
James Chen 64665fe7c8 issue #1094: Make ParticleBatchNode works on win32. 2012-04-07 12:02:40 +08:00
James Chen d7aed75942 issue #1056: Removed CCNode::arrayMakeObjectsPerformSelector, instead, we defined two macros (arrayMakeObjectsPerformSelector and arrayMakeObjectsPerformSelectorWithObject) to fit for any classes that inherit from CCNode. 2012-03-29 14:30:13 +08:00
James Chen 56d5c496e9 issue #1056: Refactored two macros -- ccArrayMakeObjectsPerformSelector , ccArrayMakeObjectsPerformSelectorWithObject. 2012-03-29 11:25:08 +08:00
James Chen bb7485621e issue #1056: Updated ParticleTest, CCParticleSystem, CCParticleSystemQuad. 2012-03-28 21:44:28 +08:00
James Chen 3d63f9c58e issue #1056: Set CC_ENABLE_GL_STATE_CACHE = 1, Updated LavaFlow.plist. 2012-03-28 17:51:26 +08:00
James Chen 0f5efaffd2 issue #1056: Check bugs of SpriteTest. 2012-03-26 18:44:28 +08:00
James Chen 85c13998ee issue #1056: Added CCTransitionProgress class, Updated Texture2dTest, TileMapTest, TransitionsTest. 2012-03-26 16:46:23 +08:00
James Chen 9c9230a43f #issue #1056: Updated SpriteTest. 2012-03-23 17:31:28 +08:00
James Chen 900de7328a Merge branch 'gles20' of https://github.com/cocos2d/cocos2d-x into gles20 2012-03-22 18:29:26 +08:00
James Chen c5d0b1ca6f issue #1056: Updated ParticleTest. 2012-03-22 18:29:07 +08:00
minggo a8eaf85cfb Merge pull request #804 from minggo/RenderTextureTest
Rendertexturetest
2012-03-22 01:37:58 -07:00
minggo 39ba6b4618 issue #1506: RenderTextureTest 2012-03-22 16:36:03 +08:00
James Chen b1f293e089 issue #1056: Updated MenuTest. Added CCArray::arrayWithObject function. 2012-03-22 14:22:06 +08:00