Currently I’m storing integer grid coordinates in CGPoints using the ccp macro. Is there anything like ccpi in Cocos2d for iPhone that stores a pair of integers?
Currently I’m storing integer grid coordinates in CGPoints using the ccp macro. Is there
Share
Well, CGPoint is a struct that contains 2 floats. So, if you want to store a pair of integers instead, one way would be to roll your own struct with integers.
With that, you could then define your own “ccpi” macro if you wish: