X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=src%2Fserver%2Fmap_objects.h;h=a73aa801bdd2e0777d007d2383164c2bfd23ef84;hb=cdb90723dd636591bcfa98ebb165cf74a0cdeec7;hp=d5dc5b33f111f1f31d7a18b4a6692f96c69e6fe0;hpb=dd9d65ee727ac7e95801da0f8b5bae7009811802;p=plomrogue diff --git a/src/server/map_objects.h b/src/server/map_objects.h index d5dc5b3..a73aa80 100644 --- a/src/server/map_objects.h +++ b/src/server/map_objects.h @@ -8,7 +8,7 @@ #define MAP_OBJECTS_H #include /* uint8_t */ -#include "../common/yx_uint16.h" /* yx_uint16 structs */ +#include "../common/yx_uint8.h" /* yx_uint8 structs */ @@ -16,11 +16,11 @@ 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_uint16 pos; /* coordinate on map */ + struct yx_uint8 pos; /* coordinate on map */ 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 */ - uint8_t command; /* map object's current action */ + uint8_t command; /* map object's current action; 0 if none */ uint8_t arg; /* optional field for .command argument */ uint8_t progress; /* turns already passed to realize .command */ }; @@ -37,8 +37,8 @@ struct MapObjDef -/* Initialize map object definitions chain from file at path "filename". */ -extern void init_map_object_defs(char * filename); +/* Initialize map object definitions chain. */ +extern void init_map_object_defs(); /* Free map object definitions chain starting at "mod_start". */ extern void free_map_object_defs(struct MapObjDef * mod_start); @@ -62,7 +62,7 @@ extern struct MapObj * get_player(); extern struct MapObjDef * get_map_object_def(uint8_t id); /* Move not only "mo" to "pos", but also all map objects owned by it. */ -extern void set_object_position(struct MapObj * mo, struct yx_uint16 pos); +extern void set_object_position(struct MapObj * mo, struct yx_uint8 pos);