Spliting UndrawShip() into two functions so that player controls are processed separately from other actions; controls are not processed during DRAW_REFRESH; fixes #725
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1713 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -761,18 +761,13 @@ flagship_inertial_thrust (COUNT CurrentAngle)
|
|||||||
extern void DrawIPRadar (BOOLEAN FirstTime);
|
extern void DrawIPRadar (BOOLEAN FirstTime);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
UndrawShip (void)
|
ProcessShipControls (void)
|
||||||
{
|
{
|
||||||
COUNT index;
|
COUNT index;
|
||||||
SIZE radius, delta_x, delta_y;
|
SIZE delta_x, delta_y;
|
||||||
BOOLEAN LeavingInnerSystem;
|
|
||||||
|
|
||||||
ClockTick ();
|
ClockTick ();
|
||||||
|
|
||||||
#ifdef SHOW_RADAR
|
|
||||||
DrawIPRadar (FALSE);
|
|
||||||
#endif /* SHOW_RADAR */
|
|
||||||
|
|
||||||
if (CurrentInputState.key[KEY_P1_THRUST])
|
if (CurrentInputState.key[KEY_P1_THRUST])
|
||||||
delta_y = -1;
|
delta_y = -1;
|
||||||
else
|
else
|
||||||
@@ -820,6 +815,17 @@ UndrawShip (void)
|
|||||||
|
|
||||||
pSolarSysState->thrust_counter = THRUST_WAIT;
|
pSolarSysState->thrust_counter = THRUST_WAIT;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
UndrawShip (void)
|
||||||
|
{
|
||||||
|
SIZE radius, delta_x, delta_y;
|
||||||
|
BOOLEAN LeavingInnerSystem;
|
||||||
|
|
||||||
|
#ifdef SHOW_RADAR
|
||||||
|
DrawIPRadar (FALSE);
|
||||||
|
#endif /* SHOW_RADAR */
|
||||||
|
|
||||||
LeavingInnerSystem = FALSE;
|
LeavingInnerSystem = FALSE;
|
||||||
radius = pSolarSysState->SunDesc[0].radius;
|
radius = pSolarSysState->SunDesc[0].radius;
|
||||||
@@ -1074,6 +1080,8 @@ IP_frame (void)
|
|||||||
DrawSystem (pSolarSysState->SunDesc[0].radius, FALSE);
|
DrawSystem (pSolarSysState->SunDesc[0].radius, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!(draw_sys_flags & DRAW_REFRESH))
|
||||||
|
ProcessShipControls ();
|
||||||
UndrawShip ();
|
UndrawShip ();
|
||||||
if (pSolarSysState->MenuState.Initialized != 1)
|
if (pSolarSysState->MenuState.Initialized != 1)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user