diff options
Diffstat (limited to 'src/game_data.h')
| -rw-r--r-- | src/game_data.h | 46 |
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 { | |||
| 22 | constexpr int kLOCATION_NORMAL = 1; | 22 | constexpr int kLOCATION_NORMAL = 1; |
| 23 | constexpr int kLOCATION_REDUCED = 2; | 23 | constexpr int kLOCATION_REDUCED = 2; |
| 24 | constexpr int kLOCATION_INSANITY = 4; | 24 | constexpr int kLOCATION_INSANITY = 4; |
| 25 | constexpr int kLOCATION_SMALL_SPHERE_ONE = 8; | ||
| 25 | 26 | ||
| 26 | enum class EntranceType { | 27 | enum 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 | ||
| 35 | enum class DoorType { | 37 | enum 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 | ||
| 58 | struct ProgressiveRequirement { | 64 | struct ProgressiveRequirement { |
| @@ -80,21 +86,34 @@ struct Door { | |||
| 80 | DoorType type = DoorType::kNormal; | 86 | DoorType type = DoorType::kNormal; |
| 81 | }; | 87 | }; |
| 82 | 88 | ||
| 89 | struct 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 | |||
| 83 | struct Exit { | 96 | struct 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 | ||
| 89 | struct PaintingExit { | 103 | struct 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 | ||
| 94 | struct Room { | 113 | struct 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 | ||
| 112 | struct MapArea { | 132 | struct 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 | ||
| 122 | enum class SubwaySunwarpType { | 144 | enum 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 | ||
| 146 | const std::vector<MapArea>& GD_GetMapAreas(); | 173 | const std::vector<MapArea>& GD_GetMapAreas(); |
| @@ -151,14 +178,21 @@ const std::vector<Door>& GD_GetDoors(); | |||
| 151 | const Door& GD_GetDoor(int door_id); | 178 | const Door& GD_GetDoor(int door_id); |
| 152 | int GD_GetDoorByName(const std::string& name); | 179 | int GD_GetDoorByName(const std::string& name); |
| 153 | const Panel& GD_GetPanel(int panel_id); | 180 | const Panel& GD_GetPanel(int panel_id); |
| 154 | int GD_GetRoomForPainting(const std::string& painting_id); | 181 | int GD_GetPanelBySolveIndex(int solve_index); |
| 182 | const PanelDoor& GD_GetPanelDoor(int panel_door_id); | ||
| 183 | const std::vector<PaintingExit>& GD_GetPaintings(); | ||
| 184 | const PaintingExit& GD_GetPaintingExit(int painting_id); | ||
| 185 | int GD_GetPaintingByName(const std::string& name); | ||
| 155 | const std::vector<int>& GD_GetAchievementPanels(); | 186 | const std::vector<int>& GD_GetAchievementPanels(); |
| 156 | int GD_GetItemIdForColor(LingoColor color); | 187 | int GD_GetItemIdForColor(LingoColor color); |
| 157 | const std::vector<int>& GD_GetSunwarpDoors(); | 188 | const std::vector<int>& GD_GetSunwarpDoors(); |
| 158 | int GD_GetRoomForSunwarp(int index); | 189 | int GD_GetRoomForSunwarp(int index); |
| 159 | const std::vector<SubwayItem>& GD_GetSubwayItems(); | 190 | const std::vector<SubwayItem>& GD_GetSubwayItems(); |
| 160 | const SubwayItem& GD_GetSubwayItem(int id); | 191 | const SubwayItem& GD_GetSubwayItem(int id); |
| 161 | int GD_GetSubwayItemForPainting(const std::string& painting_id); | 192 | std::optional<int> GD_GetSubwayItemForPainting(const std::string& painting_id); |
| 162 | int GD_GetSubwayItemForSunwarp(const SubwaySunwarp& sunwarp); | 193 | int GD_GetSubwayItemForSunwarp(const SubwaySunwarp& sunwarp); |
| 194 | std::string GD_GetItemName(int id); | ||
| 195 | |||
| 196 | LingoColor 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 */ |
