X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=src%2Fmap_objects.h;h=a905b7bc48f4f788729fc886fe6fa9f37d15fc17;hb=c681a0fed768dfff7af1084dedeec25ab8a421fa;hp=a5156f47d2a98b3cde51d1a40204ff6f54378baf;hpb=c7cdbe6260e5cd6a8efe2c73a02c9635b67ec4b7;p=plomrogue diff --git a/src/map_objects.h b/src/map_objects.h index a5156f4..a905b7b 100644 --- a/src/map_objects.h +++ b/src/map_objects.h @@ -10,6 +10,7 @@ #include /* for FILE typedef */ +#include /* for uint8_t */ #include "yx_uint16.h" /* for yx_uint16 coordinates */ struct World; @@ -19,7 +20,7 @@ struct World; struct Player { struct yx_uint16 pos; - unsigned char hitpoints; + uint8_t hitpoints; }; @@ -41,7 +42,7 @@ struct Item struct Monster { struct MapObj map_obj; - unsigned char hitpoints; + uint8_t hitpoints; }; @@ -67,7 +68,7 @@ struct ItemDef struct MonsterDef { struct MapObjDef map_obj_def; - unsigned char hitpoints_start; /* Hitpoints each monster starts with. */ + uint8_t hitpoints_start; /* Hitpoints each monster starts with. */ }; @@ -81,15 +82,17 @@ extern void init_map_object_defs(struct World * world, char * filename); * "def_id". */ extern void * build_map_objects(struct World * world, void * start, char def_id, - unsigned char n); + uint8_t n); /* Write to/read from file chain of map objects starting/to start in memory at * "start". */ -extern void write_map_objects(struct World * world, void * start, FILE * file); -extern void read_map_objects(struct World * world, void * start, FILE * file); +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);