… | |
… | |
50 | std::string meta; |
50 | std::string meta; |
51 | facedata data32, data64; // either 32/64 face or data32 == generic resource |
51 | facedata data32, data64; // either 32/64 face or data32 == generic resource |
52 | faceidx number; /* This is the image id. It should be the */ |
52 | faceidx number; /* This is the image id. It should be the */ |
53 | /* same value as its position in the array */ |
53 | /* same value as its position in the array */ |
54 | faceidx smooth; /* the smooth face for this face, or 0 */ |
54 | faceidx smooth; /* the smooth face for this face, or 0 */ |
55 | uint8 type; // 0 normal face, 1 generic resource |
55 | uint8 type; // 0 normal face, otherwise other resource |
56 | uint8 smoothlevel; // smoothlevel is per-face in 2.x servers |
56 | uint8 smoothlevel; // smoothlevel is per-face in 2.x servers |
57 | uint8 visibility; |
57 | uint8 visibility; |
58 | uint8 magicmap; /* Color to show this in magic map */ |
58 | uint8 magicmap; /* Color to show this in magic map */ |
59 | |
59 | |
60 | faceinfo () |
60 | faceinfo () |
61 | : number (0), smooth (0), type (0), smoothlevel (0), visibility (0), magicmap (0) |
61 | : number (0), smooth (0), type (0), smoothlevel (0), visibility (0), magicmap (0) |
62 | { } |
62 | { } |
|
|
63 | |
|
|
64 | facedata *data (int faceset) const; |
63 | }; |
65 | }; |
64 | |
66 | |
65 | inline void |
67 | inline void |
66 | object_freezer::put (keyword k, faceinfo *v) |
68 | object_freezer::put (keyword k, faceinfo *v) |
67 | { |
69 | { |
… | |
… | |
95 | |
97 | |
96 | typedef uint16 animidx; |
98 | typedef uint16 animidx; |
97 | |
99 | |
98 | struct animation |
100 | struct animation |
99 | { |
101 | { |
|
|
102 | faceidx *faces; /* The different animations */ |
|
|
103 | int num_animations; /* How many different faces to animate */ |
|
|
104 | sint8 facings; /* How many facings (1,2,4,8) */ |
|
|
105 | animidx number; |
100 | shstr name; /* Name of the animation sequence */ |
106 | shstr name; /* Name of the animation sequence */ |
101 | animidx number; |
|
|
102 | uint8 num_animations; /* How many different faces to animate */ |
|
|
103 | uint8 facings; /* How many facings (1,2,4,8) */ |
|
|
104 | faceidx *faces; /* The different animations */ |
|
|
105 | |
107 | |
106 | static animation &create (const char *name, uint8 frames, uint8 facings = 1); |
108 | static animation &create (const char *name, uint8 frames, uint8 facings = 1); |
107 | static animation &find (const char *name); |
109 | static animation &find (const char *name); |
108 | |
110 | |
109 | void resize (int new_size); |
111 | void resize (int new_size); |