mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
- Removed the "USE_HIGHSPEED_GAMELOOP_TIMER" define. Now highspeed timer and new way of dequeuing events are always enabled when building an executable
o This makes the code more easy to maintain o Highspeed timer seems to run fine (after months of tests) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5643 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -279,11 +279,7 @@ BOOLEAN HandleAutoBandage( )
|
||||
// Deque all game events
|
||||
DequeAllGameEvents( TRUE );
|
||||
|
||||
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
|
||||
while (DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||
#else
|
||||
while (DequeueEvent(&InputEvent) == TRUE)
|
||||
#endif
|
||||
{
|
||||
if ( InputEvent.usEvent == KEY_UP )
|
||||
{
|
||||
|
||||
@@ -1738,11 +1738,7 @@ void GetShopKeeperInterfaceUserInput()
|
||||
GetCursorPos(&MousePos);
|
||||
ScreenToClient(ghWindow, &MousePos); // In window coords!
|
||||
|
||||
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
|
||||
while (DequeueSpecificEvent(&Event, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||
#else
|
||||
while( DequeueEvent( &Event ) )
|
||||
#endif
|
||||
{
|
||||
// HOOK INTO MOUSE HOOKS
|
||||
/* removed warning condition C4060 (jonathanl)
|
||||
|
||||
@@ -620,11 +620,7 @@ void RenderSectorExitMenu( )
|
||||
gsGlobalCursorYOffset = 0;
|
||||
SetCurrentCursorFromDatabase( CURSOR_NORMAL );
|
||||
|
||||
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
|
||||
while (DequeueSpecificEvent(&Event, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||
#else
|
||||
while( DequeueEvent( &Event ) )
|
||||
#endif
|
||||
{
|
||||
if( Event.usEvent == KEY_DOWN )
|
||||
{
|
||||
|
||||
@@ -151,9 +151,7 @@ void HandleTacticalEndTurn( )
|
||||
// OK, Do a number of things here....
|
||||
// Every few turns......
|
||||
|
||||
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
|
||||
SetFastForwardMode(FALSE); // Cancel FF at end of battle
|
||||
#endif
|
||||
|
||||
// Get time elasped
|
||||
uiTime = GetWorldTotalSeconds( );
|
||||
|
||||
@@ -168,9 +168,7 @@ void StartPlayerTeamTurn( BOOLEAN fDoBattleSnd, BOOLEAN fEnteringCombatMode )
|
||||
// SOLDIERTYPE *pSoldier;
|
||||
// EV_S_BEGINTURN SBeginTurn;
|
||||
|
||||
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
|
||||
SetFastForwardMode(FALSE);
|
||||
#endif
|
||||
|
||||
// Start the turn of player charactors
|
||||
|
||||
@@ -506,7 +504,6 @@ void BeginTeamTurn( UINT8 ubTeam )
|
||||
if( !LightningEndOfTurn( ubTeam ) )return;
|
||||
//end rain
|
||||
|
||||
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
|
||||
// disable for our turn and enable for other teams
|
||||
if ( gGameSettings.fOptions[TOPTION_AUTO_FAST_FORWARD_MODE] )
|
||||
{
|
||||
@@ -521,7 +518,6 @@ void BeginTeamTurn( UINT8 ubTeam )
|
||||
SetFastForwardMode( (ubTeam != OUR_TEAM) );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
while( 1 )
|
||||
{
|
||||
@@ -849,9 +845,7 @@ void StartInterrupt( void )
|
||||
INT32 iSquad, iCounter;
|
||||
|
||||
// disable ff mode
|
||||
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
|
||||
SetFastForwardMode(FALSE);
|
||||
#endif
|
||||
|
||||
// build string for display of who gets interrupt
|
||||
//while( 1 )
|
||||
@@ -1454,7 +1448,6 @@ void EndInterrupt( BOOLEAN fMarkInterruptOccurred )
|
||||
|
||||
}
|
||||
|
||||
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
|
||||
if ( gGameSettings.fOptions[TOPTION_AUTO_FAST_FORWARD_MODE] )
|
||||
{
|
||||
if (is_networked)
|
||||
@@ -1468,7 +1461,6 @@ void EndInterrupt( BOOLEAN fMarkInterruptOccurred )
|
||||
SetFastForwardMode( (gTacticalStatus.ubCurrentTeam != OUR_TEAM) );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user