home · contact · privacy
Merged Win and WinConf structs, windows.h and wincontrol.h. Also lots of refactoring...
[plomrogue] / src / client / world.h
1 /* src/client/world.h
2  *
3  * Contains the World struct holding all quasi-global game data together.
4  */
5
6 #ifndef WORLD_H
7 #define WORLD_H
8
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 */
16
17
18
19 struct World
20 {
21     struct WinDB windb;
22     struct CommandDB cmd_db;        /* Command database. */
23     struct KeyBindingDB kb_global;    /* Global keybindings. */
24     struct KeyBindingDB kb_wingeom;   /* Window geometry config keybindings. */
25     struct KeyBindingDB kb_winkeys; /* Window keybinding config keybindings.*/
26     struct Map map;                 /* Pointer to the game map cells. */
27     time_t last_update;
28     struct yx_uint16 player_pos;
29     char * log;
30     char * path_server_in;
31     char * path_interface_conf;
32     char * player_inventory;
33     uint16_t turn;
34     uint16_t score;
35     uint8_t halfdelay;
36     uint8_t player_inventory_select;
37     uint8_t player_lifepoints;
38     uint8_t winch; /* if set, SIGWINCH was registered; trigger reset_windows()*/
39 };
40
41
42
43 extern struct World world;
44
45
46
47 #endif