Cocos2d: Difference between ccp and CGPointMake?

In Cocos2d, many things require ... points. Or position. I used the ccp and CGPointMake methods, and both of them worked fine for me.

However, in some textbooks, I have seen that people use one or both of them in all of their examples. So I'm not sure if there is a real difference (because if there was no difference, I would just use the fast ccp method).

+5
source share
1 answer

There is no difference except CGPointMake is more difficult to enter:

#define     ccp(__X__, __Y__)   CGPointMake(__X__,__Y__)

Found here:

http://www.cocos2d-iphone.org/api-ref/0.99.3/_c_g_point_extension_8h_source.html

+19
source

All Articles