From 9a3b53d2917c7f27244b905d3b9d20633c70a051 Mon Sep 17 00:00:00 2001 From: gewlitys Date: Sat, 13 Sep 2003 16:06:57 +0000 Subject: [PATCH] Savegame slot now defaults to the last one used during one execution of uqm (bug #477), from chmmravatar git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1230 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/ChangeLog | 2 ++ sc2/src/sc2code/gameopt.c | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sc2/ChangeLog b/sc2/ChangeLog index 631fef221..f2286886b 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,4 +1,6 @@ Changes towards version 0.4: +- Savegame slot now defaults to the last one used during one execution + of uqm (bug #477), from chmmravatar - Fixed one-pixel glitch in shipyard when scrapping (bug #461), from Paxtez - Adjusted subtitle timings when there are no oggs (part of bug #362), diff --git a/sc2/src/sc2code/gameopt.c b/sc2/src/sc2code/gameopt.c index c3877e0f6..ec18404e4 100644 --- a/sc2/src/sc2code/gameopt.c +++ b/sc2/src/sc2code/gameopt.c @@ -37,6 +37,7 @@ void SaveProblem (void); #define SAVES_PER_PAGE 5 //Should divide evenly into MAX_SAVED_GAMES for 'Per-Page' Scrolling static PMENU_STATE pLocMenuState; +static BYTE prev_save; //keeps track of the last slot that was saved or loaded void ConfirmSaveLoad (STAMP *MsgStamp) @@ -987,8 +988,7 @@ DoPickGame (PMENU_STATE pMS) if (!pMS->Initialized) { pMS->delta_item = (SIZE)pMS->CurState; - pMS->CurState = NewState = 0; - + pMS->CurState = NewState = prev_save; pMS->InputFunc = DoPickGame; SleepThreadUntil ((DWORD)pMS->CurFrame); pMS->CurFrame = 0; @@ -1033,6 +1033,7 @@ Restart: else if (CurrentMenuState.select) { pSD = &((SUMMARY_DESC *)pMS->CurString)[pMS->CurState]; + prev_save = pMS->CurState; if (pMS->delta_item == SAVE_GAME || pSD->year_index) { SetSemaphore (GraphicsSem);