home · contact · privacy
Added primitive inventory system. Any objects may now own/contain/carry other objects.
[plomrogue] / src / main.h
1 /* main.h
2  *
3  * Contains the World struct holding all game data together.
4  */
5
6 #ifndef MAIN_H
7 #define MAIN_H
8
9
10
11 #include <stdint.h> /* for uint32_t*/
12 #include "keybindings.h"
13 struct WinMeta;
14 struct WinConf;
15 struct Win;
16 struct Map;
17 struct MapObjDef;
18 struct MapObj;
19
20
21
22 struct World
23 {
24     char interactive;                 /* 1: playing; 0: record playback. */
25     struct KeyBiData kb_global;       /* Global keybindings. */
26     struct KeyBiData kb_wingeom;      /* Window geometry config keybindings. */
27     struct KeyBiData kb_winkeys;      /* Window keybinding config keybindings.*/
28     uint32_t seed;                    /* Randomness seed. */
29     uint32_t turn;                    /* Current game turn. */
30     uint16_t score;                   /* Player's score. */
31     char * log;                       /* Pointer to the game log string. */
32     struct Map * map;                 /* Pointer to the game map cells. */
33     struct CommandDB * cmd_db;        /* Pointer to the command database. */
34     struct WinMeta * wmeta;           /* Pointer to window manager's WinMeta. */
35     struct WinConf * winconfs;        /* Pointer to windows' configurations. */
36     char * winconf_ids;               /* Pointer to string of Winconfs' ids. */
37     uint8_t map_obj_count;            /* Counts map objects generated so far. */
38     struct MapObjDef * map_obj_defs;  /* Map object type definitions chain. */
39     struct MapObj * map_objs;         /* Pointer to map objects chain start. */
40     uint8_t inventory_select;         /* Player's inventory selection index. */
41 };
42
43
44
45 #endif