mirror of https://github.com/axmolengine/axmol.git
Merge branch 'master' of https://github.com/cocos2d/cocos2d-x into issue702
This commit is contained in:
commit
c8619240c4
|
@ -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) )
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
@ -47,14 +47,14 @@ namespace cocos2d
|
|||
class ZipUtils
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Inflates either zlib or gzip deflated memory. The inflated memory is
|
||||
* expected to be freed by the caller.
|
||||
*
|
||||
* It will allocate 256k for the destination buffer. If it is not enought it will multiply the previous buffer size per 2, until there is enough memory.
|
||||
* @returns the length of the deflated buffer
|
||||
*
|
||||
@since v0.8.1
|
||||
/**
|
||||
* Inflates either zlib or gzip deflated memory. The inflated memory is
|
||||
* expected to be freed by the caller.
|
||||
*
|
||||
* It will allocate 256k for the destination buffer. If it is not enought it will multiply the previous buffer size per 2, until there is enough memory.
|
||||
* @returns the length of the deflated buffer
|
||||
*
|
||||
@since v0.8.1
|
||||
*/
|
||||
static int ccInflateMemory(unsigned char *in, unsigned int inLength, unsigned char **out);
|
||||
|
||||
|
|
Loading…
Reference in New Issue