You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On behalf from latest TexturePacker added his code changes from website, for details on contentprotection see: https://www.codeandweb.com/texturepacker/contentprotection
Original ZipUtils could not handle pvr.ccz version 2 correctly (wrong byte header), currently version 3 (pvr.ccz = pvr+zlib) works fine.
Copy file name to clipboardExpand all lines: cocos2d/Support/ZipUtils.h
+28-4
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,26 @@
20
20
#ifdef __cplusplus
21
21
extern"C" {
22
22
#endif
23
+
24
+
/**
25
+
* Set the TexturePacker encryption key
26
+
*
27
+
* If your key used to encrypt the pvr.ccz file is
28
+
* aaaaaaaabbbbbbbbccccccccdddddddd
29
+
* you have to call this function 4 times:
30
+
* caw_setkey_part(0, 0xaaaaaaaa);
31
+
* caw_setkey_part(1, 0xbbbbbbbb);
32
+
* caw_setkey_part(2, 0xcccccccc);
33
+
* caw_setkey_part(3, 0xdddddddd);
34
+
*
35
+
* Distribute the call accross some files but make sure
36
+
* to call all of the parts *before* loading the first
37
+
* spritesheet.
38
+
*
39
+
* @param index part of the key [0..3]
40
+
* @param value value of the key part
41
+
*/
42
+
voidcaw_setkey_part(intindex, uint32_t value);
23
43
24
44
/* XXX: pragma pack ??? */
25
45
/** @struct CCZHeader
@@ -28,7 +48,7 @@ extern "C" {
28
48
uint8_t sig[4]; // signature. Should be 'CCZ!' 4 bytes
29
49
uint16_t compression_type; // should 0
30
50
uint16_t version; // should be 2 (although version type==1 is also supported)
31
-
uint32_t reserved; //Reserved for users.
51
+
uint32_t reserved; //Reserverd for users.
32
52
uint32_t len; // size of the uncompressed file
33
53
};
34
54
@@ -47,35 +67,39 @@ extern "C" {
47
67
* Inflates either zlib or gzip deflated memory. The inflated memory is
48
68
* expected to be freed by the caller.
49
69
*
50
-
* It will allocate 256k for the destination buffer. If it is not enough it will multiply the previous buffer size per 2, until there is enough memory.
70
+
* 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.
0 commit comments