cocos2d-x 3.x이상 버젼을 사용 하면서 작업시 

__Array 에서 인덱스 값을 갖고 올시 불편한 점이 많다.. 그래서 매크로를 만들어 놓고 작업을 하면됨


// Ref -> std::string

#define ccsf(...)        __String::createWithFormat(__VA_ARGS__)->getCString()

// Ref -> int

#define LMToInt(...)     ((__String*)(__VA_ARGS__))->intValue()

// Ref -> __String

#define LMToString(...)  (__String*)(__VA_ARGS__)


#define ccf(...)        __String::createWithFormat(__VA_ARGS__)



위 4개가 주로 이용 됨.


이상입니다.~

+ Recent posts