diff --git a/src/game.c b/src/game.c index 062389e52a..82955101ef 100644 --- a/src/game.c +++ b/src/game.c @@ -41,6 +41,7 @@ #include "peep/peep.h" #include "peep/staff.h" #include "platform/platform.h" +#include "rct1.h" #include "ride/ride.h" #include "ride/ride_ratings.h" #include "ride/vehicle.h" @@ -933,7 +934,17 @@ bool game_load_save(const utf8 *path) return false; } - bool result = game_load_sv6(rw); + uint32 extension_type = get_file_extension_type(path); + bool result = false; + + if (extension_type == FILE_EXTENSION_SV6) { + result = game_load_sv6(rw); + } else if (extension_type == FILE_EXTENSION_SV4) { + result = rct1_load_saved_game(path); + if (result) + gFirstTimeSave = 1; + } + SDL_RWclose(rw); if (result) { @@ -946,7 +957,7 @@ bool game_load_save(const utf8 *path) } return true; } else { - // If loading the SV6 failed, the current park state will be corrupted + // If loading the SV6 or SV4 failed, the current park state will be corrupted // so just go back to the title screen. title_load(); return false;