| 69 | } |
| 70 | |
| 71 | static bool ImportS6(MemoryStream& stream, std::unique_ptr<IContext>& context, bool retainSpatialIndices) |
| 72 | { |
| 73 | stream.SetPosition(0); |
| 74 | |
| 75 | auto& objManager = context->GetObjectManager(); |
| 76 | |
| 77 | auto importer = ParkImporter::CreateS6(context->GetObjectRepository()); |
| 78 | auto loadResult = importer->LoadFromStream(&stream, false); |
| 79 | objManager.LoadObjects(loadResult.RequiredObjects); |
| 80 | |
| 81 | MapAnimations::ClearAll(); |
| 82 | // TODO: Have a separate GameState and exchange once loaded. |
| 83 | auto& gameState = getGameState(); |
| 84 | importer->Import(gameState); |
| 85 | |
| 86 | GameInit(retainSpatialIndices); |
| 87 | |
| 88 | return true; |
| 89 | } |
| 90 | |
| 91 | static bool ImportPark(MemoryStream& stream, std::unique_ptr<IContext>& context, bool retainSpatialIndices) |
| 92 | { |
no test coverage detected