X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/%7B%7Bdeck_id%7D%7D/cards/%7B%7Bcard_id%7D%7D/form?a=blobdiff_plain;f=src%2Fserver%2Fworld.h;h=be772fcd3ed473ebd0bb50e6c00ab9c2d20d9cd2;hb=639a12151eeb7ce0d18de330b4bb8d9d8094c4d3;hp=3bea1f1cf4ce7a9e7084c2f3662515c7df6fbd95;hpb=6052be616897d692fc57ab15b56266b4b3f4668b;p=plomrogue diff --git a/src/server/world.h b/src/server/world.h index 3bea1f1..be772fc 100644 --- a/src/server/world.h +++ b/src/server/world.h @@ -7,7 +7,8 @@ #define MAIN_H #include /* uint8_t, uint16_t, uint32_t */ -#include "../common/map.h" /* struct Map */ +#include /* define FILE */ +#include "map.h" /* struct Map */ struct MapObjDef; struct MapObjAct; struct MapObj; @@ -16,26 +17,30 @@ struct MapObj; 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. */ 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 map object (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. */ - uint16_t score; /* Player's score. */ + uint8_t player_type; /* Map object 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 enemy_fov; /* != 0 if non-player actors only see field of view. */ }; extern struct World world;