Ricardo Quesada
d683e10808
More constant fixes
...
Transition::ORIENTATION_XXX -> Transition::Orientation::XXX
Image::FORMAT_XXX -> Image::Format::XXX
Image::_function() -> Image::function() // private methods should not start with '_'
DrawPrimitives::drawColor() -> DrawPrimitives::setDrawColor()
And fixes Premultiplied Alpha in PVR v3 images
And tests are updated with the new functions
2013-07-25 14:49:43 -07:00
Ricardo Quesada
16d0b43181
Constant fixes
...
Director::PROJECTION_2D, 3D,... -> Director::Projection::_2D, _3D, ...
Label::TEXT_ALIGNMENT_... -> Label::HAlignment::...
Label::TEXT_VERTICAL_ALIGNMENT_... -> Label::VAlignment::...
Texture2D::PIXEL_FORMAT_... -> Texture2D::PixelFormat::...
BlendFunc::BLEND_FUNC_DISABLE -> BlendFunc::DISABLE
Also adds more constant for BlendFunc
2013-07-25 13:36:19 -07:00
minggo
17946c084a
issue #2430:fix android compiling error
2013-07-25 21:59:37 +08:00
minggo
4d7ac6c800
issue #2430:fix conflict
2013-07-25 21:37:12 +08:00
minggo
2bb577be8b
issue #2430:change Image enum item to upper letter
2013-07-25 20:29:53 +08:00
minggo
77afae124b
issue #2430:move Texture2D enum into class
2013-07-25 19:52:44 +08:00
James Chen
6a0a4ed0f9
#issue #2404 : Using Texture2D::getDefaultAlphaPixelFormat instead of Texture2D::defaultAlphaPixelFormat in TextureCache.
2013-07-25 15:05:56 +08:00
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