diff options
author | Starla Insigna <starla4444@gmail.com> | 2011-07-30 11:19:14 -0400 |
---|---|---|
committer | Starla Insigna <starla4444@gmail.com> | 2011-07-30 11:19:14 -0400 |
commit | 9cd57b731ab1c666d4a1cb725538fdc137763d12 (patch) | |
tree | 5bac45ae5157a1cb10c6e45500cbf72789917980 /libs/cocos2d/Support/ccUtils.c | |
download | cartcollect-9cd57b731ab1c666d4a1cb725538fdc137763d12.tar.gz cartcollect-9cd57b731ab1c666d4a1cb725538fdc137763d12.tar.bz2 cartcollect-9cd57b731ab1c666d4a1cb725538fdc137763d12.zip |
Initial commit (version 0.2.1)
Diffstat (limited to 'libs/cocos2d/Support/ccUtils.c')
-rwxr-xr-x | libs/cocos2d/Support/ccUtils.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libs/cocos2d/Support/ccUtils.c b/libs/cocos2d/Support/ccUtils.c new file mode 100755 index 0000000..39786ec --- /dev/null +++ b/libs/cocos2d/Support/ccUtils.c | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * cocos2d for iPhone: http://www.cocos2d-iphone.org | ||
3 | * | ||
4 | */ | ||
5 | |||
6 | /* | ||
7 | ccNextPOT function is licensed under the same license that is used in CCTexture2D.m. | ||
8 | */ | ||
9 | #include "ccUtils.h" | ||
10 | |||
11 | unsigned long ccNextPOT(unsigned long x) | ||
12 | { | ||
13 | x = x - 1; | ||
14 | x = x | (x >> 1); | ||
15 | x = x | (x >> 2); | ||
16 | x = x | (x >> 4); | ||
17 | x = x | (x >> 8); | ||
18 | x = x | (x >>16); | ||
19 | return x + 1; | ||
20 | } \ No newline at end of file | ||