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:
avolkov
2005-05-05 06:51:46 +00:00
parent 24e60a8054
commit ad2c60d2c8
+15 -7
View File
@@ -761,18 +761,13 @@ flagship_inertial_thrust (COUNT CurrentAngle)
extern void DrawIPRadar (BOOLEAN FirstTime);
static void
UndrawShip (void)
ProcessShipControls (void)
{
COUNT index;
SIZE radius, delta_x, delta_y;
BOOLEAN LeavingInnerSystem;
SIZE delta_x, delta_y;
ClockTick ();
#ifdef SHOW_RADAR
DrawIPRadar (FALSE);
#endif /* SHOW_RADAR */
if (CurrentInputState.key[KEY_P1_THRUST])
delta_y = -1;
else
@@ -820,6 +815,17 @@ UndrawShip (void)
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;
radius = pSolarSysState->SunDesc[0].radius;
@@ -1074,6 +1080,8 @@ IP_frame (void)
DrawSystem (pSolarSysState->SunDesc[0].radius, FALSE);
}
if (!(draw_sys_flags & DRAW_REFRESH))
ProcessShipControls ();
UndrawShip ();
if (pSolarSysState->MenuState.Initialized != 1)
{