3 * Contains the World struct holding all quasi-global game data together.
9 #include <stdint.h> /* uint8_t, uint16_t */
10 #include <stdio.h> /* FILE */
11 #include <sys/types.h> /* time_t */
12 #include "../common/map.h" /* struct Map */
13 #include "../common/yx_uint8.h" /* struct yx_uint8 */
14 #include "keybindings.h" /* stuct KeyBindingDB */
15 #include "command_db.h" /* struct CommandDB */
16 #include "windows.h" /* WinDB */
22 FILE * file_server_in; /* server input file to write commands to */
23 FILE * file_server_out; /* server output file to read messages from */
24 struct WinDB winDB; /* data for window management and individual windows */
25 struct CommandDB commandDB; /* data on commands from commands config file */
26 struct KeyBindingDB kb_global; /* globally availabe keybindings */
27 struct KeyBindingDB kb_wingeom; /* Win geometry config view keybindings */
28 struct KeyBindingDB kb_winkeys; /* Win keybindings config view keybindings*/
29 struct Map map; /* game map geometry and content */
30 time_t last_update; /* used for comparison with worldstate file's mtime */
31 char * log; /* log of player's activities */
32 char * path_interface; /* path of interface configuration file */
33 char * path_commands; /* path of commands config file */
34 char * player_inventory; /* one-item-per-line string list of owned items */
35 struct yx_uint8 player_pos; /* coordinates of player on map */
36 uint16_t turn; /* world/game turn */
37 uint8_t halfdelay; /* how long to wait for getch() input in io_loop() */
38 uint8_t player_inventory_select; /* index of selected item in inventory */
39 uint8_t player_lifepoints; /* how alive the player is */
40 uint8_t winch; /* if set, SIGWINCH was registered; trigger reset_windows()*/
41 uint8_t focus_each_turn; /* if !0, re-focus map on player each new turn */
46 extern struct World world;