X-Git-Url: https://plomlompom.com/repos/feed.xml?a=blobdiff_plain;f=src%2Fserver%2Fmap_objects.h;h=1e32318e1c503f10e4d50481ac46408f0e280be6;hb=4266e8b48fc5481ce24c0bf02fdd517217f8390a;hp=cf575f38b5d4389f206268c7867b5602d496dc12;hpb=784a54c9ef27aa2bf0754b2761aee06cbbde270e;p=plomrogue diff --git a/src/server/map_objects.h b/src/server/map_objects.h index cf575f3..1e32318 100644 --- a/src/server/map_objects.h +++ b/src/server/map_objects.h @@ -7,10 +7,8 @@ #ifndef MAP_OBJECTS_H #define MAP_OBJECTS_H -#include /* uint8_t, uint32_t */ -#include /* FILE */ +#include /* uint8_t */ #include "../common/yx_uint8.h" /* yx_uint8 structs */ -struct EntrySkeleton; @@ -19,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 */ @@ -36,16 +35,11 @@ struct MapObjDef 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? */ }; -/* Read-in to "entry" multi-line entry from MapObjDef config "file", using - * pre-allocated "line", "linemax" and "context" as input for err_try_fgets(). - */ -extern void read_map_object_def(char * line, uint32_t linemax, char * context, - struct EntrySkeleton * entry, FILE * file); - /* Free map object definitions chain starting at "mod_start". */ extern void free_map_object_defs(struct MapObjDef * mod_start);