X-Git-Url: https://plomlompom.com/repos/feed.xml?a=blobdiff_plain;f=src%2Fserver%2Fworld.h;h=91a32a7cbf0d2e117f38a4121768b5c0a636eeec;hb=d92f16d5959fc846d3eaf669517eecb3969cda08;hp=84235ce42d2622a3dab38577c8b0bc1a5d3d2bf5;hpb=eb96a1dfe83cef7f3d1c0c73e03b915caca09db8;p=plomrogue diff --git a/src/server/world.h b/src/server/world.h index 84235ce..91a32a7 100644 --- a/src/server/world.h +++ b/src/server/world.h @@ -7,34 +7,40 @@ #define MAIN_H #include /* uint8_t, uint16_t, uint32_t */ -#include "map.h" /* struct Map */ -struct MapObjDef; -struct MapObjAct; -struct MapObj; +#include /* define FILE */ +#include "../common/map.h" /* struct Map */ +struct ThingType; +struct ThingAction; +struct Thing; struct World { + FILE * file_in; /* Input stream on file at .path_in. */ + FILE * file_out; /* Output stream on file at .path_out. */ struct Map map; - struct MapObjDef * map_obj_defs; /* Map object definitions. */ - struct MapObjAct * map_obj_acts; /* Map object action definitions. */ - struct MapObj * map_objs; /* Map objects. */ + struct ThingType * thing_types; /* Thing type definitions. */ + struct ThingAction * thing_actions; /* Thing action definitions. */ + struct Thing * things; /* All physical things of the game world. */ char * log; /* Logs the game events from the player's view. */ - char * path_in; /* Fifo to receive command messages. */ - char * path_out; /* File to write the game state as visible to clients.*/ + char * server_test; /* String uniquely identifying server process. */ + char * path_in; /* File to write client messages into. */ + char * path_out; /* File to write server messages into. */ + char * path_worldstate; /* File to represent world state to clients.*/ char * path_record; /* Record file from which to read the game history. */ - char * path_map_obj_defs; /* path for map object definitions config file */ - char * path_map_obj_acts; /* path for map object actions config file */ + char * path_config; /* Path for thing type / action definitions file. */ char * tmp_suffix; /* Appended to paths of files for their tmp versions. */ - char * queue; /* Stores un-processed messages received via input fifo. */ + char * queue; /* Stores un-processed messages read from the input file. */ uint32_t queue_size;/* Length of .queue sequence of \0-terminated strings.*/ uint32_t seed; /* Randomness seed. */ uint16_t replay; /* Turn up to which to replay game. No replay if zero. */ uint16_t turn; /* Current game turn. */ uint16_t last_update_turn; /* Last turn the .path_out file was updated. */ + uint8_t player_type; /* Thing type that player will start as. */ uint8_t is_verbose; /* Should server send debugging info to stdout? */ - uint8_t map_obj_count; /* Counts map objects generated so far. */ + uint8_t thing_count; /* Counts things generated so far. */ + uint8_t enemy_fov; /* != 0 if non-player actors only see field of view. */ }; extern struct World world;