… | |
… | |
27 | #include <tr1/unordered_map> |
27 | #include <tr1/unordered_map> |
28 | |
28 | |
29 | #define CHKSUM_MAXLEN 15 |
29 | #define CHKSUM_MAXLEN 15 |
30 | #define MAX_FACES 65535 // we reserve face #65535 |
30 | #define MAX_FACES 65535 // we reserve face #65535 |
31 | |
31 | |
32 | typedef uint16 faceidx; |
|
|
33 | |
|
|
34 | extern faceidx blank_face, empty_face, magicmouth_face; |
32 | extern faceidx blank_face, empty_face, magicmouth_face; |
35 | |
33 | |
36 | struct facedata |
34 | struct facedata |
37 | { |
35 | { |
38 | refcnt_buf data; |
36 | uint32_t size; |
|
|
37 | uint32_t fofs; // file offste in facedatax |
39 | uint8 chksum[CHKSUM_MAXLEN]; |
38 | uint8 chksum[CHKSUM_MAXLEN]; |
40 | uint8 chksum_len; |
39 | uint8 chksum_len; |
41 | |
40 | |
42 | facedata () |
41 | facedata () |
43 | : chksum_len (0) |
42 | : size (0), fofs (0), chksum_len (0) |
44 | { } |
43 | { } |
45 | }; |
44 | }; |
46 | |
45 | |
47 | /* New face structure - this enforces the notion that data is face by |
46 | /* New face structure - this enforces the notion that data is face by |
48 | * face only - you can not change the color of an item - you need to instead |
47 | * face only - you can not change the color of an item - you need to instead |