| 222 | json_t& jRoot, const IFileDataRetriever* fileRetriever, bool loadImageTable, std::string_view path); |
| 223 | |
| 224 | static ObjectSourceGame ParseSourceGame(const std::string_view s) |
| 225 | { |
| 226 | static const std::unordered_map<std::string_view, ObjectSourceGame> LookupTable{ |
| 227 | { "rct1", ObjectSourceGame::rct1 }, |
| 228 | { "rct1aa", ObjectSourceGame::addedAttractions }, |
| 229 | { "rct1ll", ObjectSourceGame::loopyLandscapes }, |
| 230 | { "rct2", ObjectSourceGame::rct2 }, |
| 231 | { "rct2ww", ObjectSourceGame::wackyWorlds }, |
| 232 | { "rct2tt", ObjectSourceGame::timeTwister }, |
| 233 | { "official", ObjectSourceGame::openRCT2Official }, |
| 234 | { "custom", ObjectSourceGame::custom }, |
| 235 | }; |
| 236 | auto result = LookupTable.find(s); |
| 237 | return (result != LookupTable.end()) ? result->second : ObjectSourceGame::custom; |
| 238 | } |
| 239 | |
| 240 | static void ReadObjectLegacy(Object& object, IReadObjectContext* context, IStream* stream) |
| 241 | { |
no test coverage detected