3 * Contains the World struct holding all game data together.
9 #include <stdint.h> /* uint8_t, uint16_t, uint32_t */
10 #include <stdio.h> /* define FILE */
11 #include "map.h" /* struct Map */
20 FILE * file_in; /* Input stream on file at .path_in. */
21 FILE * file_out; /* Output stream on file at .path_out. */
23 struct MapObjDef * map_obj_defs; /* Map object definitions. */
24 struct MapObjAct * map_obj_acts; /* Map object action definitions. */
25 struct MapObj * map_objs; /* Map objects. */
26 char * log; /* Logs the game events from the player's view. */
27 char * server_test; /* String uniquely identifying server process. */
28 char * path_in; /* File to write client messages into. */
29 char * path_out; /* File to write server messages into. */
30 char * path_worldstate; /* File to represent world state to clients.*/
31 char * path_record; /* Record file from which to read the game history. */
32 char * path_map_obj_defs; /* path for map object definitions config file */
33 char * path_map_obj_acts; /* path for map object actions config file */
34 char * tmp_suffix; /* Appended to paths of files for their tmp versions. */
35 char * queue; /* Stores un-processed messages read from the input file. */
36 uint32_t queue_size;/* Length of .queue sequence of \0-terminated strings.*/
37 uint32_t seed; /* Randomness seed. */
38 uint16_t replay; /* Turn up to which to replay game. No replay if zero. */
39 uint16_t turn; /* Current game turn. */
40 uint16_t last_update_turn; /* Last turn the .path_out file was updated. */
41 uint8_t is_verbose; /* Should server send debugging info to stdout? */
42 uint8_t map_obj_count; /* Counts map objects generated so far. */
45 extern struct World world;