--- deliantra/server/include/face.h 2007/03/11 02:12:44 1.9 +++ deliantra/server/include/face.h 2007/03/14 00:04:58 1.10 @@ -34,30 +34,31 @@ extern faceidx blank_face, empty_face; +struct facedata +{ + std::string data; + uint8 chksum[CHKSUM_SIZE]; +}; + /* New face structure - this enforces the notion that data is face by * 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; + facedata data32, data64; 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 visibility; uint8 magicmap; /* Color to show this in magic map */ }; -struct facedata -{ - std::string data; - uint8 chksum[CHKSUM_SIZE]; -}; - typedef std::tr1::unordered_map >, true> facehash_t; extern facehash_t facehash; extern std::vector faces; -extern std::vector face32, face64; /* This returns an the face number of face 'name'. Number is constant * during an invocation, but not necessarily between versions (this @@ -69,8 +70,9 @@ * if you want some default face used, or can be set to negative so that * it will be known that the face could not be found. */ -int face_find (const char *name, int defidx = 0); -facedata *face_data (int idx, int faceset); +faceidx face_find (const char *name, faceidx defidx = 0); +faceinfo *face_info (faceidx idx); +facedata *face_data (faceidx idx, int faceset); struct MapLook {