--- deliantra/server/include/face.h 2007/07/01 05:00:18 1.18 +++ deliantra/server/include/face.h 2007/10/01 00:44:44 1.22 @@ -44,7 +44,7 @@ * face only - you can not change the color of an item - you need to instead * create a new face with that color. */ -struct faceinfo +struct faceinfo : zero_initialised { shstr name; std::string meta; @@ -52,14 +52,12 @@ faceidx number; /* This is the image id. It should be the */ /* same value as its position in the array */ faceidx smooth; /* the smooth face for this face, or 0 */ - uint8 type; // 0 normal face, 1 generic resource + uint8 type; // 0 normal face, otherwise other resource uint8 smoothlevel; // smoothlevel is per-face in 2.x servers uint8 visibility; uint8 magicmap; /* Color to show this in magic map */ - faceinfo () - : number (0), smooth (0), type (0), smoothlevel (0), visibility (0), magicmap (0) - { } + facedata *data (int faceset) const; }; inline void @@ -97,11 +95,11 @@ struct animation { - shstr name; /* Name of the animation sequence */ - animidx number; - uint8 num_animations; /* How many different faces to animate */ - uint8 facings; /* How many facings (1,2,4,8) */ faceidx *faces; /* The different animations */ + int num_animations; /* How many different faces to animate */ + sint8 facings; /* How many facings (1,2,4,8) */ + animidx number; + shstr name; /* Name of the animation sequence */ static animation &create (const char *name, uint8 frames, uint8 facings = 1); static animation &find (const char *name);