3 * This file is part of PlomRogue. PlomRogue is licensed under the GPL version 3
4 * or any later version. For details on its copyright, license, and warranties,
5 * see the file NOTICE in the root directory of the PlomRogue source package.
7 * Contains the World struct holding all quasi-global game data together.
13 #include <stdint.h> /* uint8_t, uint16_t */
14 #include <stdio.h> /* FILE */
15 #include <sys/types.h> /* time_t */
16 #include "../common/map.h" /* struct Map */
17 #include "../common/yx_uint8.h" /* struct yx_uint8 */
18 #include "keybindings.h" /* stuct KeyBindingDB */
19 #include "command_db.h" /* struct CommandDB */
20 #include "windows.h" /* WinDB */
26 FILE * file_server_in; /* server input file to write commands to */
27 FILE * file_server_out; /* server output file to read messages from */
28 struct WinDB winDB; /* data for window management and individual windows */
29 struct CommandDB commandDB; /* data on commands from commands config file */
30 struct KeyBindingDB kb_global; /* globally availabe keybindings */
31 struct KeyBindingDB kb_wingeom; /* Win geometry config view keybindings */
32 struct KeyBindingDB kb_winkeys; /* Win keybindings config view keybindings*/
33 struct Map map; /* game map geometry and content of player's map view */
34 time_t last_update; /* used for comparison with worldstate file's mtime */
35 char * log; /* log of player's activities */
36 char * path_interface; /* path of interface configuration file */
37 char * path_commands; /* path of commands config file */
38 char * player_inventory; /* one-item-per-line string list of owned items */
39 char * mem_map; /* map cells of player's map memory */
40 struct yx_uint8 player_pos; /* coordinates of player on map */
41 uint16_t turn; /* world/game turn */
42 uint8_t halfdelay; /* how long to wait for getch() input in io_loop() */
43 uint8_t player_inventory_select; /* index of selected item in inventory */
44 uint8_t player_lifepoints; /* how alive the player is */
45 uint8_t winch; /* if set, SIGWINCH was registered; trigger reset_windows()*/
46 uint8_t focus_each_turn; /* if !0, re-focus map on player each new turn */
51 extern struct World world;