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 * meta_map_0; /* map cells metadata */ // 7DRL
42 char * meta_map_1; /* map cells metadata */ // 7DRL
43 char * queue; /* stores un-processed messages read from the input file */
44 struct yx_uint8 player_pos; /* coordinates of player on map */
45 struct yx_uint8 look_pos; /* coordinates of look cursor */
46 uint16_t turn; /* world/game turn */
47 uint16_t things_here_scroll; /* scroll position things here win */ // 7DRL
48 int16_t player_satiation; /* player's belly fullness */
49 int16_t godsmood; /* island god's mood */ // 7DRL
50 int16_t godsfavor; /* island god's favor to player */ // 7DRL
51 uint8_t player_inventory_select; /* index of selected item in inventory */
52 uint8_t player_lifepoints; /* how alive the player is */
53 uint8_t winch; /* if set, SIGWINCH was registered; trigger reset_windows()*/
54 uint8_t look; /* if set, move look cursor over map intead of player */
59 extern struct World world;