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