From 9cd57b731ab1c666d4a1cb725538fdc137763d12 Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Sat, 30 Jul 2011 11:19:14 -0400 Subject: Initial commit (version 0.2.1) --- libs/cocos2d/Support/ccUtils.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 libs/cocos2d/Support/ccUtils.c (limited to 'libs/cocos2d/Support/ccUtils.c') 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 @@ +/* + * cocos2d for iPhone: http://www.cocos2d-iphone.org + * + */ + +/* + ccNextPOT function is licensed under the same license that is used in CCTexture2D.m. + */ +#include "ccUtils.h" + +unsigned long ccNextPOT(unsigned long 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; +} \ No newline at end of file -- cgit 1.4.1