Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cocos2d: Difference between ccp and CGPointMake?

In Cocos2d, many things require a.. point. Or position. I have used both ccp and CGPointMake methods, and both have worked just fine for me.

However, I've seen, in some tutorials, that people use one or both of them in all their examples. So I'm not sure if there's an actual difference (because if there wasn't a difference, I'd just use the quick method ccp).

like image 955
Voldemort Avatar asked Aug 15 '11 22:08

Voldemort


1 Answers

Nope no difference except CGPointMake is harder to type:

#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

like image 122
Dair Avatar answered Oct 20 '22 01:10

Dair