1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 11:33:03 +01:00

Remove scenario_save_old()

It seems like MSVC does not like it.
This commit is contained in:
Gymnasiast
2020-02-07 18:13:59 +01:00
committed by Ted John
parent 135c2a6446
commit 8fdce563ed

View File

@@ -1809,63 +1809,3 @@ enum : uint32_t
S6_SAVE_FLAG_SCENARIO = 1 << 1,
S6_SAVE_FLAG_AUTOMATIC = 1u << 31,
};
/**
*
* rct2: 0x006754F5
* @param flags bit 0: pack objects, 1: save as scenario
*/
[[maybe_unused]] static int32_t scenario_save_old(const utf8* path, int32_t flags)
{
if (flags & S6_SAVE_FLAG_SCENARIO)
{
log_verbose("scenario_save(%s, SCENARIO)", path);
}
else
{
log_verbose("scenario_save(%s, SAVED GAME)", path);
}
if (!(flags & S6_SAVE_FLAG_AUTOMATIC))
{
window_close_construction_windows();
}
map_reorganise_elements();
viewport_set_saved_view();
bool result = false;
auto s6exporter = new S6Exporter();
try
{
if (flags & S6_SAVE_FLAG_EXPORT)
{
auto& objManager = OpenRCT2::GetContext()->GetObjectManager();
s6exporter->ExportObjectsList = objManager.GetPackableObjects();
}
s6exporter->RemoveTracklessRides = true;
s6exporter->Export();
if (flags & S6_SAVE_FLAG_SCENARIO)
{
s6exporter->SaveScenario(path);
}
else
{
s6exporter->SaveGame(path);
}
result = true;
}
catch (const std::exception& e)
{
log_error("Unable to save park: '%s'", e.what());
}
delete s6exporter;
gfx_invalidate_screen();
if (result && !(flags & S6_SAVE_FLAG_AUTOMATIC))
{
gScreenAge = 0;
}
return result;
}