home · contact · privacy
Unify Map struct common to server and client in src/common/map.h.
[plomrogue] / src / server / map_objects.h
index f30b016468f3dcc9d66a5d1775d58ae54b77cf2d..1e32318e1c503f10e4d50481ac46408f0e280be6 100644 (file)
@@ -17,6 +17,7 @@ struct MapObj
     struct MapObj * next;        /* pointer to next one in map object chain */
     struct MapObj * owns;        /* chain of map objects owned / in inventory */
     struct yx_uint8 pos;         /* coordinate on map */
+    uint8_t * fov_map;           /* map of the object's field of view */
     uint8_t id;                  /* individual map object's unique identifier */
     uint8_t type;                /* ID of appropriate map object definition */
     uint8_t lifepoints;          /* 0: object is inanimate; >0: hitpoints */
@@ -27,20 +28,18 @@ struct MapObj
 
 struct MapObjDef
 {
+    uint8_t id;         /* map object definition identifier / sets .type */
     struct MapObjDef * next;
     char char_on_map;   /* map object symbol to appear on map */
     char * name;        /* string to describe object in game log */
-    uint8_t id;         /* map object definition identifier / sets .type */
     uint8_t corpse_id;  /* type to change map object into upon destruction */
     uint8_t lifepoints; /* default start value for map object's .lifepoints */
     uint8_t consumable; /* can be eaten if !0, for so much hitpoint win */
+    uint8_t start_n;    /* how many of these does the map start with? */
 };
 
 
 
-/* Initialize map object definitions chain. */
-extern void init_map_object_defs();
-
 /* Free map object definitions chain starting at "mod_start". */
 extern void free_map_object_defs(struct MapObjDef * mod_start);