btw, i am not sure whether the structure of CCZHeader is correct or not ?
in cocos2d-x 1.0.1-x-0.9.1
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 int reserved; // Reserverd for users.
unsigned int len; // size of the uncompressed file
};
but in cocos2d-1.0.0
struct CCZHeader {
uint8_t sig[4]; // signature. Should be 'CCZ!' 4 bytes
uint16_t compression_type; // should 0
uint16_t version; // should be 2 (although version type==1 is also supported)
uint32_t reserved; // Reserverd for users.
uint32_t len; // size of the uncompressed file
};
the type of version is different between two versions, and i think the version must is unsigned short.
would you take a look at it ?
best regards.
Thanks for your report.
Yep it’s a bug here. I miss the ‘)’ with a stupid typo. And CCZHeader.version should be unsigned short.
I will fix them soon. Bug #700, #701.
Hi, Tix Lo, One more question, which platform & which test case to reproduce the error of CC_SWAP32?
I have tried iphone/android/win32, but seems the logic hasn’t went into CC_SWAP32. I’m a bit lazy to rewrite the macro into functions for setting break points in it