ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/face.h
(Generate patch)

Comparing deliantra/server/include/face.h (file contents):
Revision 1.20 by root, Tue Jul 24 04:55:34 2007 UTC vs.
Revision 1.22 by root, Mon Oct 1 00:44:44 2007 UTC

42 42
43/* New face structure - this enforces the notion that data is face by 43/* New face structure - this enforces the notion that data is face by
44 * face only - you can not change the color of an item - you need to instead 44 * face only - you can not change the color of an item - you need to instead
45 * create a new face with that color. 45 * create a new face with that color.
46 */ 46 */
47struct faceinfo 47struct faceinfo : zero_initialised
48{ 48{
49 shstr name; 49 shstr name;
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 */
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, otherwise other 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
60 faceinfo ()
61 : number (0), smooth (0), type (0), smoothlevel (0), visibility (0), magicmap (0)
62 { }
63 59
64 facedata *data (int faceset) const; 60 facedata *data (int faceset) const;
65}; 61};
66 62
67inline void 63inline void
97 93
98typedef uint16 animidx; 94typedef uint16 animidx;
99 95
100struct animation 96struct animation
101{ 97{
98 faceidx *faces; /* The different animations */
99 int num_animations; /* How many different faces to animate */
100 sint8 facings; /* How many facings (1,2,4,8) */
101 animidx number;
102 shstr name; /* Name of the animation sequence */ 102 shstr name; /* Name of the animation sequence */
103 animidx number;
104 uint8 num_animations; /* How many different faces to animate */
105 uint8 facings; /* How many facings (1,2,4,8) */
106 faceidx *faces; /* The different animations */
107 103
108 static animation &create (const char *name, uint8 frames, uint8 facings = 1); 104 static animation &create (const char *name, uint8 frames, uint8 facings = 1);
109 static animation &find (const char *name); 105 static animation &find (const char *name);
110 106
111 void resize (int new_size); 107 void resize (int new_size);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines