| 137 | #endif |
| 138 | |
| 139 | std::optional<RCT2Variant> classifyGamePath(std::string_view path) |
| 140 | { |
| 141 | auto combinedPath = Path::ResolveCasing(Path::Combine(path, u8"Data", u8"g1.dat")); |
| 142 | if (File::Exists(combinedPath)) |
| 143 | return std::make_optional<RCT2Variant>(RCT2Variant::rct2Original); |
| 144 | |
| 145 | combinedPath = Path::ResolveCasing(Path::Combine(path, kRCTClassicWindowsDataFolder, u8"g1.dat")); |
| 146 | if (File::Exists(combinedPath)) |
| 147 | return std::make_optional<RCT2Variant>(RCT2Variant::rctClassicWindows); |
| 148 | |
| 149 | combinedPath = Path::ResolveCasing(Path::Combine(path, kRCTClassicMacOSDataFolder, u8"g1.dat")); |
| 150 | if (File::Exists(combinedPath)) |
| 151 | return std::make_optional<RCT2Variant>(RCT2Variant::rctClassicMac); |
| 152 | |
| 153 | combinedPath = Path::ResolveCasing(Path::Combine(path, kRCTClassicPlusMacOSDataFolder, u8"g1.dat")); |
| 154 | if (File::Exists(combinedPath)) |
| 155 | return std::make_optional<RCT2Variant>(RCT2Variant::rctClassicPlusMac); |
| 156 | |
| 157 | return std::nullopt; |
| 158 | } |
| 159 | |
| 160 | bool OriginalGameDataExists(std::string_view path) |
| 161 | { |
no test coverage detected