X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=src%2Fmap_objects.h;h=2307fb51fe776bb09f52e816b7294be86554dd49;hb=1ae2dac3529b3ead75c5bef1d02d958adcbcc581;hp=83ae7c5c610553097bb2684736abffbacb94777c;hpb=c1a7e6cdb13cd7d883424afdf0fe08e9a10fbc28;p=plomrogue diff --git a/src/map_objects.h b/src/map_objects.h index 83ae7c5..2307fb5 100644 --- a/src/map_objects.h +++ b/src/map_objects.h @@ -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);