Commit Graph

231 Commits

Author SHA1 Message Date
minggo f6cfe3007f issue #2412:fix merging conflict 2013-07-23 10:41:11 +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
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
minggo 7704ab9161 issue #2412:remove platform.cpp/.h 2013-07-19 13:42:45 +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
minggo 6abe6fce78 closed #2393: fix conflicts 2013-07-12 18:04:32 +08:00
minggo 5d9fea1416 issue #2393:mark PointZero RectZero and SizeZero as deprecated 2013-07-12 14:47:36 +08:00
minggo 15096b0716 issue #2393:mark CCPointMake CCSizeMake CCRectMake as deprecated 2013-07-12 14:30:26 +08:00
minggo bb758df0d0 issue #2393:mark ccp as deprecated 2013-07-12 14:11:55 +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
minggo c37af8fa77 issue #2393:mark functions in CCPointExtensions deprecated 2013-07-11 16:38:58 +08:00
Ricardo Quesada 9fe9341646 From C++ best practices
Uses static_cast<> instead of C casting.
2013-07-08 14:38:14 -07:00
minggo 87125e4b2a issue #2129:use capital words for static const member variables 2013-07-08 18:11:32 +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 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
minggo 04465622b7 issue #2129:remove prefix of types in ccTypes.h 2013-07-05 16:49:22 +08: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
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
minggo 29607bd741 fixed #2259:add description of path that custom font can put in 2013-06-10 23:01:48 +08:00
carlo morgantini 494ec43fe8 new CCLabelTTF (static) create with fontDefinition method, and new CPP test using it 2013-06-08 10:59:07 +08:00
carlo morgantini b7ffb5b810 new CCLabelTTF (static) create with fontDefinition method, and new CPP test using it 2013-06-07 16:33:01 -07:00
James Chen cb08479b7e Log error instead of triggering an assert for shadow and stroke. 2013-06-06 15:02:57 +08:00
James Chen 359225806b Log error instead of triggering an assert for shadow and stroke. 2013-06-06 14:19:16 +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
Rodrigo Goncalves de Oliveira 78967b7c8e Removing unused variable
These variables are just used on CCAssert comparisons, and result on a
compilation error on Linux (-Werror=unused-variable).

Signed-off-by: Rodrigo Goncalves de Oliveira <rodrigo.goncalves@openbossa.org>
2013-06-03 09:17:03 -04:00
Yongqin Liu aea9e04fbf Add out of bound check for the index before do the update
Signed-off-by: Yongqin Liu  <liuyq0307@thundersoft.com>
2013-05-29 19:18:46 +08:00
Yongqin Liu f6b5208be5 CCLabelAtlas.cpp: add check for n when call setDirty
in CCLabelAtlas::updateAtlasValues, there is the case that n equal to 0,
so we need to check it before when call m_pTextureAtlas->setDirty(true) and do
other process.

Signed-off-by: Yongqin Liu <liuyq0307@thundersoft.com>
2013-05-29 10:45:47 +08:00
Yongqin Liu 56037a4939 CCTextureAtlas::updateQuad modify for the memcpy hot spot
change the place that call CCTextureAtlas::updateQuad method to
update the quads with pointer reference directly.

Signed-off-by: Yongqin Liu<liuyq0307@thundersoft.com>
2013-05-28 10:23:47 +08:00
James Chen d6a0af86eb fixed #2217: Updating logic when m_bIgnoreContentScaleFactor is enabled. 2013-05-23 16:12:04 +08:00
James Chen bb11182279 fixed #2217: Using CCLabelAtlas instead of CCLabelTTF to show FPS. 2013-05-23 15:06:57 +08:00
Ed Bartley 719eb15326 Make shadowOffset parameter of CCLabelTTF::enableShadow(…) a const reference. 2013-05-21 15:42:26 -04:00
carlo morgantini a3f5238407 fix a warning caused by member variables initialization order in constructor 2013-05-15 16:37:08 -07:00
carlo morgantini 4d3ed48905 initWithStringShadowStroke() renamed to initWithString() 2013-05-15 16:37:08 -07:00
carlo morgantini 3b50ffe5ba Fix problem with CCLabelTTF + shadow and text alignment; also fontDefinition property names now are lowercase 2013-05-15 16:37:08 -07:00
carlo morgantini d77604b958 initWithStringAndTextDefinition() changed method's signature 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 d9a53b3eb1 CCLabelTTF new interface for ccBuilder 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 54347bf767 setFontTintColor renamed to setFontFillColor 2013-05-15 16:29:33 -07:00
carlo morgantini 7bc3ceb8c8 uses const ccColor & in the interface instead of ccColor& 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