mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-22 14:24:33 +01:00
Add new .park save format
Co-authored-by: Gymnasiast <Gymnasiast@users.noreply.github.com> Co-authored-by: duncanspumpkin <duncanspumpkin@users.noreply.github.com> Co-authored-by: ZehMatt <Zehmatt@users.noreply.github.com> Co-authored-by: Broxzier <Broxzier@users.noreply.github.com>
This commit is contained in:
@@ -201,13 +201,13 @@ static const char* getFilterPatternByType(const int32_t type, const bool isSave)
|
||||
switch (type & 0x0E)
|
||||
{
|
||||
case LOADSAVETYPE_GAME:
|
||||
return isSave ? "*.sv6" : "*.sv6;*.sc6;*.sc4;*.sv4;*.sv7;*.sea;";
|
||||
return isSave ? "*.park" : "*.park;*.sv6;*.sc6;*.sc4;*.sv4;*.sv7;*.sea";
|
||||
|
||||
case LOADSAVETYPE_LANDSCAPE:
|
||||
return isSave ? "*.sc6" : "*.sc6;*.sv6;*.sc4;*.sv4;*.sv7;*.sea;";
|
||||
return isSave ? "*.park" : "*.park;*.sc6;*.sv6;*.sc4;*.sv4;*.sv7;*.sea";
|
||||
|
||||
case LOADSAVETYPE_SCENARIO:
|
||||
return "*.sc6";
|
||||
return isSave ? "*.park" : "*.park;*.sc6;*.sc4";
|
||||
|
||||
case LOADSAVETYPE_TRACK:
|
||||
return isSave ? "*.td6" : "*.td6;*.td4";
|
||||
@@ -1041,7 +1041,7 @@ static void window_loadsave_select(rct_window* w, const char* path)
|
||||
|
||||
case (LOADSAVETYPE_SAVE | LOADSAVETYPE_LANDSCAPE):
|
||||
save_path(&gConfigGeneral.last_save_landscape_directory, pathBuffer);
|
||||
safe_strcpy(gScenarioFileName, pathBuffer, sizeof(gScenarioFileName));
|
||||
gScenarioFileName = std::string(String::ToStringView(pathBuffer, std::size(pathBuffer)));
|
||||
if (scenario_save(pathBuffer, gConfigGeneral.save_plugin_data ? 3 : 2))
|
||||
{
|
||||
gCurrentLoadedPath = pathBuffer;
|
||||
@@ -1062,7 +1062,7 @@ static void window_loadsave_select(rct_window* w, const char* path)
|
||||
int32_t parkFlagsBackup = gParkFlags;
|
||||
gParkFlags &= ~PARK_FLAGS_SPRITES_INITIALISED;
|
||||
gEditorStep = EditorStep::Invalid;
|
||||
safe_strcpy(gScenarioFileName, pathBuffer, sizeof(gScenarioFileName));
|
||||
gScenarioFileName = std::string(String::ToStringView(pathBuffer, std::size(pathBuffer)));
|
||||
int32_t success = scenario_save(pathBuffer, gConfigGeneral.save_plugin_data ? 3 : 2);
|
||||
gParkFlags = parkFlagsBackup;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user