blob: 93b18e50b7cf5dee008149847866794a348c4641 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
#pragma once
#include "game_fwd.hpp"
#include "alloc.hpp"
#include "birther.hpp"
#include "effect_type.hpp"
#include "game_edit_data.hpp"
#include "grid.hpp"
#include "h-basic.hpp"
#include "level_marker.hpp"
#include "messages.hpp"
#include "player_defs.hpp"
#include "powers.hpp"
#include "power_type.hpp"
#include "random_artifact.hpp"
#include "skill_type.hpp"
#include "timer_type_fwd.hpp"
#include "wilderness_map.hpp"
#include <boost/multi_array.hpp>
#include <unordered_map>
/**
* All structures for the game itself.
*/
struct Game {
/**
* Player character name
*/
std::string player_name;
/*
* Stripped version of "player_name"
*/
std::string player_base;
/**
* What did the player die from?
*/
std::string died_from;
/**
* Previous character
*/
birther previous_char;
/**
* Wilderness map
*/
grid<wilderness_map> wilderness;
/**
* Random artifacts
*/
std::vector<random_artifact> random_artifacts;
/**
* Allocations
*/
Alloc alloc;
/**
* Player's un-adjusted HP at every level.
* Stored to avoid shenanigans with draininging levels
* and restoring them back, &c.
*/
std::array<s16b, PY_MAX_LEVEL> player_hp { };
/**
* Powers
*/
std::unordered_map<
int,
std::shared_ptr<power_type>>
powers;
/**
* Message buffer.
*/
Messages messages { 2048 };
/**
* Game edit data
*/
GameEditData edit_data;
/**
* Current skill values.
*/
std::vector<skill_type> s_info;
/**
* Timers
*/
std::vector<timer_type *> timers;
/**
* Level generators
*/
std::unordered_map<std::string, std::function<bool()>> level_generators;
/**
* Level markers for 'special' levels.
*/
boost::multi_array<level_marker, 2> level_markers { };
/**
* Dungeon flags.
*/
dungeon_flag_set dungeon_flags { };
/**
* Lasting effects.
*/
std::vector<effect_type> lasting_effects { };
/**
* Generate a special level feeling?
*/
bool generate_special_feeling = false;
/**
* Construct a default instance.
*/
explicit Game();
};
|