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.19 by root, Thu Jul 12 08:40:14 2007 UTC vs.
Revision 1.23 by elmex, Thu Nov 8 14:15:56 2007 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines