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 * things_here; /* list of things below the player */
37 char * path_interface; /* path of interface configuration file */
38 char * path_commands; /* path of commands config file */
39 char * player_inventory; /* one-item-per-line string list of owned items */
40 char * mem_map; /* map cells of player's map memory */
41 char * queue; /* stores un-processed messages read from the input file */
42 struct yx_uint8 player_pos; /* coordinates of player on map */
43 struct yx_uint8 look_pos; /* coordinates of look cursor */
44 uint16_t turn; /* world/game turn */
45 int16_t player_satiation; /* player's belly fullness */
46 int16_t godsmood; /* island god's mood */ // 7DRL
47 int16_t godsfavor; /* island god's favor to player */ // 7DRL
48 uint8_t player_inventory_select; /* index of selected item in inventory */
49 uint8_t player_lifepoints; /* how alive the player is */
50 uint8_t winch; /* if set, SIGWINCH was registered; trigger reset_windows()*/
51 uint8_t look; /* if set, move look cursor over map intead of player */
56 extern struct World world;