Commit Graph

158 Commits

Author SHA1 Message Date
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
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
Jaroslaw Lewandowski 1fcd6883f1 fixing Linux build 2013-07-09 23:32:10 +01:00
Jaroslaw Lewandowski 626ba2686f Solving 'black screen' on android 2013-07-09 21:21:43 +01: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
minggo 04465622b7 issue #2129:remove prefix of types in ccTypes.h 2013-07-05 16:49:22 +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
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
Huabing.Xu 9642930779 give Texture2D::_pixelFormat a default value in construction 2013-07-01 18:16:56 +08: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
James Chen 93b6328303 issue #2129: Removing CC prefix for cocos2dx module. 2013-06-20 14:13:12 +08:00
James Chen b7a33afc71 fixed #2303: float assignment fix. 2013-06-19 14:09:23 +08:00
James Chen f007819f74 Merge branch 'develop' of https://github.com/musikov/cocos2d-x into musikov-develop
Conflicts:
	cocos2dx/textures/CCTexture2D.cpp
2013-06-19 14:05:55 +08:00
James Chen c0d44cb2e4 fixed #2129: Rename m_iVar to _var, remove CC prefixes. 2013-06-15 14:03:30 +08:00
James Chen 7295551f0f Merge branch 'iss2284-merge-master' of https://github.com/minggo/cocos2d-x into minggo-iss2284-merge-master 2013-06-15 11:15:28 +08:00
minggo 47f4aee3cc issue #2284: use GLuint to fix compiling error 2013-06-14 16:48:18 +08:00
James Chen 82cd7bb01f Merge branch 'iss2284-merge-master' of https://github.com/minggo/cocos2d-x into minggo-iss2284-merge-master 2013-06-14 15:41:01 +08:00
Ricardo Quesada 98190a21c0 Actions with clone() pattern 1/3
This is the 1st patch of 3.

1)
Removes the copyWithZone() patterns.
Adds the clone() pattern instead (which is more C++ friendly)
Adds also "const" to getters.
2013-06-13 17:25:14 -07:00
Mykyta Usikov 28e8899089 fixed strokeColor and fontFillColor of CCLabelTTF 2013-06-13 14:16:33 +03:00
Ricardo Quesada 428711482e Adds missing config files for CCConfiguration
...and add functionality on the Director to override the default values
from the config file.

Supported values:

 - cocos2d.x.fps
 - cocos2d.x.display_fps
 - cocos2d.x.gl.projection
 - cocos2d.x.texture.pixel_format_for_png
 - cocos2d.x.texture.pvrv2_has_alpha_premultiplied

If the "config.plist" file is not present, or some keys are not present,
the default values are going to be used

IMPORTANT:
 The folder "samples/Cpp/TestCpp/Resources/configs" needs to be added
 in the Android, Linux, Win32 projects.
 Already added in OS X and iOS Xcode projects.
2013-06-06 12:23:44 -07:00
minggo beef61fc90 issue #2161: android supports ETC format now 2013-05-27 14:42:22 +08:00
silverscania 1d23f1a2b4 The real cause of the problem for the texture corruption was when using textures with no alpha.
The function bitsPerPixelForFormat returns the wrong number for RGB_888.
2013-05-19 18:53:59 +03:00
silverscania 5adb4bc895 For some non power of two textures, even if the row alignment was 8, 4 or 2, setting this resulted in corruption.
See ddafa42850 (commitcomment-3243089) for texture example.
Fix by setting alignment to 1 for ALL non-PO2 textures.
2013-05-19 15:17:48 +03:00
silverscania 1973a52fbe Revert "Try to fix bugs that came up but just keeping the old parameters for row alignment: 4 or 1"
This was not the correct fix.
This reverts commit 110ea5a501.
2013-05-19 15:12:39 +03:00
silverscania 110ea5a501 Try to fix bugs that came up but just keeping the old parameters for row alignment: 4 or 1 2013-05-19 13:55:20 +03:00
flamingo 3686107313 Update CCTexture2D.cpp
Fixed compilation error on MSVC compiler
2013-05-16 12:58:35 +04:00
carlo morgantini 4d3ed48905 initWithStringShadowStroke() renamed to initWithString() 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 ed981aee7e ccTextDefinition becomes CCTextDefinition 2013-05-15 16:29:33 -07:00
carlo morgantini 9ba489bba4 new assert() added on unsupported platforms for CCLabelTTF and CCTexture2D 2013-05-15 16:29:33 -07:00
carlo morgantini 74441203cb stroke and shadow are implemented and supported only on iOS and Android for now 2013-05-15 16:29:33 -07:00
carlo morgantini c727fa33c0 CCLabelTTF have now a tint, plus bug fixing and code clean up 2013-05-15 16:29:33 -07:00
carlo morgantini 221884f6d4 better CCTexture2D API for init texture with shadow and stroke 2013-05-15 16:29:32 -07:00
carlo morgantini dd9b4a8932 new shadow and stroke for CCLabelTTF 2013-05-15 16:12:43 -07:00
silverscania ddafa42850 Fix for wrong alignment using texture format sizes other than 4 bytes.
For example RGBA4444 is 2 bytes per pixel. A texture with width of 1 passes the previous power of 2 test, but the alignment value needs to be 2, not 4.
2013-05-12 18:08:33 +03:00
James Gregory 8a9586fd9d More client side buffer fixes. 2013-05-06 20:59:48 -07:00
minggo 949700ca1a issue #1848:use CCConfiguration::supportsPVRTC() to determine if the device support powertc format 2013-03-21 15:50:41 +08:00
James Chen e2e9bc8ce0 Fixing memoryleaks. 2013-03-21 09:00:55 +08:00
Sam Clegg 38878b084b Fix all compiler warnings produced by gcc.
This allows the linux and NaCl builds (and perhaps others)
to be compiles with -Wall and -Werror, and it makes the build
output much less noisy.
2013-03-05 17:01:00 -08:00
Tom Lee 4023fcc094 Return false instead of NULL 2013-02-04 01:38:22 -08:00
Tom Lee 610aeb28cf Don't call release() if initWith* fails 2013-02-04 01:04:54 -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