about summary refs log tree commit diff stats
path: root/src/game_data.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/game_data.h')
-rw-r--r--src/game_data.h46
1 files changed, 40 insertions, 6 deletions
diff --git a/src/game_data.h b/src/game_data.h index 3afaec3..8d3db4b 100644 --- a/src/game_data.h +++ b/src/game_data.h
@@ -22,6 +22,7 @@ enum class LingoColor {
22constexpr int kLOCATION_NORMAL = 1; 22constexpr int kLOCATION_NORMAL = 1;
23constexpr int kLOCATION_REDUCED = 2; 23constexpr int kLOCATION_REDUCED = 2;
24constexpr int kLOCATION_INSANITY = 4; 24constexpr int kLOCATION_INSANITY = 4;
25constexpr int kLOCATION_SMALL_SPHERE_ONE = 8;
25 26
26enum class EntranceType { 27enum class EntranceType {
27 kNormal, 28 kNormal,
@@ -30,6 +31,7 @@ enum class EntranceType {
30 kWarp, 31 kWarp,
31 kPilgrimage, 32 kPilgrimage,
32 kCrossroadsRoofAccess, 33 kCrossroadsRoofAccess,
34 kStaticPainting,
33}; 35};
34 36
35enum class DoorType { 37enum class DoorType {
@@ -42,6 +44,7 @@ struct Panel {
42 int id; 44 int id;
43 int room; 45 int room;
44 std::string name; 46 std::string name;
47 std::string nodepath;
45 std::vector<LingoColor> colors; 48 std::vector<LingoColor> colors;
46 std::vector<int> required_rooms; 49 std::vector<int> required_rooms;
47 std::vector<int> required_doors; 50 std::vector<int> required_doors;
@@ -50,9 +53,12 @@ struct Panel {
50 bool exclude_reduce = false; 53 bool exclude_reduce = false;
51 bool achievement = false; 54 bool achievement = false;
52 std::string achievement_name; 55 std::string achievement_name;
56 std::string location_name;
53 bool non_counting = false; 57 bool non_counting = false;
54 int ap_location_id = -1; 58 int ap_location_id = -1;
55 bool hunt = false; 59 bool hunt = false;
60 int panel_door = -1;
61 int solve_index = -1;
56}; 62};
57 63
58struct ProgressiveRequirement { 64struct ProgressiveRequirement {
@@ -80,21 +86,34 @@ struct Door {
80 DoorType type = DoorType::kNormal; 86 DoorType type = DoorType::kNormal;
81}; 87};
82 88
89struct PanelDoor {
90 int ap_item_id = -1;
91 int group_ap_item_id = -1;
92 std::vector<ProgressiveRequirement> progressives;
93 std::string item_name;
94};
95
83struct Exit { 96struct Exit {
97 int source_room;
84 int destination_room; 98 int destination_room;
85 std::optional<int> door; 99 std::optional<int> door;
86 EntranceType type = EntranceType::kNormal; 100 EntranceType type = EntranceType::kNormal;
87}; 101};
88 102
89struct PaintingExit { 103struct PaintingExit {
90 std::string id; 104 int id;
105 int room;
106 std::string internal_id;
107 std::string display_name;
91 std::optional<int> door; 108 std::optional<int> door;
109 bool entrance = false;
110 int map_area;
92}; 111};
93 112
94struct Room { 113struct Room {
95 std::string name; 114 std::string name;
96 std::vector<Exit> exits; 115 std::vector<Exit> exits;
97 std::vector<PaintingExit> paintings; 116 std::vector<int> paintings;
98 std::vector<int> sunwarps; 117 std::vector<int> sunwarps;
99 std::vector<int> panels; 118 std::vector<int> panels;
100}; 119};
@@ -107,16 +126,19 @@ struct Location {
107 std::vector<int> panels; 126 std::vector<int> panels;
108 int classification = 0; 127 int classification = 0;
109 bool hunt = false; 128 bool hunt = false;
129 std::optional<int> single_panel;
110}; 130};
111 131
112struct MapArea { 132struct MapArea {
113 int id; 133 int id;
114 std::string name; 134 std::string name;
115 std::vector<Location> locations; 135 std::vector<Location> locations;
136 std::vector<int> paintings;
116 int map_x; 137 int map_x;
117 int map_y; 138 int map_y;
118 int classification = 0; 139 int classification = 0;
119 bool hunt = false; 140 bool hunt = false;
141 bool has_single_panel = false;
120}; 142};
121 143
122enum class SubwaySunwarpType { 144enum class SubwaySunwarpType {
@@ -136,11 +158,16 @@ struct SubwayItem {
136 int id; 158 int id;
137 int x; 159 int x;
138 int y; 160 int y;
161 bool tilted = false;
139 std::optional<int> door; 162 std::optional<int> door;
140 std::vector<std::string> paintings; 163 std::optional<std::string> painting;
141 std::vector<std::string> tags; 164 std::vector<std::string> tags; // 2-way teleports
165 std::vector<std::string> entrances; // teleport entrances
166 std::vector<std::string> exits; // teleport exits
142 std::optional<SubwaySunwarp> sunwarp; 167 std::optional<SubwaySunwarp> sunwarp;
143 std::optional<std::string> special; 168 std::optional<std::string> special;
169
170 bool HasWarps() const;
144}; 171};
145 172
146const std::vector<MapArea>& GD_GetMapAreas(); 173const std::vector<MapArea>& GD_GetMapAreas();
@@ -151,14 +178,21 @@ const std::vector<Door>& GD_GetDoors();
151const Door& GD_GetDoor(int door_id); 178const Door& GD_GetDoor(int door_id);
152int GD_GetDoorByName(const std::string& name); 179int GD_GetDoorByName(const std::string& name);
153const Panel& GD_GetPanel(int panel_id); 180const Panel& GD_GetPanel(int panel_id);
154int GD_GetRoomForPainting(const std::string& painting_id); 181int GD_GetPanelBySolveIndex(int solve_index);
182const PanelDoor& GD_GetPanelDoor(int panel_door_id);
183const std::vector<PaintingExit>& GD_GetPaintings();
184const PaintingExit& GD_GetPaintingExit(int painting_id);
185int GD_GetPaintingByName(const std::string& name);
155const std::vector<int>& GD_GetAchievementPanels(); 186const std::vector<int>& GD_GetAchievementPanels();
156int GD_GetItemIdForColor(LingoColor color); 187int GD_GetItemIdForColor(LingoColor color);
157const std::vector<int>& GD_GetSunwarpDoors(); 188const std::vector<int>& GD_GetSunwarpDoors();
158int GD_GetRoomForSunwarp(int index); 189int GD_GetRoomForSunwarp(int index);
159const std::vector<SubwayItem>& GD_GetSubwayItems(); 190const std::vector<SubwayItem>& GD_GetSubwayItems();
160const SubwayItem& GD_GetSubwayItem(int id); 191const SubwayItem& GD_GetSubwayItem(int id);
161int GD_GetSubwayItemForPainting(const std::string& painting_id); 192std::optional<int> GD_GetSubwayItemForPainting(const std::string& painting_id);
162int GD_GetSubwayItemForSunwarp(const SubwaySunwarp& sunwarp); 193int GD_GetSubwayItemForSunwarp(const SubwaySunwarp& sunwarp);
194std::string GD_GetItemName(int id);
195
196LingoColor GetLingoColorForString(const std::string& str);
163 197
164#endif /* end of include guard: GAME_DATA_H_9C42AC51 */ 198#endif /* end of include guard: GAME_DATA_H_9C42AC51 */