home · contact · privacy
Individual map objects are now identified by unique numbers stored in the savefiles...
[plomrogue] / src / map_objects.h
index 83ae7c5c610553097bb2684736abffbacb94777c..2307fb51fe776bb09f52e816b7294be86554dd49 100644 (file)
@@ -30,6 +30,7 @@ struct Player
 struct MapObj
 {
     void * next;
+    uint8_t id;           /* Unique identifier of individual map object. */
     char type;            /* Map object type identifier (see MapObjDef.id). */
     struct yx_uint16 pos; /* Coordinate of object on map. */
 };
@@ -104,6 +105,9 @@ extern uint8_t read_map_objects(struct World * world, void * start,
                                 FILE * file);
 
 
+/* Free items / monsters in map object chain starting at "item" / "monster". */
+extern void free_items(struct Item * item);
+extern void free_monsters(struct Monster * monster);
 
 /* Get pointer to the map object definition of identifier "def_id". */
 extern struct MapObjDef * get_map_obj_def(struct World * world, char def_id);