Merge branch 'master' of https://github.com/cocos2d/cocos2d-x into issue702

This commit is contained in:
liswei 2011-08-30 16:39:13 +08:00
commit c8619240c4
2 changed files with 10 additions and 10 deletions

View File

@ -174,7 +174,7 @@ It should work same as apples CFSwapInt32LittleToHost(..)
/// when define returns true it means that our architecture uses big endian
#define CC_HOST_IS_BIG_ENDIAN (bool)(*(unsigned short *)"\0\xff" < 0x100)
#define CC_SWAP32(i) ((i & 0x000000ff) << 24 | (i & 0x0000ff00 << 8) | (i & 0x00ff0000) >> 8 | (i & 0xff000000) >> 24)
#define CC_SWAP32(i) ((i & 0x000000ff) << 24 | (i & 0x0000ff00) << 8 | (i & 0x00ff0000) >> 8 | (i & 0xff000000) >> 24)
#define CC_SWAP16(i) ((i & 0x00ff) << 8 | (i &0xff00) >> 8)
#define CC_SWAP_INT32_LITTLE_TO_HOST(i) ((CC_HOST_IS_BIG_ENDIAN == true)? CC_SWAP32(i) : (i) )
#define CC_SWAP_INT16_LITTLE_TO_HOST(i) ((CC_HOST_IS_BIG_ENDIAN == true)? CC_SWAP16(i) : (i) )

View File

@ -32,7 +32,7 @@ namespace cocos2d
struct CCZHeader {
unsigned char sig[4]; // signature. Should be 'CCZ!' 4 bytes
unsigned short compression_type; // should 0
unsigned char version; // should be 2 (although version type==1 is also supported)
unsigned short version; // should be 2 (although version type==1 is also supported)
unsigned int reserved; // Reserverd for users.
unsigned int len; // size of the uncompressed file
};