Only need to put the version number on the restart screen once.

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3245 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
Meep-Eep
2009-10-24 21:11:40 +00:00
parent 6828498658
commit 2db40c9528
+16 -14
View File
@@ -50,11 +50,14 @@ enum
QUIT_GAME QUIT_GAME
}; };
// Draw the full restart menu. Nothing is done with selections.
static void static void
DrawRestartMenuGraphic (MENU_STATE *pMS) DrawRestartMenuGraphic (MENU_STATE *pMS)
{ {
RECT r; RECT r;
STAMP s; STAMP s;
TEXT t;
UNICODE buf[64];
s.frame = CaptureDrawable (LoadGraphic (RESTART_PMAP_ANIM)); s.frame = CaptureDrawable (LoadGraphic (RESTART_PMAP_ANIM));
pMS->CurFrame = s.frame; pMS->CurFrame = s.frame;
@@ -68,6 +71,19 @@ DrawRestartMenuGraphic (MENU_STATE *pMS)
FlushColorXForms (); FlushColorXForms ();
LockMutex (GraphicsLock); LockMutex (GraphicsLock);
DrawStamp (&s); DrawStamp (&s);
// Put the version number in the bottom right corner.
SetContextFont (TinyFont);
t.pStr = buf;
t.baseline.x = SCREEN_WIDTH - 3;
t.baseline.y = SCREEN_HEIGHT - 2;
t.align = ALIGN_RIGHT;
t.CharCount = (COUNT)~0;
sprintf (buf, "v%d.%d.%d%s", UQM_MAJOR_VERSION, UQM_MINOR_VERSION,
UQM_PATCH_VERSION, UQM_EXTRA_VERSION);
SetContextForeGroundColor (WHITE_COLOR);
font_DrawText (&t);
UnlockMutex (GraphicsLock); UnlockMutex (GraphicsLock);
UnbatchGraphics (); UnbatchGraphics ();
} }
@@ -76,8 +92,6 @@ static void
DrawRestartMenu (BYTE OldState, BYTE NewState, FRAME f) DrawRestartMenu (BYTE OldState, BYTE NewState, FRAME f)
{ {
RECT r; RECT r;
TEXT t;
UNICODE buf[64];
LockMutex (GraphicsLock); LockMutex (GraphicsLock);
SetContext (ScreenContext); SetContext (ScreenContext);
@@ -94,18 +108,6 @@ DrawRestartMenu (BYTE OldState, BYTE NewState, FRAME f)
r.extent.height = SCREEN_HEIGHT; r.extent.height = SCREEN_HEIGHT;
SetFlashRect (&r, SetAbsFrameIndex (f, NewState + 1)); SetFlashRect (&r, SetAbsFrameIndex (f, NewState + 1));
// Put version number in the corner
SetContextFont (TinyFont);
t.pStr = buf;
t.baseline.x = SCREEN_WIDTH - 3;
t.baseline.y = SCREEN_HEIGHT - 2;
t.align = ALIGN_RIGHT;
t.CharCount = (COUNT)~0;
sprintf (buf, "v%d.%d.%d%s", UQM_MAJOR_VERSION, UQM_MINOR_VERSION,
UQM_PATCH_VERSION, UQM_EXTRA_VERSION);
SetContextForeGroundColor (WHITE_COLOR);
font_DrawText (&t);
UnlockMutex (GraphicsLock); UnlockMutex (GraphicsLock);
(void) OldState; /* Satisfying compiler (unused parameter) */ (void) OldState; /* Satisfying compiler (unused parameter) */
} }