MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / saveLandscapeOpen

Function saveLandscapeOpen

src/OpenLoco/src/Game.cpp:93–106  ·  view source on GitHub ↗

0x00441993

Source from the content-addressed store, hash-verified

91
92 // 0x00441993
93 [[nodiscard]] std::optional<std::string> saveLandscapeOpen()
94 {
95 Scenario::getOptions().scenarioFlags &= ~Scenario::ScenarioFlags::landscapeGenerationDone;
96 if (hasFlags(GameStateFlags::tileManagerLoaded))
97 {
98 Scenario::getOptions().scenarioFlags |= Scenario::ScenarioFlags::landscapeGenerationDone;
99 Scenario::drawScenarioMiniMapImage();
100 }
101
102 auto path = Environment::getPath(Environment::PathId::landscape) / Scenario::getOptions().scenarioName;
103 auto savePath = path.u8string() + S5::extensionSC5;
104
105 return openBrowsePrompt(savePath, StringIds::title_prompt_save_landscape, browse_type::save, S5::filterSC5);
106 }
107
108 // 0x0043BFF8
109 void loadGame()

Callers 2

confirmSaveGameFunction · 0.85
loadsaveMenuDropdownFunction · 0.85

Calls 4

drawScenarioMiniMapImageFunction · 0.85
getPathFunction · 0.85
openBrowsePromptFunction · 0.85
hasFlagsFunction · 0.70

Tested by

no test coverage detected