home · contact · privacy
MAJOR re-write. Split plomrogue into a server and a client. Re-wrote large parts
[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" /* struct WinMeta */
16 #include "wincontrol.h" /* WinConfDB */
17
18
19
20 struct World
21 {
22     struct WinMeta wmeta;
23     struct WinConfDB winconf_db;
24     struct CommandDB cmd_db;        /* Command database. */
25     struct KeyBindingDB kb_global;    /* Global keybindings. */
26     struct KeyBindingDB kb_wingeom;   /* Window geometry config keybindings. */
27     struct KeyBindingDB kb_winkeys; /* Window keybinding config keybindings.*/
28     struct Map map;                 /* Pointer to the game map cells. */
29     time_t last_update;
30     struct yx_uint16 player_pos;
31     char * log;
32     char * path_server_in;
33     char * player_inventory;
34     uint16_t turn;
35     uint16_t score;
36     uint8_t halfdelay;
37     uint8_t player_inventory_select;
38     uint8_t player_lifepoints;
39 };
40
41
42
43 extern struct World world;
44
45
46
47 #endif