X-Git-Url: https://plomlompom.com/repos/test.html?a=blobdiff_plain;f=src%2Fmap_objects.h;h=83ae7c5c610553097bb2684736abffbacb94777c;hb=c1a7e6cdb13cd7d883424afdf0fe08e9a10fbc28;hp=015864812c03bc6241499e3c8bf14720b1dd340c;hpb=6ba18516a602b3d4ad95981887ad9c5eb40a335a;p=plomrogue diff --git a/src/map_objects.h b/src/map_objects.h index 0158648..83ae7c5 100644 --- a/src/map_objects.h +++ b/src/map_objects.h @@ -68,6 +68,7 @@ struct ItemDef struct MonsterDef { struct MapObjDef map_obj_def; + uint8_t corpse_id; /* ID of object type killed monster changes to. */ uint8_t hitpoints_start; /* Hitpoints each monster starts with. */ }; @@ -78,6 +79,14 @@ extern void init_map_object_defs(struct World * world, char * filename); +/* Free item / monster definitions in map object chain starting at "md_start" / + * "id_start". + */ +extern void free_item_defs(struct ItemDef * id_start); +extern void free_monster_defs(struct MonsterDef * md_start); + + + /* Build into memory starting at "start" chain of "n" map objects of type * "def_id". */ @@ -91,7 +100,8 @@ extern void * build_map_objects(struct World * world, void * start, char def_id, */ extern uint8_t write_map_objects(struct World * world, void * start, FILE * file); -extern uint8_t read_map_objects(struct World * world, void * start, FILE * file); +extern uint8_t read_map_objects(struct World * world, void * start, + FILE * file);