/libs/cocos2d/Support/ccUtils.c
http://github.com/kstenerud/ObjectAL-for-iPhone · C · 18 lines · 10 code · 1 blank · 7 comment · 0 complexity · fe22f1980a9e5cb413b6e8431a477249 MD5 · raw file
- /*
- * cocos2d for iPhone: http://www.cocos2d-iphone.org
- *
- */
- /*
- ccNextPOT function is licensed under the same license that is used in CCTexture2D.m.
- */
- unsigned int ccNextPOT(unsigned int x)
- {
- x = x - 1;
- x = x | (x >> 1);
- x = x | (x >> 2);
- x = x | (x >> 4);
- x = x | (x >> 8);
- x = x | (x >>16);
- return x + 1;
- }