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
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3331 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
+2
-55
@@ -875,17 +875,6 @@ Restart:
|
|||||||
{ // Selected LOAD from main menu, and now canceled
|
{ // Selected LOAD from main menu, and now canceled
|
||||||
GLOBAL (CurrentActivity) |= CHECK_ABORT;
|
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);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
else if (PulsedInputState.menu[KEY_MENU_SELECT])
|
else if (PulsedInputState.menu[KEY_MENU_SELECT])
|
||||||
@@ -922,17 +911,6 @@ Restart:
|
|||||||
goto Restart;
|
goto Restart;
|
||||||
}
|
}
|
||||||
ResumeMusic ();
|
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
|
else
|
||||||
{
|
{
|
||||||
@@ -1120,7 +1098,6 @@ PickGame (MENU_STATE *pMS)
|
|||||||
|
|
||||||
if (pSolarSysState)
|
if (pSolarSysState)
|
||||||
{
|
{
|
||||||
++pSolarSysState->MenuState.Initialized;
|
|
||||||
pSolarSysState->PauseRotate = 1;
|
pSolarSysState->PauseRotate = 1;
|
||||||
TaskSwitch ();
|
TaskSwitch ();
|
||||||
}
|
}
|
||||||
@@ -1132,6 +1109,7 @@ PickGame (MENU_STATE *pMS)
|
|||||||
|
|
||||||
DlgStamp.origin.x = 0;
|
DlgStamp.origin.x = 0;
|
||||||
DlgStamp.origin.y = 0;
|
DlgStamp.origin.y = 0;
|
||||||
|
// Save the current state of the screen for later restoration
|
||||||
DlgRect.corner.x = SIS_ORG_X;
|
DlgRect.corner.x = SIS_ORG_X;
|
||||||
DlgRect.corner.y = SIS_ORG_Y;
|
DlgRect.corner.y = SIS_ORG_Y;
|
||||||
DlgRect.extent.width = SIS_SCREEN_WIDTH;
|
DlgRect.extent.width = SIS_SCREEN_WIDTH;
|
||||||
@@ -1164,46 +1142,15 @@ PickGame (MENU_STATE *pMS)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!(GLOBAL (CurrentActivity) & (CHECK_ABORT | CHECK_LOAD)))
|
if (!(GLOBAL (CurrentActivity) & (CHECK_ABORT | CHECK_LOAD)))
|
||||||
{ // Restore previous screen if necessary
|
{ // Restore previous screen
|
||||||
// TODO: Need a better test for in-encounter
|
|
||||||
if (CommData.ConversationPhrasesRes
|
|
||||||
|| !(pSolarSysState
|
|
||||||
&& pSolarSysState->MenuState.Initialized < 3))
|
|
||||||
{
|
|
||||||
SetTransitionSource (&DlgRect);
|
SetTransitionSource (&DlgRect);
|
||||||
BatchGraphics ();
|
BatchGraphics ();
|
||||||
DrawStamp (&DlgStamp);
|
DrawStamp (&DlgStamp);
|
||||||
ScreenTransition (3, &DlgRect);
|
ScreenTransition (3, &DlgRect);
|
||||||
UnbatchGraphics ();
|
UnbatchGraphics ();
|
||||||
}
|
|
||||||
|
|
||||||
if (pSolarSysState)
|
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;
|
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));
|
DestroyDrawable (ReleaseDrawable (DlgStamp.frame));
|
||||||
|
|||||||
@@ -2088,7 +2088,6 @@ rotate_planet_task (void *data)
|
|||||||
// to acquire the graphics lock
|
// to acquire the graphics lock
|
||||||
LockMutex (GraphicsLock);
|
LockMutex (GraphicsLock);
|
||||||
if (*(volatile UBYTE *)&pSS->PauseRotate != 1
|
if (*(volatile UBYTE *)&pSS->PauseRotate != 1
|
||||||
// if (((SOLARSYS_STATE *volatile)pSS)->MenuState.Initialized <= 3
|
|
||||||
&& !(GLOBAL (CurrentActivity) & CHECK_ABORT))
|
&& !(GLOBAL (CurrentActivity) & CHECK_ABORT))
|
||||||
{
|
{
|
||||||
//PauseRotate == 2 is a single-step
|
//PauseRotate == 2 is a single-step
|
||||||
|
|||||||
Reference in New Issue
Block a user