Game settings Quit menu now delegates to F10 quit; bug #462

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3174 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
avolkov
2009-07-09 05:24:40 +00:00
parent 8222417745
commit 07a7a09659
11 changed files with 9 additions and 119 deletions
+1
View File
@@ -1,4 +1,5 @@
Changes towards version 0.7: 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 - Do not pause the game in places where not relevant (bug #984) - Alex
- Fixed crashes and potential weirdness when loading savegames from - Fixed crashes and potential weirdness when loading savegames from
a Homeworld encounter screen (bug #997) - Alex a Homeworld encounter screen (bug #997) - Alex
-16
View File
@@ -1862,14 +1862,6 @@ Yes
No No
#(Don't Quit)
Don't Quit
#(Quit Game)
Quit Game
#(Cr) #(Cr)
Cr Cr
@@ -2178,14 +2170,6 @@ exit menu
#(no, play!)
no, play!
#(yes, quit!)
yes, quit!
#(scan) #(scan)
scan scan
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

-2
View File
@@ -37,8 +37,6 @@ playmenu-034.png 0 0 0 10
playmenu-035.png 0 0 0 10 playmenu-035.png 0 0 0 10
playmenu-036.png 0 0 0 10 playmenu-036.png 0 0 0 10
playmenu-037.png 0 0 1 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-058.png 0 0 -1 -12
playmenu-059.png 0 0 -138 -93 playmenu-059.png 0 0 -138 -93
playmenu-060.png 0 0 0 0 playmenu-060.png 0 0 0 0
+4 -78
View File
@@ -123,12 +123,6 @@ enum
EXIT_MENU_SETTING EXIT_MENU_SETTING
}; };
enum
{
NO_QUIT_MENU,
YES_QUIT_MENU
};
static void static void
FeedbackSetting (BYTE which_setting) FeedbackSetting (BYTE which_setting)
{ {
@@ -190,26 +184,6 @@ FeedbackSetting (BYTE which_setting)
UnlockMutex (GraphicsLock); 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_NORMAL 0
#define DDSHS_EDIT 1 #define DDSHS_EDIT 1
#define DDSHS_BLOCKCUR 2 #define DDSHS_BLOCKCUR 2
@@ -499,52 +473,6 @@ DoSettings (MENU_STATE *pMS)
return (TRUE); 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 static void
DrawCargo (COUNT redraw_state) DrawCargo (COUNT redraw_state)
{ {
@@ -778,8 +706,7 @@ ShowSummary (SUMMARY_DESC *pSD)
{ {
s.origin.x = SUMMARY_X_OFFS - SUMMARY_SIDE_OFFS + 6; s.origin.x = SUMMARY_X_OFFS - SUMMARY_SIDE_OFFS + 6;
s.origin.y = 0; s.origin.y = 0;
s.frame = SetRelFrameIndex ( s.frame = SetRelFrameIndex (pLocMenuState->ModuleFrame, 0);
pLocMenuState->ModuleFrame, 0);
DrawStamp (&s); DrawStamp (&s);
s.origin.x = SUMMARY_X_OFFS + SUMMARY_SIDE_OFFS; s.origin.x = SUMMARY_X_OFFS + SUMMARY_SIDE_OFFS;
s.frame = IncFrameIndex (s.frame); s.frame = IncFrameIndex (s.frame);
@@ -940,7 +867,7 @@ DoPickGame (MENU_STATE *pMS)
{ {
extern FRAME PlayFrame; extern FRAME PlayFrame;
pMS->ModuleFrame = SetAbsFrameIndex (PlayFrame, 41); pMS->ModuleFrame = SetAbsFrameIndex (PlayFrame, 39);
} }
LockMutex (GraphicsLock); LockMutex (GraphicsLock);
@@ -1330,9 +1257,8 @@ DoGameOptions (MENU_STATE *pMS)
// to a FRAME. // to a FRAME.
return PickGame (pMS); return PickGame (pMS);
case QUIT_GAME: case QUIT_GAME:
pMS->Initialized = FALSE; if (ConfirmExit ())
pMS->CurState = NO_QUIT_MENU; return FALSE;
pMS->InputFunc = DoQuitMenu;
break; break;
case SETTINGS: case SETTINGS:
pMS->Initialized = FALSE; pMS->Initialized = FALSE;
+2 -2
View File
@@ -41,11 +41,11 @@
#define MELEE_STRING_COUNT 9 #define MELEE_STRING_COUNT 9
#define SAVEGAME_STRING_COUNT 5 #define SAVEGAME_STRING_COUNT 5
#define OPTION_STRING_COUNT 5 #define OPTION_STRING_COUNT 5
#define QUITMENU_STRING_COUNT 5 #define QUITMENU_STRING_COUNT 3
#define STATUS_STRING_COUNT 6 #define STATUS_STRING_COUNT 6
#define FLAGSHIP_STRING_COUNT 13 #define FLAGSHIP_STRING_COUNT 13
#define ORBITSCAN_STRING_COUNT 19 #define ORBITSCAN_STRING_COUNT 19
#define MAINMENU_STRING_COUNT 57 #define MAINMENU_STRING_COUNT 55
#define NETMELEE_STRING_COUNT 19 #define NETMELEE_STRING_COUNT 19
enum { enum {
-16
View File
@@ -150,9 +150,6 @@ GetEndMenuState (BYTE BaseState)
case PM_SOUND_ON: case PM_SOUND_ON:
return PM_EXIT_MENU4; return PM_EXIT_MENU4;
break; break;
case PM_NO_QUIT:
return PM_YES_QUIT;
break;
case PM_ALT_SCAN: case PM_ALT_SCAN:
case PM_ALT_STARMAP: case PM_ALT_STARMAP:
return PM_ALT_NAVIGATE; return PM_ALT_NAVIGATE;
@@ -533,19 +530,6 @@ DrawMenuStateStrings (BYTE beg_index, SWORD NewState)
break; 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; r.extent.height = RADAR_HEIGHT + 11;
DrawPCMenu (beg_index, end_index, (BYTE)NewState, hilite, &r); DrawPCMenu (beg_index, end_index, (BYTE)NewState, hilite, &r);
s.frame = 0; s.frame = 0;
+1 -1
View File
@@ -20,5 +20,5 @@
void void
MouseError (void) MouseError (void)
{ {
DoPopupWindow (GAME_STRING (MAINMENU_STRING_BASE + 56)); DoPopupWindow (GAME_STRING (MAINMENU_STRING_BASE + 54));
} }
+1 -1
View File
@@ -245,7 +245,7 @@ DoRestart (MENU_STATE *pMS)
LockMutex (GraphicsLock); LockMutex (GraphicsLock);
SetFlashRect (NULL, (FRAME)0); SetFlashRect (NULL, (FRAME)0);
UnlockMutex (GraphicsLock); UnlockMutex (GraphicsLock);
DoPopupWindow (GAME_STRING (MAINMENU_STRING_BASE + 56)); DoPopupWindow (GAME_STRING (MAINMENU_STRING_BASE + 54));
// Mouse not supported message // Mouse not supported message
SetMenuSounds (MENU_SOUND_UP | MENU_SOUND_DOWN, MENU_SOUND_SELECT); SetMenuSounds (MENU_SOUND_UP | MENU_SOUND_DOWN, MENU_SOUND_SELECT);
SetTransitionSource (NULL); SetTransitionSource (NULL);
-3
View File
@@ -51,9 +51,6 @@ enum
PM_CHANGE_SHIP, PM_CHANGE_SHIP,
PM_EXIT_MENU4, PM_EXIT_MENU4,
PM_NO_QUIT,
PM_YES_QUIT,
PM_ALT_SCAN, PM_ALT_SCAN,
PM_ALT_STARMAP, PM_ALT_STARMAP,
PM_ALT_MANIFEST, PM_ALT_MANIFEST,