From: <av...@us...> - 2009-11-20 18:37:39
|
Revision: 3331 http://sc2.svn.sourceforge.net/sc2/?rev=3331&view=rev Author: avolkov Date: 2009-11-20 18:37:32 +0000 (Fri, 20 Nov 2009) Log Message: ----------- Removal of redraw hacks obsoleted by revisions 390 (introduction of SOLARSYS_STATE.PauseRotate), 469 (save of screen state) and 1321 (abolishment of IPtask_func); dead PlayMusic() hacks also removed; also fixes bug #868 Modified Paths: -------------- trunk/sc2/src/uqm/gameopt.c trunk/sc2/src/uqm/planets/plangen.c Modified: trunk/sc2/src/uqm/gameopt.c =================================================================== --- trunk/sc2/src/uqm/gameopt.c 2009-11-20 17:14:20 UTC (rev 3330) +++ trunk/sc2/src/uqm/gameopt.c 2009-11-20 18:37:32 UTC (rev 3331) @@ -875,17 +875,6 @@ { // Selected LOAD from main menu, and now canceled GLOBAL (CurrentActivity) |= CHECK_ABORT; } - else if (pSolarSysState) - { -#define DRAW_REFRESH (1 << 5) -#define REPAIR_SCAN (1 << 6) - extern BYTE draw_sys_flags; - - if (pSolarSysState->MenuState.Initialized < 3) - draw_sys_flags |= DRAW_REFRESH; - else if (pSolarSysState->MenuState.Initialized == 4) - draw_sys_flags |= REPAIR_SCAN; - } return (FALSE); } else if (PulsedInputState.menu[KEY_MENU_SELECT]) @@ -922,17 +911,6 @@ goto Restart; } ResumeMusic (); - if (pSolarSysState) - { -#define DRAW_REFRESH (1 << 5) -#define REPAIR_SCAN (1 << 6) - extern BYTE draw_sys_flags; - - if (pSolarSysState->MenuState.Initialized < 3) - draw_sys_flags |= DRAW_REFRESH; - else if (pSolarSysState->MenuState.Initialized == 4) - draw_sys_flags |= REPAIR_SCAN; - } } else { @@ -1120,7 +1098,6 @@ if (pSolarSysState) { - ++pSolarSysState->MenuState.Initialized; pSolarSysState->PauseRotate = 1; TaskSwitch (); } @@ -1132,6 +1109,7 @@ DlgStamp.origin.x = 0; DlgStamp.origin.y = 0; + // Save the current state of the screen for later restoration DlgRect.corner.x = SIS_ORG_X; DlgRect.corner.y = SIS_ORG_Y; DlgRect.extent.width = SIS_SCREEN_WIDTH; @@ -1164,46 +1142,15 @@ } if (!(GLOBAL (CurrentActivity) & (CHECK_ABORT | CHECK_LOAD))) - { // Restore previous screen if necessary - // TODO: Need a better test for in-encounter - if (CommData.ConversationPhrasesRes - || !(pSolarSysState - && pSolarSysState->MenuState.Initialized < 3)) - { - SetTransitionSource (&DlgRect); - BatchGraphics (); - DrawStamp(&DlgStamp); - ScreenTransition (3, &DlgRect); - UnbatchGraphics (); - } + { // Restore previous screen + SetTransitionSource (&DlgRect); + BatchGraphics (); + DrawStamp (&DlgStamp); + ScreenTransition (3, &DlgRect); + UnbatchGraphics (); if (pSolarSysState) - { - /* We're in interplanetary, so we let the IP - * functions know we're ready to draw stuff - * again and then update the frame twice; once - * for the screen transition, and once to draw - * the ships afterwards. */ - --pSolarSysState->MenuState.Initialized; pSolarSysState->PauseRotate = 0; - IP_frame (); - IP_frame (); - - - // TODO: Need a better test for in-encounter - if (!CommData.ConversationPhrasesRes - && !PLRPlaying ((MUSIC_REF)~0)) - { - if (pSolarSysState->MenuState.Initialized < 3) - { - PlayMusic (SpaceMusic, TRUE, 1); - } - else - { - PlayMusic (LanderMusic, TRUE, 1); - } - } - } } DestroyDrawable (ReleaseDrawable (DlgStamp.frame)); Modified: trunk/sc2/src/uqm/planets/plangen.c =================================================================== --- trunk/sc2/src/uqm/planets/plangen.c 2009-11-20 17:14:20 UTC (rev 3330) +++ trunk/sc2/src/uqm/planets/plangen.c 2009-11-20 18:37:32 UTC (rev 3331) @@ -2088,7 +2088,6 @@ // to acquire the graphics lock LockMutex (GraphicsLock); if (*(volatile UBYTE *)&pSS->PauseRotate != 1 -// if (((SOLARSYS_STATE *volatile)pSS)->MenuState.Initialized <= 3 && !(GLOBAL (CurrentActivity) & CHECK_ABORT)) { //PauseRotate == 2 is a single-step This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |