diff --git a/sc2/ChangeLog b/sc2/ChangeLog index 4a432db38..83c557643 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Game settings Quit menu now delegates to F10 quit (bug #462) - Alex - Do not pause the game in places where not relevant (bug #984) - Alex - Fixed crashes and potential weirdness when loading savegames from a Homeworld encounter screen (bug #997) - Alex diff --git a/sc2/content/base/gamestrings.txt b/sc2/content/base/gamestrings.txt index 98ac9caa5..887a28ef3 100644 --- a/sc2/content/base/gamestrings.txt +++ b/sc2/content/base/gamestrings.txt @@ -1862,14 +1862,6 @@ Yes No -#(Don't Quit) -Don't Quit - - -#(Quit Game) -Quit Game - - #(Cr) Cr @@ -2178,14 +2170,6 @@ exit menu -#(no, play!) -no, play! - - -#(yes, quit!) -yes, quit! - - #(scan) scan diff --git a/sc2/content/base/ui/playmenu-065.png b/sc2/content/base/ui/playmenu-065.png deleted file mode 100644 index e6b7ca861..000000000 Binary files a/sc2/content/base/ui/playmenu-065.png and /dev/null differ diff --git a/sc2/content/base/ui/playmenu-066.png b/sc2/content/base/ui/playmenu-066.png deleted file mode 100644 index e45117be3..000000000 Binary files a/sc2/content/base/ui/playmenu-066.png and /dev/null differ diff --git a/sc2/content/base/ui/playmenu.ani b/sc2/content/base/ui/playmenu.ani index e47c91965..8eb5133e7 100644 --- a/sc2/content/base/ui/playmenu.ani +++ b/sc2/content/base/ui/playmenu.ani @@ -37,8 +37,6 @@ playmenu-034.png 0 0 0 10 playmenu-035.png 0 0 0 10 playmenu-036.png 0 0 0 10 playmenu-037.png 0 0 1 10 -playmenu-065.png 0 0 1 10 -playmenu-066.png 0 0 1 10 playmenu-058.png 0 0 -1 -12 playmenu-059.png 0 0 -138 -93 playmenu-060.png 0 0 0 0 diff --git a/sc2/src/sc2code/gameopt.c b/sc2/src/sc2code/gameopt.c index 00fc3ef4d..22301bb39 100644 --- a/sc2/src/sc2code/gameopt.c +++ b/sc2/src/sc2code/gameopt.c @@ -123,12 +123,6 @@ enum EXIT_MENU_SETTING }; -enum -{ - NO_QUIT_MENU, - YES_QUIT_MENU -}; - static void FeedbackSetting (BYTE which_setting) { @@ -190,26 +184,6 @@ FeedbackSetting (BYTE which_setting) UnlockMutex (GraphicsLock); } -static void -FeedbackQuit (BYTE which_setting) -{ - const UNICODE *buf = ""; - - switch (which_setting) - { - case NO_QUIT_MENU: - buf = GAME_STRING (QUITMENU_STRING_BASE + 3); // "Don't Quit" - break; - case YES_QUIT_MENU: - buf = GAME_STRING (QUITMENU_STRING_BASE + 4); // "Quit Game" - break; - } - - LockMutex (GraphicsLock); - DrawStatusMessage (buf); - UnlockMutex (GraphicsLock); -} - #define DDSHS_NORMAL 0 #define DDSHS_EDIT 1 #define DDSHS_BLOCKCUR 2 @@ -499,52 +473,6 @@ DoSettings (MENU_STATE *pMS) return (TRUE); } -static BOOLEAN -DoQuitMenu (MENU_STATE *pMS) -{ - if (GLOBAL (CurrentActivity) & CHECK_ABORT) - return (FALSE); - - SetMenuSounds (MENU_SOUND_ARROWS, MENU_SOUND_SELECT); - - if (!pMS->Initialized) - { - DrawMenuStateStrings (PM_NO_QUIT, pMS->CurState); - FeedbackQuit (pMS->CurState); - pMS->Initialized = TRUE; - pMS->InputFunc = DoQuitMenu; - } - else if (PulsedInputState.menu[KEY_MENU_CANCEL] - || (PulsedInputState.menu[KEY_MENU_SELECT] - && pMS->CurState == NO_QUIT_MENU)) - { - LockMutex (GraphicsLock); - DrawStatusMessage (NULL); - UnlockMutex (GraphicsLock); - - pMS->CurState = QUIT_GAME; - pMS->InputFunc = DoGameOptions; - pMS->Initialized = 0; - } - else if (PulsedInputState.menu[KEY_MENU_SELECT]) - { - switch (pMS->CurState) - { - case NO_QUIT_MENU: - break; - case YES_QUIT_MENU: - GLOBAL (CurrentActivity) |= CHECK_ABORT; - ExitRequested = FALSE; - break; - } - FeedbackQuit (pMS->CurState); - } - else if (DoMenuChooser (pMS, PM_NO_QUIT)) - FeedbackQuit (pMS->CurState); - - return (TRUE); -} - static void DrawCargo (COUNT redraw_state) { @@ -778,8 +706,7 @@ ShowSummary (SUMMARY_DESC *pSD) { s.origin.x = SUMMARY_X_OFFS - SUMMARY_SIDE_OFFS + 6; s.origin.y = 0; - s.frame = SetRelFrameIndex ( - pLocMenuState->ModuleFrame, 0); + s.frame = SetRelFrameIndex (pLocMenuState->ModuleFrame, 0); DrawStamp (&s); s.origin.x = SUMMARY_X_OFFS + SUMMARY_SIDE_OFFS; s.frame = IncFrameIndex (s.frame); @@ -940,7 +867,7 @@ DoPickGame (MENU_STATE *pMS) { extern FRAME PlayFrame; - pMS->ModuleFrame = SetAbsFrameIndex (PlayFrame, 41); + pMS->ModuleFrame = SetAbsFrameIndex (PlayFrame, 39); } LockMutex (GraphicsLock); @@ -1330,9 +1257,8 @@ DoGameOptions (MENU_STATE *pMS) // to a FRAME. return PickGame (pMS); case QUIT_GAME: - pMS->Initialized = FALSE; - pMS->CurState = NO_QUIT_MENU; - pMS->InputFunc = DoQuitMenu; + if (ConfirmExit ()) + return FALSE; break; case SETTINGS: pMS->Initialized = FALSE; diff --git a/sc2/src/sc2code/gamestr.h b/sc2/src/sc2code/gamestr.h index 48ff394b9..0fa242b65 100644 --- a/sc2/src/sc2code/gamestr.h +++ b/sc2/src/sc2code/gamestr.h @@ -41,11 +41,11 @@ #define MELEE_STRING_COUNT 9 #define SAVEGAME_STRING_COUNT 5 #define OPTION_STRING_COUNT 5 -#define QUITMENU_STRING_COUNT 5 +#define QUITMENU_STRING_COUNT 3 #define STATUS_STRING_COUNT 6 #define FLAGSHIP_STRING_COUNT 13 #define ORBITSCAN_STRING_COUNT 19 -#define MAINMENU_STRING_COUNT 57 +#define MAINMENU_STRING_COUNT 55 #define NETMELEE_STRING_COUNT 19 enum { diff --git a/sc2/src/sc2code/menu.c b/sc2/src/sc2code/menu.c index d8fa37336..5d1c992e5 100644 --- a/sc2/src/sc2code/menu.c +++ b/sc2/src/sc2code/menu.c @@ -150,9 +150,6 @@ GetEndMenuState (BYTE BaseState) case PM_SOUND_ON: return PM_EXIT_MENU4; break; - case PM_NO_QUIT: - return PM_YES_QUIT; - break; case PM_ALT_SCAN: case PM_ALT_STARMAP: return PM_ALT_NAVIGATE; @@ -533,19 +530,6 @@ DrawMenuStateStrings (BYTE beg_index, SWORD NewState) break; } } - if (beg_index == PM_NO_QUIT) - { - end_index = beg_index + 1; - switch (beg_index + NewState) - { - case PM_NO_QUIT: - NewState = 0; - break; - case PM_YES_QUIT: - NewState = 1; - break; - } - } r.extent.height = RADAR_HEIGHT + 11; DrawPCMenu (beg_index, end_index, (BYTE)NewState, hilite, &r); s.frame = 0; diff --git a/sc2/src/sc2code/mouse_err.c b/sc2/src/sc2code/mouse_err.c index 453e3e2d3..0eaaeae59 100644 --- a/sc2/src/sc2code/mouse_err.c +++ b/sc2/src/sc2code/mouse_err.c @@ -20,5 +20,5 @@ void MouseError (void) { - DoPopupWindow (GAME_STRING (MAINMENU_STRING_BASE + 56)); + DoPopupWindow (GAME_STRING (MAINMENU_STRING_BASE + 54)); } diff --git a/sc2/src/sc2code/restart.c b/sc2/src/sc2code/restart.c index e81de6b83..17b6497df 100644 --- a/sc2/src/sc2code/restart.c +++ b/sc2/src/sc2code/restart.c @@ -245,7 +245,7 @@ DoRestart (MENU_STATE *pMS) LockMutex (GraphicsLock); SetFlashRect (NULL, (FRAME)0); UnlockMutex (GraphicsLock); - DoPopupWindow (GAME_STRING (MAINMENU_STRING_BASE + 56)); + DoPopupWindow (GAME_STRING (MAINMENU_STRING_BASE + 54)); // Mouse not supported message SetMenuSounds (MENU_SOUND_UP | MENU_SOUND_DOWN, MENU_SOUND_SELECT); SetTransitionSource (NULL); diff --git a/sc2/src/sc2code/sis.h b/sc2/src/sc2code/sis.h index 1400ce855..49f767f0f 100644 --- a/sc2/src/sc2code/sis.h +++ b/sc2/src/sc2code/sis.h @@ -51,9 +51,6 @@ enum PM_CHANGE_SHIP, PM_EXIT_MENU4, - PM_NO_QUIT, - PM_YES_QUIT, - PM_ALT_SCAN, PM_ALT_STARMAP, PM_ALT_MANIFEST,