James Chen
331c688f6f
Merge pull request #3063 from dumganhar/DarraghCoy-selector_cast_safety
...
Merge PR#3058: Adding extra safety to selector casting macros
2013-07-03 01:09:09 -07:00
minggo
2f88109a96
Merge pull request #3055 from DarraghCoy/add_rect_union_with_rect
...
Add Rect::unionWithRect
2013-07-03 00:42:55 -07:00
minggo
f089e62e8f
closed #2361:fix a crsash caused by Set::removeAllObjects
2013-07-03 15:26:58 +08:00
James Chen
661a934e82
Merge branch 'selector_cast_safety' of https://github.com/DarraghCoy/cocos2d-x into DarraghCoy-selector_cast_safety
2013-07-03 14:06:53 +08:00
Darragh Coy
abbbc3191e
Add extra safety to selector casting macros
...
Use static_cast<> instead of C-Style casts in the callfunc0_selector() etc. series of macros as this will allow the compiler to perform more stringent error checking and catch out cases where incompatible function signatures are being casted. This helps prevent very subtle and difficult to track down bugs where the signature of the function being casted is not what Cocos2dx expect - which can cause strange things to happen and corrupt the current stack frame.
2013-07-02 14:36:09 -07:00
Darragh Coy
e6270e64de
Bugfixes to the Set class.
...
1: If adding an object to the container then only retain the object again provided it's not already been added. The underlying std::set does not support duplicate entries. (see: www.cocos2d-x.org/boards/6/topics/10876)
2: When removing an object only CC_SAFE_RELEASE it if it was actually contained in the set. (see: http://www.cocos2d-x.org/boards/6/topics/10876 )
3: Fix a bug in 'removeAllObjects' where the underlying std::set container was not being cleared. (see: https://github.com/cocos2d/cocos2d-x/issues/2283 )
2013-07-02 14:24:14 -07:00
Darragh Coy
da58f035c5
Add CCRect::unionWithRect
...
Add a new CCRect utility function called 'unionWithRect' which computes the minimum rectangle that contains the current rectangle and another given rectangle, similar to to the following .NET function: http://msdn.microsoft.com/en-us/library/ms521839.aspx
2013-07-02 11:39:49 -07:00
folecr
ee5f319a77
Fix include path
2013-06-24 17:29:24 -07:00
James Chen
93b6328303
issue #2129 : Removing CC prefix for cocos2dx module.
2013-06-20 14:13:12 +08:00
Ricardo Quesada
159ef1ec68
clone() doesn't use copy constructor
...
... and other bug fixes
2013-06-18 15:06:53 -07:00
James Chen
c0d44cb2e4
fixed #2129 : Rename m_iVar to _var, remove CC prefixes.
2013-06-15 14:03:30 +08:00
James Chen
1cfca9bc60
Updating property in CCDictionary.
2013-06-15 13:42:05 +08:00
James Chen
e56c63b03d
Merge pull request #2884 from ricardoquesada/actions_clone_pattern
...
issue #2289 : Actions with clone() pattern 1/3
2013-06-13 23:19:04 -07:00
Ricardo Quesada
8a6d33a212
Adds CC prefix to CALLBACK()
...
Now it is called: CC_CALLBACK()
2013-06-13 20:36:43 -07: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
Ricardo Quesada
83b43ab93e
Adds CALLBACK_0, CALLBACK_1 and CALLBACK_2
...
Handy macros for callbacks.
Instead of:
std::bind(func_ptr, instnace, std::placeholder::_1)
you use:
CALLBACK_1(func_ptr, instance)
And also removes more warnings from the tests
2013-06-11 16:30:05 -07:00
James Chen
8cfe969137
Fixing compilation errors for win32.
2013-06-07 14:31:15 +08:00
Jaroslaw Lewandowski
3f7c506638
Ability to save/retrieve CCData into/from CCUserDefault
2013-05-29 01:06:41 +01:00
Ricardo Quesada
836a61cd3e
CCConfiguration extension (rewritten)
...
rewritten to prevent conflicts while rebasing
2013-05-22 13:00:34 -07:00
James Chen
e21926edb8
fixed #1644 : Passing NULL parameter to ccdictionary_to_jsval will cause crash.
2013-05-22 11:56:47 +08:00
James Chen
cbafaf67a6
fixed #2142 : Adding CCDataVisitor and Implementing CCPrettyPrinter, iOS port is ok.
2013-05-10 15:07:05 +08:00
minggo
1166a02e13
resolve conflict for #2505
2013-05-07 14:31:00 +08:00
minggo
90b8dfd383
Merge pull request #2504 from wagaf-d/ccpchanges
...
Move ccpX functions to CCPoint methods and operators
2013-05-06 23:22:21 -07:00
minggo
ea5d7bc5ad
Merge pull request #2361 from tiantian20007/dictStuff
...
Implement CCDictionary::writeToFile();
2013-05-06 23:17:11 -07:00
Adrien Béraud
16d2b5a957
Assert that the user does not divide by 0 in CCPoint and CCSize
2013-05-07 14:58:43 +10:00
Adrien Béraud
ca4c2edc29
Clarify CCPoint::rotate & unrotate documentation
2013-05-07 14:36:17 +10:00
James Gregory
92e4c76f20
Move GL server-side buffer code into a separate class and use multiple inheritance to deploy only to classes that need it.
2013-05-06 21:29:44 -07:00
James Gregory
fa77e6ede2
Switch to using GL_DYNAMIC_DRAW.
2013-05-06 21:29:44 -07:00
James Gregory
36fc2ecf99
Get CCGrid to work.
2013-05-06 21:29:43 -07:00
James Gregory
9ae67ff78a
Move GL server-side buffer code into a separate class and use multiple inheritance to deploy only to classes that need it.
2013-05-06 21:25:47 -07:00
James Gregory
ff1e0aefa0
Switch to using GL_DYNAMIC_DRAW.
2013-05-06 21:25:47 -07:00
James Gregory
235b80e7f8
Get CCGrid to work.
2013-05-06 21:22:34 -07:00
James Gregory
062a5eefd8
Move GL server-side buffer code into a separate class and use multiple inheritance to deploy only to classes that need it.
2013-05-06 21:13:21 -07:00
James Gregory
6c828bbe4f
Switch to using GL_DYNAMIC_DRAW.
2013-05-06 21:13:21 -07:00
James Gregory
809b77d632
Get CCGrid to work.
2013-05-06 21:08:28 -07:00
James Gregory
5bac7b52ac
Move GL server-side buffer code into a separate class and use multiple inheritance to deploy only to classes that need it.
2013-05-06 20:59:48 -07:00
James Gregory
a9c8d99a4c
Switch to using GL_DYNAMIC_DRAW.
2013-05-06 20:59:48 -07:00
James Gregory
9500448f87
Get CCGrid to work.
2013-05-06 20:58:46 -07:00
minggo
80dfd4d493
Merge pull request #2407 from sergey-shambir/attribute_format
...
Added __attribute__(__format__()) for CCLog and CCString
2013-05-06 20:06:52 -07:00
Adrien Béraud
6a5559da7f
Check for 0 length in CCPoint::normalize()
2013-05-07 03:15:28 +10:00
Adrien Béraud
f71798a35b
Check for 0 length in CCPoint::normalize()
2013-05-07 02:59:38 +10:00
Adrien Béraud
49474f5194
documentation
2013-05-07 02:53:13 +10:00
Adrien Béraud
3661e34695
Bug fix: width and height reversed in CCSize operators
2013-05-05 19:51:44 +10:00
Adrien Béraud
637cc1a9ed
CCPoint::getDistance() implemented, CCPoint::length() renamed to getLength(), bug fixes
2013-05-05 02:58:46 +10:00
savdalion
5f549dd011
Added const modifier for classes CCArray, CCObject - fine code!
2013-05-04 15:05:06 +03:00
Adrien Béraud
b9fe35901a
Moved most CCPointExtension functions to CCPoint OO-equivalents
2013-05-04 17:18:22 +10:00
Adrien Béraud
b34dc25346
Cleaner constructors and overloads for CCSize; Cross-assignement and conversion constructors between CCPoint and CCSize.
2013-05-03 13:24:52 +10:00
Adrien Béraud
b627cd4674
overloading operators +-*/ in CCPoint
2013-05-02 15:13:03 +10:00
Adrien Béraud
9fb0081add
direct constructor for CCPoint
2013-05-02 14:59:50 +10:00
Sergey Shambir
3ae98978d4
Added CC_FORMAT_PRINTF to CCString
...
Added for CCString::initWithFormat() and CCString::createWithFormat().
Fixed warnings.
2013-04-19 14:00:16 +04:00