home · contact · privacy
Fixed bug that led to endless loop in nearest_enemy_dir().
[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 #include <stdint.h> /* for uint32_t*/
10 #include "keybindings.h" /* for KeyBiData struct */
11 struct WinMeta;
12 struct WinConf;
13 struct Map;
14 struct MapObjDef;
15 struct MapObj;
16 struct MapObjAct;
17
18
19
20 struct World
21 {
22     char interactive;                 /* 1: playing; 0: record playback. */
23     struct KeyBiData kb_global;       /* Global keybindings. */
24     struct KeyBiData kb_wingeom;      /* Window geometry config keybindings. */
25     struct KeyBiData kb_winkeys;      /* Window keybinding config keybindings.*/
26     uint32_t seed;                    /* Randomness seed. */
27     uint32_t mapseed;                 /* Initial randomness seed used for map.*/
28     uint32_t turn;                    /* Current game turn. */
29     uint16_t score;                   /* Player's score. */
30     char * log;                       /* Pointer to the game log string. */
31     struct Map * map;                 /* Pointer to the game map cells. */
32     struct CommandDB * cmd_db;        /* Pointer to the command database. */
33     struct WinMeta * wmeta;           /* Pointer to window manager's WinMeta. */
34     struct WinConf * winconfs;        /* Pointer to windows' configurations. */
35     char * winconf_ids;               /* Pointer to string of Winconfs' ids. */
36     uint8_t map_obj_count;            /* Counts map objects generated so far. */
37     struct MapObjDef * map_obj_defs;  /* Map object type definitions chain. */
38     struct MapObj * map_objs;         /* Pointer to map objects chain start. */
39     uint8_t inventory_sel;            /* Player's inventory selection index. */
40     struct MapObjAct * map_obj_acts;  /* Pointer to map object actions chain. */
41 } world;
42
43
44
45 #endif