Cleaning up SetFlashRect interface
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2297 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -70,7 +70,7 @@ DoSelectAction (PMENU_STATE pMS)
|
||||
{
|
||||
DrawMenuStateStrings (PM_CONVERSE, pMS->CurState);
|
||||
LockMutex (GraphicsLock);
|
||||
SetFlashRect ((PRECT)~0L, (FRAME)0);
|
||||
SetFlashRect (SFR_MENU_3DO, (FRAME)0);
|
||||
UnlockMutex (GraphicsLock);
|
||||
}
|
||||
return ((BOOLEAN)pMS->Initialized);
|
||||
@@ -318,7 +318,7 @@ InitEncounter (void)
|
||||
|
||||
DrawMenuStateStrings (PM_CONVERSE, MenuState.CurState = HAIL);
|
||||
LockMutex (GraphicsLock);
|
||||
SetFlashRect ((PRECT)~0L, (FRAME)0);
|
||||
SetFlashRect (SFR_MENU_3DO, (FRAME)0);
|
||||
UnlockMutex (GraphicsLock);
|
||||
|
||||
DoInput ((PVOID)&MenuState, TRUE);
|
||||
|
||||
@@ -265,7 +265,7 @@ DrawDescriptionString (PMENU_STATE pMS, COUNT which_string, COUNT state)
|
||||
|
||||
if (!(state & DDSHS_EDIT))
|
||||
{ // normal state
|
||||
SetFlashRect ((PRECT)~0L, (FRAME)0);
|
||||
SetFlashRect (SFR_MENU_3DO, (FRAME)0);
|
||||
|
||||
if (pMS->InputFunc == DoNaming)
|
||||
{
|
||||
@@ -953,7 +953,7 @@ Restart:
|
||||
else if (PulsedInputState.key[KEY_MENU_CANCEL])
|
||||
{
|
||||
LockMutex (GraphicsLock);
|
||||
SetFlashRect ((PRECT)~0L, (FRAME)0);
|
||||
SetFlashRect (SFR_MENU_3DO, (FRAME)0);
|
||||
UnlockMutex (GraphicsLock);
|
||||
pMS->ModuleFrame = 0;
|
||||
pMS->CurState = (BYTE)pMS->delta_item;
|
||||
@@ -1180,7 +1180,7 @@ ChangeGameSelection:
|
||||
}
|
||||
UnbatchGraphics ();
|
||||
}
|
||||
SetFlashRect (0, (FRAME)0);
|
||||
SetFlashRect (NULL_PTR, (FRAME)0);
|
||||
UnlockMutex (GraphicsLock);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1590,7 +1590,7 @@ UnbatchGraphics ();
|
||||
|
||||
DrawMenuStateStrings (PM_STARMAP, STARMAP);
|
||||
LockMutex (GraphicsLock);
|
||||
SetFlashRect ((PRECT)~0L, (FRAME)0);
|
||||
SetFlashRect (SFR_MENU_3DO, (FRAME)0);
|
||||
UnlockMutex (GraphicsLock);
|
||||
|
||||
SetMenuSounds (MENU_SOUND_ARROWS, MENU_SOUND_SELECT);
|
||||
|
||||
@@ -580,7 +580,7 @@ DrawMenuStateStrings (BYTE beg_index, SWORD NewState)
|
||||
&& flash_rect.corner.y == RADAR_Y
|
||||
&& flash_rect.extent.width == RADAR_WIDTH
|
||||
&& flash_rect.extent.height == RADAR_HEIGHT)
|
||||
SetFlashRect ((PRECT)~0L, (FRAME)0);
|
||||
SetFlashRect (SFR_MENU_3DO, (FRAME)0);
|
||||
SetContext (OldContext);
|
||||
UnlockMutex (GraphicsLock);
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@ ChangeSelection:
|
||||
font_DrawText (&t);
|
||||
}
|
||||
|
||||
SetFlashRect ((RECT *)0, (FRAME)0);
|
||||
SetFlashRect (NULL_PTR, (FRAME)0);
|
||||
SetFlashRect (&pMS->flash_rect0, (FRAME)0);
|
||||
UnlockMutex (GraphicsLock);
|
||||
}
|
||||
|
||||
@@ -1773,7 +1773,7 @@ DoFlagshipCommands (PMENU_STATE pMS)
|
||||
--pMS->Initialized;
|
||||
pSolarSysState->PauseRotate = 0;
|
||||
LockMutex (GraphicsLock);
|
||||
SetFlashRect ((PRECT)~0L, (FRAME)0);
|
||||
SetFlashRect (SFR_MENU_3DO, (FRAME)0);
|
||||
UnlockMutex (GraphicsLock);
|
||||
break;
|
||||
}
|
||||
@@ -1809,7 +1809,7 @@ DoFlagshipCommands (PMENU_STATE pMS)
|
||||
else if (pMS->CurState)
|
||||
{
|
||||
LockMutex (GraphicsLock);
|
||||
SetFlashRect ((PRECT)~0L, (FRAME)0);
|
||||
SetFlashRect (SFR_MENU_3DO, (FRAME)0);
|
||||
UnlockMutex (GraphicsLock);
|
||||
if (select)
|
||||
{
|
||||
|
||||
@@ -802,7 +802,7 @@ PickPlanetSide (PMENU_STATE pMS)
|
||||
|
||||
DrawMenuStateStrings (PM_MIN_SCAN, DISPATCH_SHUTTLE);
|
||||
LockMutex (GraphicsLock);
|
||||
SetFlashRect ((PRECT)~0L, (FRAME)0);
|
||||
SetFlashRect (SFR_MENU_3DO, (FRAME)0);
|
||||
UnlockMutex (GraphicsLock);
|
||||
|
||||
ExitPlanetSide:
|
||||
|
||||
@@ -1237,7 +1237,7 @@ IP_frame (void)
|
||||
pSolarSysState->MenuState.CurState = STARMAP + 1;
|
||||
IP_input_state = 0;
|
||||
}
|
||||
SetFlashRect ((PRECT)~0L, (FRAME)0);
|
||||
SetFlashRect (SFR_MENU_3DO, (FRAME)0);
|
||||
FlushInput ();
|
||||
UnlockMutex (GraphicsLock);
|
||||
}
|
||||
@@ -1401,7 +1401,7 @@ StartGroups:
|
||||
DrawMenuStateStrings (PM_SCAN, SCAN);
|
||||
LockMutex (GraphicsLock);
|
||||
pSolarSysState->MenuState.CurState = SCAN + 1;
|
||||
SetFlashRect ((PRECT)~0L, (FRAME)0);
|
||||
SetFlashRect (SFR_MENU_3DO, (FRAME)0);
|
||||
FlushInput ();
|
||||
UnlockMutex (GraphicsLock);
|
||||
}
|
||||
|
||||
@@ -320,7 +320,7 @@ RestartMenu (PMENU_STATE pMS)
|
||||
}
|
||||
|
||||
LockMutex (GraphicsLock);
|
||||
SetFlashRect ((PRECT)0, (FRAME)0);
|
||||
SetFlashRect (NULL_PTR, (FRAME)0);
|
||||
UnlockMutex (GraphicsLock);
|
||||
DestroyDrawable (ReleaseDrawable (pMS->CurFrame));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user