From 2db40c952833de286cbe9ade8db110560b18b45c Mon Sep 17 00:00:00 2001 From: Meep-Eep Date: Sat, 24 Oct 2009 21:11:40 +0000 Subject: [PATCH] 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 --- sc2/src/uqm/restart.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/sc2/src/uqm/restart.c b/sc2/src/uqm/restart.c index 6189bee10..fed03bfc3 100644 --- a/sc2/src/uqm/restart.c +++ b/sc2/src/uqm/restart.c @@ -50,11 +50,14 @@ enum QUIT_GAME }; +// Draw the full restart menu. Nothing is done with selections. static void DrawRestartMenuGraphic (MENU_STATE *pMS) { RECT r; STAMP s; + TEXT t; + UNICODE buf[64]; s.frame = CaptureDrawable (LoadGraphic (RESTART_PMAP_ANIM)); pMS->CurFrame = s.frame; @@ -68,6 +71,19 @@ DrawRestartMenuGraphic (MENU_STATE *pMS) FlushColorXForms (); LockMutex (GraphicsLock); 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); UnbatchGraphics (); } @@ -76,8 +92,6 @@ static void DrawRestartMenu (BYTE OldState, BYTE NewState, FRAME f) { RECT r; - TEXT t; - UNICODE buf[64]; LockMutex (GraphicsLock); SetContext (ScreenContext); @@ -94,18 +108,6 @@ DrawRestartMenu (BYTE OldState, BYTE NewState, FRAME f) r.extent.height = SCREEN_HEIGHT; 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); (void) OldState; /* Satisfying compiler (unused parameter) */ }