From 114efa6ac1481663effc96251d1f0a39fd6ed5f0 Mon Sep 17 00:00:00 2001 From: ghaushe Date: Mon, 23 Dec 2002 00:53:52 +0000 Subject: [PATCH] fOSSiL's fix for restoring the screen after load/save git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@469 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/ChangeLog | 1 + sc2/TODO | 3 --- sc2/src/sc2code/gameopt.c | 36 +++++++++++++++++++++++------------- 3 files changed, 24 insertions(+), 16 deletions(-) diff --git a/sc2/ChangeLog b/sc2/ChangeLog index a51e3d343..bb1871048 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,4 +1,5 @@ 0.2: +- Better fix for clearing load/save screen - fOSSiL - Implemented bilinear scaling in pure SDL mode - Mika - Planet surface is now smoothed, from PhracturedBlue - Implemented scanlines in pure SDL mode - Mika diff --git a/sc2/TODO b/sc2/TODO index 977d42f77..2984da335 100644 --- a/sc2/TODO +++ b/sc2/TODO @@ -52,9 +52,6 @@ Glitches (don't crash the game, medium priority): - Currently some sound effects are perhaps from PC version / otherwise messed up.. 3DO ones should be extracted to fix this - Slylandro probe lightning bolt sound shouldn't be same as lightning on planets -- After saving the game, the screen is not always redrawn - - outfit starship - - possibly other situations - Druuge speech file 'druuge011.ogg' contains earlier bad take. (save original sample for posterity). - Win32 version runs a bit faster than it should, due to some problems diff --git a/sc2/src/sc2code/gameopt.c b/sc2/src/sc2code/gameopt.c index 25d0b1e14..d472b8944 100644 --- a/sc2/src/sc2code/gameopt.c +++ b/sc2/src/sc2code/gameopt.c @@ -1146,6 +1146,8 @@ PickGame (PMENU_STATE FRAME OldFrame; DRAW_STATE OldDrawState; SUMMARY_DESC desc_array[MAX_SAVED_GAMES]; + RECT DlgRect; + STAMP DlgStamp; if (pSolarSysState) { @@ -1159,6 +1161,16 @@ PickGame (PMENU_STATE OldFrame = SetContextBGFrame (NULL_PTR); OldDrawState = SetContextDrawState (DEST_PIXMAP | DRAW_REPLACE); + DlgStamp.origin.x = 0; + DlgStamp.origin.y = 0; + DlgRect.corner.x = SIS_ORG_X; + DlgRect.corner.y = SIS_ORG_Y; + DlgRect.extent.width = SIS_SCREEN_WIDTH; + DlgRect.extent.height = SIS_SCREEN_HEIGHT; + DlgStamp.frame = CaptureDrawable (LoadDisplayPixmap ( + &DlgRect, (FRAME)0) + ); + pMS->Initialized = FALSE; pMS->InputFunc = DoPickGame; pMS->CurString = (STRING)&desc_array[0]; @@ -1181,19 +1193,15 @@ PickGame (PMENU_STATE if (!(GLOBAL (CurrentActivity) & (CHECK_ABORT | CHECK_LOAD))) { -if (CommData.ConversationPhrases - || !(pSolarSysState && pSolarSysState->MenuState.Initialized < 3)) -{ - RECT r; - - BatchGraphics (); - r.corner.x = SIS_ORG_X; - r.corner.y = SIS_ORG_Y; - r.extent.width = SIS_SCREEN_WIDTH; - r.extent.height = SIS_SCREEN_HEIGHT; - ScreenTransition (3, &r); - UnbatchGraphics (); -} + if (CommData.ConversationPhrases + || !(pSolarSysState + && pSolarSysState->MenuState.Initialized < 3)) + { + BatchGraphics (); + DrawStamp(&DlgStamp); + ScreenTransition (3, &DlgRect); + UnbatchGraphics (); + } if (pSolarSysState) { @@ -1218,6 +1226,8 @@ if (CommData.ConversationPhrases } } + DestroyDrawable (ReleaseDrawable (DlgStamp.frame)); + SetContextDrawState (OldDrawState); SetContextBGFrame (OldFrame); SetContext (OldContext);