Commit Graph

185 Commits

Author SHA1 Message Date
minggo f6cfe3007f issue #2412:fix merging conflict 2013-07-23 10:41:11 +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 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
minggo 7704ab9161 issue #2412:remove platform.cpp/.h 2013-07-19 13:42:45 +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 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
minggo 6abe6fce78 closed #2393: fix conflicts 2013-07-12 18:04:32 +08:00
minggo 15096b0716 issue #2393:mark CCPointMake CCSizeMake CCRectMake as deprecated 2013-07-12 14:30:26 +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 ad8a3ac1b5 issue #2388: One more static_cast. 2013-07-10 10:08:07 +08:00
Jaroslaw Lewandowski 626ba2686f Solving 'black screen' on android 2013-07-09 21:21:43 +01: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
Ricardo Quesada c65b6f1417 Adds const to more getters
adds `const` to more getters.
2013-07-06 22:01:21 -07: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
minggo ca2966745e closed #2305: fix a running time error 2013-06-26 15:11:13 +08:00
minggo 9d44b52ebf issue #2305:use c++11 thread correctly 2013-06-26 14:48:19 +08:00
minggo b434190a70 issue #2305: tab -> 4 spaces 2013-06-21 15:49:45 +08:00
minggo ef7fd16f76 issue #2305: tab -> 4 spaces 2013-06-21 15:43:17 +08:00
minggo 68559dfa00 issue #2305: use c++11 thread instead of pthread in CCTextureCache 2013-06-21 15:29:21 +08:00
James Chen 93b6328303 issue #2129: Removing CC prefix for cocos2dx module. 2013-06-20 14:13:12 +08:00
James Chen 1eadcd8b38 fixed #2301: Merge branch 'emscriptenate' of https://github.com/j4m3z0r/cocos2d-x into j4m3z0r-emscriptenate
Conflicts:
	cocos2dx/proj.emscripten/cocos2dx.mk
2013-06-19 13:03:51 +08:00
James Gregory ad90fe88a8 Merge remote-tracking branch 'origin/master' into emscriptenate 2013-06-17 20:30:36 -07:00
James Chen c0d44cb2e4 fixed #2129: Rename m_iVar to _var, remove CC prefixes. 2013-06-15 14:03:30 +08:00
James Gregory 872be8e964 Initial commit of browser accelerated async image-loading code for Emscripten. 2013-06-12 14:46:32 -07:00
James Gregory cdb63898d9 Simplify AsyncStruct slightly -- make it a class, add a constructor. 2013-06-12 10:03:12 -07:00
minggo c84a071ae5 issue #2271: fixed memory leak of CCTextureCache::snapshotTextures() 2013-06-09 15:08:26 +08:00
minggo ec7bf7a9d6 issue #2271: fixed memory leak of CCTextureCache::snapshotTextures() 2013-06-09 15:03:38 +08:00
Ricardo Quesada 479062fdb7 on dealloc, log "this" with %p, not %x.
Also adds %p where it was missing.
And make a few fixes on the iOS project
2013-06-05 18:21:05 -07:00
minggo beef61fc90 issue #2161: android supports ETC format now 2013-05-27 14:42:22 +08:00
James Gregory ae5454cffc Remove SDL code from texture cache, and move all image loading code to CCImage. 2013-05-17 17:09:28 -07:00
James Gregory d1922b6086 Add experimental (and currently disabled) code for using SDL to load texture data. If I can iron out the kinks, it should be a lot faster. 2013-05-15 20:22:43 -07:00
James Gregory 25bded7faf Now validates as asm.js: Disable HttpClient, pthread_cond_signal and eglReleaseThread in Emscripten. 2013-05-07 17:25:39 -07:00
Andre Rudlaff 43615fe0a7 don't use named semaphore in HttpClient
this patch removes using named semaphores for Http requests.
This also destroys the mutexes from CCTextureCache when the thread is
destroyed
2013-04-27 17:44:33 +02:00
Andre Rudlaff 5e12d9f8fe don't use named semaphore for syncing image loading thread
Named semaphores are unique across process bounds, therefore a semaphore
left in an invalid state may cause locks on other processes.
The code has been exchanged by using pthread mutex and condition variables
2013-04-26 18:55:36 +02:00
minggo 949700ca1a issue #1848:use CCConfiguration::supportsPVRTC() to determine if the device support powertc format 2013-03-21 15:50:41 +08:00
minggo 8288e2124e issue #1686:synchronize CCTextureCache.cpp 2013-02-27 11:35:38 +08:00
dualface d6686fe57c Merge branch 'upstream_master' into add_webp_support 2013-02-02 12:24:05 +08:00
James Chen 6f3b22031f Using new API of getting full path for file name. 2013-01-25 20:51:52 +08:00
James Chen 0a42829428 issue #1667: Adding file name lookup support for iOS and Android, TBD: Other platform supports. 2013-01-18 18:05:32 +08:00
Victor K bf01df0f52 Fix addImageAsync iOS memory leak
Bug: http://www.cocos2d-x.org/issues/1087
Thread: http://www.cocos2d-x.org/boards/6/topics/17031
2013-01-14 15:32:30 +07:00
dualface 806138d990 fix some issues 2012-12-29 13:58:02 +08:00
dualface b50e4cdf2b add WebP support 2012-12-29 10:27:43 +08:00
James Chen b62d254f63 fixed #1597: Added return pointer check. 2012-12-27 16:07:48 +08:00
James Chen ac7755e68b fixed #1597: TestCpp crashes when running ActionEaseTest after running ParticlesTest 2012-12-27 15:42:55 +08:00
minggo a4a53df159 issue #1555:build ok on android 2012-11-16 14:23:14 +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
Donald Alan Morrison 4cbd993091 Minor English Spelling Corrections. A few grammar corrections. 2012-09-17 00:02:24 -07:00
Walzer 9a042b8056 fix a potential memory leak in CCTextureCache::addImage. Thanks to Alexander Markevich. 2012-09-15 21:11:50 +08:00
Martin Sherburn afd8391ca8 Fixed bug where texParams would get lost after reloading textures on android 2012-08-30 20:36:24 +01:00
minggo cc39dc55f4 issue #1405:remove unneeded functions of CCFileUtils 2012-08-08 18:39:33 +08:00