diff --git a/src/hexen/g_game.c b/src/hexen/g_game.c index f7177b826..6adb44f46 100644 --- a/src/hexen/g_game.c +++ b/src/hexen/g_game.c @@ -2094,7 +2094,8 @@ void G_LoadGame(int slot) void G_DoLoadGame(void) { gameaction = ga_nothing; - SV_LoadGame(GameLoadSlot); + // [crispy] support multiple pages of saves + SV_LoadGame(GameLoadSlot + savepage * 10); if (!netgame) { // Copy the base slot to the reborn slot SV_UpdateRebornSlot(); @@ -2127,7 +2128,8 @@ void G_SaveGame(int slot, char *description) void G_DoSaveGame(void) { - SV_SaveGame(savegameslot, savedescription); + // [crispy] support multiple pages of saves + SV_SaveGame(savegameslot + savepage * 10, savedescription); gameaction = ga_nothing; savedescription[0] = 0; P_SetMessage(&players[consoleplayer], TXT_GAMESAVED, true); diff --git a/src/hexen/mn_menu.c b/src/hexen/mn_menu.c index 492f39292..e09a0b929 100644 --- a/src/hexen/mn_menu.c +++ b/src/hexen/mn_menu.c @@ -181,6 +181,8 @@ int InfoType; int messageson = true; boolean mn_SuicideConsole; +int savepage; // [crispy] support 8 pages of savegames + // PRIVATE DATA DEFINITIONS ------------------------------------------------ static int FontABaseLump; @@ -1263,7 +1265,7 @@ static void SCDeleteGame(int option) return; } - SV_ClearSaveSlot(option); + SV_ClearSaveSlot(option + savepage * 10); CurrentMenu->oldItPos = CurrentItPos; MN_LoadSlotText(); BorderNeedRefresh = true; diff --git a/src/hexen/sv_save.c b/src/hexen/sv_save.c index d05e10a0f..08b6074e8 100644 --- a/src/hexen/sv_save.c +++ b/src/hexen/sv_save.c @@ -143,8 +143,6 @@ char *SavePath = DEFAULT_SAVEPATH; int vanilla_savegame_limit = 1; -int savepage; // [crispy] support 8 pages of savegames - // PRIVATE DATA DEFINITIONS ------------------------------------------------ static int MobjCount; @@ -1980,12 +1978,6 @@ void SV_SaveGame(int slot, const char *description) char versionText[HXS_VERSION_TEXT_LENGTH]; unsigned int i; - // [crispy] get expanded save slot number - if (slot != BASE_SLOT && slot != REBORN_SLOT) - { - slot += savepage * 10; - } - // Open the output file M_snprintf(fileName, sizeof(fileName), "%shex%d.hxs", SavePath, BASE_SLOT); SV_OpenWrite(fileName); @@ -2092,12 +2084,6 @@ void SV_LoadGame(int slot) p = &players[consoleplayer]; // [crispy] - // [crispy] get expanded save slot number - if (slot != BASE_SLOT && slot != REBORN_SLOT) - { - slot += savepage * 10; - } - // Copy all needed save files to the base slot if (slot != BASE_SLOT) { @@ -3284,12 +3270,6 @@ void SV_ClearSaveSlot(int slot) int i; char fileName[100]; - // [crispy] get expanded save slot number - if (slot != BASE_SLOT && slot != REBORN_SLOT) - { - slot += savepage * 10; - } - for (i = 0; i < MAX_MAPS; i++) { M_snprintf(fileName, sizeof(fileName),