mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
Wrap PBI status flags in accessors
gfPreBattleInterfaceActive and gfUsePersistantPBI are now file-static in PreBattle Interface.cpp, reached only through Is/Set accessors declared in the header. No behavior change: getters return BOOLEAN so ==TRUE/==FALSE sites are untouched semantically. Verify: grep 'gfPreBattleInterfaceActive\|gfUsePersistantPBI' across the tree hits only the two static definitions, the four accessor bodies (all in PreBattle Interface.cpp), and two commented-out Asserts in Strategic Movement.cpp. Every other former site now calls an accessor. Build: JA2. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
committed by
majcosta
co-authored by
Claude Opus 4.8
parent
d683cdeb64
commit
dbf6e1cd10
+1
-1
@@ -427,7 +427,7 @@ UINT32 MainGameScreenHandle(void)
|
|||||||
|
|
||||||
// WANNE: Never show the helpscreen when leaving editor and going to the tactical game
|
// WANNE: Never show the helpscreen when leaving editor and going to the tactical game
|
||||||
#ifndef JA2EDITOR
|
#ifndef JA2EDITOR
|
||||||
if( !gfPreBattleInterfaceActive && ShouldTheHelpScreenComeUp( HELP_SCREEN_TACTICAL, FALSE ) )
|
if( !IsPreBattleInterfaceActive() && ShouldTheHelpScreenComeUp( HELP_SCREEN_TACTICAL, FALSE ) )
|
||||||
{
|
{
|
||||||
// handle the help screen
|
// handle the help screen
|
||||||
HelpScreenHandler();
|
HelpScreenHandler();
|
||||||
|
|||||||
@@ -5867,7 +5867,7 @@ BOOLEAN GetCurrentBattleSectorXYZ( INT16 *psSectorX, INT16 *psSectorY, INT16 *ps
|
|||||||
*psSectorZ = 0;
|
*psSectorZ = 0;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else if( gfPreBattleInterfaceActive )
|
else if( IsPreBattleInterfaceActive() )
|
||||||
{
|
{
|
||||||
*psSectorX = gubPBSectorX;
|
*psSectorX = gubPBSectorX;
|
||||||
*psSectorY = gubPBSectorY;
|
*psSectorY = gubPBSectorY;
|
||||||
@@ -5905,7 +5905,7 @@ BOOLEAN GetCurrentBattleSectorXYZAndReturnTRUEIfThereIsABattle( INT16 *psSectorX
|
|||||||
*psSectorZ = 0;
|
*psSectorZ = 0;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else if( gfPreBattleInterfaceActive )
|
else if( IsPreBattleInterfaceActive() )
|
||||||
{
|
{
|
||||||
*psSectorX = gubPBSectorX;
|
*psSectorX = gubPBSectorX;
|
||||||
*psSectorY = gubPBSectorY;
|
*psSectorY = gubPBSectorY;
|
||||||
|
|||||||
@@ -1942,7 +1942,7 @@ BOOLEAN AllowedToExitFromMapscreenTo( INT8 bExitToWhere )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// battle about to occur?
|
// battle about to occur?
|
||||||
if( ( fDisableDueToBattleRoster ) || ( fDisableMapInterfaceDueToBattle ) || ( gfPreBattleInterfaceActive ))
|
if( ( fDisableDueToBattleRoster ) || ( fDisableMapInterfaceDueToBattle ) || ( IsPreBattleInterfaceActive() ))
|
||||||
{
|
{
|
||||||
return( FALSE );
|
return( FALSE );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1250,7 +1250,7 @@ void JumpToLevel( INT32 iLevel )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( gfPreBattleInterfaceActive == TRUE )
|
if( IsPreBattleInterfaceActive() == TRUE )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2164,7 +2164,7 @@ void UpdateMapScreenAssignmentPositions( void )
|
|||||||
|
|
||||||
if( bSelectedAssignChar == -1 )
|
if( bSelectedAssignChar == -1 )
|
||||||
{
|
{
|
||||||
if( gfPreBattleInterfaceActive == FALSE )
|
if( IsPreBattleInterfaceActive() == FALSE )
|
||||||
{
|
{
|
||||||
giBoxY = 0;
|
giBoxY = 0;
|
||||||
}
|
}
|
||||||
@@ -2173,14 +2173,14 @@ void UpdateMapScreenAssignmentPositions( void )
|
|||||||
|
|
||||||
if( gCharactersList[ bSelectedAssignChar ].fValid == FALSE )
|
if( gCharactersList[ bSelectedAssignChar ].fValid == FALSE )
|
||||||
{
|
{
|
||||||
if( gfPreBattleInterfaceActive == FALSE )
|
if( IsPreBattleInterfaceActive() == FALSE )
|
||||||
{
|
{
|
||||||
giBoxY = 0;
|
giBoxY = 0;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( gfPreBattleInterfaceActive )
|
if( IsPreBattleInterfaceActive() )
|
||||||
{
|
{
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
@@ -2325,7 +2325,7 @@ void UpdateMapScreenMilitiaControlPositions( void )
|
|||||||
|
|
||||||
if( bSelectedAssignChar == -1 )
|
if( bSelectedAssignChar == -1 )
|
||||||
{
|
{
|
||||||
if( gfPreBattleInterfaceActive == FALSE )
|
if( IsPreBattleInterfaceActive() == FALSE )
|
||||||
{
|
{
|
||||||
giBoxY = 0;
|
giBoxY = 0;
|
||||||
}
|
}
|
||||||
@@ -2334,14 +2334,14 @@ void UpdateMapScreenMilitiaControlPositions( void )
|
|||||||
|
|
||||||
if( gCharactersList[ bSelectedAssignChar ].fValid == FALSE )
|
if( gCharactersList[ bSelectedAssignChar ].fValid == FALSE )
|
||||||
{
|
{
|
||||||
if( gfPreBattleInterfaceActive == FALSE )
|
if( IsPreBattleInterfaceActive() == FALSE )
|
||||||
{
|
{
|
||||||
giBoxY = 0;
|
giBoxY = 0;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( gfPreBattleInterfaceActive )
|
if( IsPreBattleInterfaceActive() )
|
||||||
{
|
{
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -395,7 +395,7 @@ void CheckForMeanwhileOKStart( )
|
|||||||
if ( gfMeanwhileTryingToStart )
|
if ( gfMeanwhileTryingToStart )
|
||||||
{
|
{
|
||||||
// Are we in prebattle interface?
|
// Are we in prebattle interface?
|
||||||
if ( gfPreBattleInterfaceActive )
|
if ( IsPreBattleInterfaceActive() )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ SOLDIERTYPE* UninvolvedSoldier( INT32 index );
|
|||||||
|
|
||||||
|
|
||||||
MOUSE_REGION PBInterfaceBlanket;
|
MOUSE_REGION PBInterfaceBlanket;
|
||||||
BOOLEAN gfPreBattleInterfaceActive = FALSE;
|
static BOOLEAN gfPreBattleInterfaceActive = FALSE;
|
||||||
UINT32 iPBButton[3] = {0,0,0};
|
UINT32 iPBButton[3] = {0,0,0};
|
||||||
UINT32 iPBButtonImage[3] = {0,0,0};
|
UINT32 iPBButtonImage[3] = {0,0,0};
|
||||||
// WDS Graphics bug die to uninitialized variable
|
// WDS Graphics bug die to uninitialized variable
|
||||||
@@ -208,7 +208,13 @@ extern UINT8 gubPBSectorZ = 0;
|
|||||||
BOOLEAN gfCantRetreatInPBI = FALSE;
|
BOOLEAN gfCantRetreatInPBI = FALSE;
|
||||||
//SAVE END
|
//SAVE END
|
||||||
|
|
||||||
BOOLEAN gfUsePersistantPBI = FALSE;
|
static BOOLEAN gfUsePersistantPBI = FALSE;
|
||||||
|
|
||||||
|
BOOLEAN IsPreBattleInterfaceActive() { return gfPreBattleInterfaceActive; }
|
||||||
|
void SetPreBattleInterfaceActive( BOOLEAN fActive ) { gfPreBattleInterfaceActive = fActive; }
|
||||||
|
|
||||||
|
BOOLEAN IsPersistantPBI() { return gfUsePersistantPBI; }
|
||||||
|
void SetPersistantPBI( BOOLEAN fPersistant ) { gfUsePersistantPBI = fPersistant; }
|
||||||
|
|
||||||
INT32 giHilitedInvolved = 0;
|
INT32 giHilitedInvolved = 0;
|
||||||
INT32 giHilitedUninvolved = 0;
|
INT32 giHilitedUninvolved = 0;
|
||||||
@@ -314,7 +320,7 @@ void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI )
|
|||||||
AbortMovementPlottingMode( );
|
AbortMovementPlottingMode( );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( gfPreBattleInterfaceActive )
|
if( IsPreBattleInterfaceActive() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
//CHRISL: If for some reason we're not looking at a valid sector, leave the preBattleInterface.
|
//CHRISL: If for some reason we're not looking at a valid sector, leave the preBattleInterface.
|
||||||
@@ -361,7 +367,7 @@ void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI )
|
|||||||
gpBattleGroup = pBattleGroup;
|
gpBattleGroup = pBattleGroup;
|
||||||
gfEnteringMapScreen = TRUE;
|
gfEnteringMapScreen = TRUE;
|
||||||
gfEnteringMapScreenToEnterPreBattleInterface = TRUE;
|
gfEnteringMapScreenToEnterPreBattleInterface = TRUE;
|
||||||
gfUsePersistantPBI = TRUE;
|
SetPersistantPBI( TRUE );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -375,7 +381,7 @@ void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI )
|
|||||||
gpBattleGroup = pBattleGroup;
|
gpBattleGroup = pBattleGroup;
|
||||||
gfEnteringMapScreen = TRUE;
|
gfEnteringMapScreen = TRUE;
|
||||||
gfEnteringMapScreenToEnterPreBattleInterface = TRUE;
|
gfEnteringMapScreenToEnterPreBattleInterface = TRUE;
|
||||||
gfUsePersistantPBI = TRUE;
|
SetPersistantPBI( TRUE );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -585,7 +591,7 @@ void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI )
|
|||||||
gfPBButtonsHidden = TRUE;
|
gfPBButtonsHidden = TRUE;
|
||||||
|
|
||||||
// ARM: this must now be set before any calls utilizing the GetCurrentBattleSectorXYZ() function
|
// ARM: this must now be set before any calls utilizing the GetCurrentBattleSectorXYZ() function
|
||||||
gfPreBattleInterfaceActive = TRUE;
|
SetPreBattleInterfaceActive( TRUE );
|
||||||
|
|
||||||
CheckForRobotAndIfItsControlled();
|
CheckForRobotAndIfItsControlled();
|
||||||
|
|
||||||
@@ -1211,7 +1217,7 @@ void ScrollPreBattleInterface( BOOLEAN fUp )
|
|||||||
|
|
||||||
void KillPreBattleInterface()
|
void KillPreBattleInterface()
|
||||||
{
|
{
|
||||||
if( !gfPreBattleInterfaceActive )
|
if( !IsPreBattleInterfaceActive() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
fDisableMapInterfaceDueToBattle = FALSE;
|
fDisableMapInterfaceDueToBattle = FALSE;
|
||||||
@@ -1234,7 +1240,7 @@ void KillPreBattleInterface()
|
|||||||
MSYS_RemoveRegion( &UninvolvedRegion );
|
MSYS_RemoveRegion( &UninvolvedRegion );
|
||||||
*/
|
*/
|
||||||
|
|
||||||
gfPreBattleInterfaceActive = FALSE;
|
SetPreBattleInterfaceActive( FALSE );
|
||||||
|
|
||||||
//UpdateCharRegionHelpText( );
|
//UpdateCharRegionHelpText( );
|
||||||
|
|
||||||
@@ -2685,17 +2691,17 @@ void HandlePreBattleInterfaceStates()
|
|||||||
if( gfEnteringMapScreenToEnterPreBattleInterface && !gfEnteringMapScreen )
|
if( gfEnteringMapScreenToEnterPreBattleInterface && !gfEnteringMapScreen )
|
||||||
{
|
{
|
||||||
gfEnteringMapScreenToEnterPreBattleInterface = FALSE;
|
gfEnteringMapScreenToEnterPreBattleInterface = FALSE;
|
||||||
if( !gfUsePersistantPBI )
|
if( !IsPersistantPBI() )
|
||||||
{
|
{
|
||||||
InitPreBattleInterface( NULL, FALSE );
|
InitPreBattleInterface( NULL, FALSE );
|
||||||
gfUsePersistantPBI = TRUE;
|
SetPersistantPBI( TRUE );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
InitPreBattleInterface( gpBattleGroup, TRUE );
|
InitPreBattleInterface( gpBattleGroup, TRUE );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( gfDelayAutoResolveStart && gfPreBattleInterfaceActive )
|
else if( gfDelayAutoResolveStart && IsPreBattleInterfaceActive() )
|
||||||
{
|
{
|
||||||
gfDelayAutoResolveStart = FALSE;
|
gfDelayAutoResolveStart = FALSE;
|
||||||
gfAutomaticallyStartAutoResolve = TRUE;
|
gfAutomaticallyStartAutoResolve = TRUE;
|
||||||
|
|||||||
@@ -9,7 +9,10 @@ void KillPreBattleInterface();
|
|||||||
void RenderPreBattleInterface();
|
void RenderPreBattleInterface();
|
||||||
void ScrollPreBattleInterface( BOOLEAN fUp );
|
void ScrollPreBattleInterface( BOOLEAN fUp );
|
||||||
|
|
||||||
extern BOOLEAN gfPreBattleInterfaceActive;
|
BOOLEAN IsPreBattleInterfaceActive();
|
||||||
|
void SetPreBattleInterfaceActive( BOOLEAN fActive );
|
||||||
|
BOOLEAN IsPersistantPBI();
|
||||||
|
void SetPersistantPBI( BOOLEAN fPersistant );
|
||||||
extern BOOLEAN gfDisplayPotentialRetreatPaths;
|
extern BOOLEAN gfDisplayPotentialRetreatPaths;
|
||||||
extern BOOLEAN gfAutomaticallyStartAutoResolve;
|
extern BOOLEAN gfAutomaticallyStartAutoResolve;
|
||||||
extern BOOLEAN fDisableMapInterfaceDueToBattle;
|
extern BOOLEAN fDisableMapInterfaceDueToBattle;
|
||||||
|
|||||||
@@ -80,7 +80,6 @@ GROUP *gpPendingSimultaneousGroup = NULL;
|
|||||||
|
|
||||||
// is the bottom of the map panel dirty?
|
// is the bottom of the map panel dirty?
|
||||||
extern BOOLEAN fMapScreenBottomDirty;
|
extern BOOLEAN fMapScreenBottomDirty;
|
||||||
extern BOOLEAN gfUsePersistantPBI;
|
|
||||||
|
|
||||||
extern BOOLEAN gfExitViewer;
|
extern BOOLEAN gfExitViewer;
|
||||||
BOOLEAN ValidateGroups( GROUP *pGroup );
|
BOOLEAN ValidateGroups( GROUP *pGroup );
|
||||||
@@ -1378,7 +1377,7 @@ BOOLEAN CheckConditionsForBattle( GROUP *pGroup )
|
|||||||
{
|
{
|
||||||
//Prepare for instant autoresolve.
|
//Prepare for instant autoresolve.
|
||||||
gfDelayAutoResolveStart = TRUE;
|
gfDelayAutoResolveStart = TRUE;
|
||||||
gfUsePersistantPBI = TRUE;
|
SetPersistantPBI( TRUE );
|
||||||
if( fMilitiaPresent )
|
if( fMilitiaPresent )
|
||||||
{
|
{
|
||||||
NotifyPlayerOfInvasionByEnemyForces( pGroup->ubSectorX, pGroup->ubSectorY, 0, TriggerPrebattleInterface );
|
NotifyPlayerOfInvasionByEnemyForces( pGroup->ubSectorX, pGroup->ubSectorY, 0, TriggerPrebattleInterface );
|
||||||
@@ -5504,7 +5503,7 @@ void NotifyPlayerOfBloodcatBattle( UINT8 ubSectorX, UINT8 ubSectorY )
|
|||||||
RefreshScreen( NULL );
|
RefreshScreen( NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
gfUsePersistantPBI = TRUE;
|
SetPersistantPBI( TRUE );
|
||||||
DoScreenIndependantMessageBox( str, MSG_BOX_FLAG_OK, TriggerPrebattleInterface );
|
DoScreenIndependantMessageBox( str, MSG_BOX_FLAG_OK, TriggerPrebattleInterface );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6209,7 +6208,7 @@ void CheckCombatInSectorDueToUnusualEnemyArrival( UINT8 aTeam, INT16 sX, INT16 s
|
|||||||
{
|
{
|
||||||
//Prepare for instant autoresolve.
|
//Prepare for instant autoresolve.
|
||||||
gfDelayAutoResolveStart = TRUE;
|
gfDelayAutoResolveStart = TRUE;
|
||||||
gfUsePersistantPBI = TRUE;
|
SetPersistantPBI( TRUE );
|
||||||
if ( fMilitiaPresent )
|
if ( fMilitiaPresent )
|
||||||
{
|
{
|
||||||
NotifyPlayerOfInvasionByEnemyForces( sX, sY, 0, TriggerPrebattleInterface );
|
NotifyPlayerOfInvasionByEnemyForces( sX, sY, 0, TriggerPrebattleInterface );
|
||||||
|
|||||||
+30
-32
@@ -578,8 +578,6 @@ extern BOOLEAN fMapScreenBottomDirty;
|
|||||||
extern BOOLEAN fResetTimerForFirstEntryIntoMapScreen;
|
extern BOOLEAN fResetTimerForFirstEntryIntoMapScreen;
|
||||||
extern BOOLEAN gfStartedFromMapScreen;
|
extern BOOLEAN gfStartedFromMapScreen;
|
||||||
|
|
||||||
extern BOOLEAN gfUsePersistantPBI;
|
|
||||||
|
|
||||||
extern BOOLEAN gfOneFramePauseOnExit;
|
extern BOOLEAN gfOneFramePauseOnExit;
|
||||||
|
|
||||||
// the selected list of mercs
|
// the selected list of mercs
|
||||||
@@ -6674,7 +6672,7 @@ UINT32 HandleMapUI( )
|
|||||||
bMapZ=gCharactersList[bSelectedInfoChar].usSolID.bSectorZ;
|
bMapZ=gCharactersList[bSelectedInfoChar].usSolID.bSectorZ;
|
||||||
|
|
||||||
if( ( sSelMapX != sMapX || sSelMapY != sMapY || iCurrentMapSectorZ != bMapZ ) &&
|
if( ( sSelMapX != sMapX || sSelMapY != sMapY || iCurrentMapSectorZ != bMapZ ) &&
|
||||||
( gTacticalStatus.fDidGameJustStart == FALSE ) && ( gfPreBattleInterfaceActive == FALSE ) )
|
( gTacticalStatus.fDidGameJustStart == FALSE ) && ( IsPreBattleInterfaceActive() == FALSE ) )
|
||||||
{
|
{
|
||||||
ChangeSelectedMapSector( sMapX, sMapY, bMapZ );
|
ChangeSelectedMapSector( sMapX, sMapY, bMapZ );
|
||||||
|
|
||||||
@@ -7035,7 +7033,7 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
|||||||
case ESC:
|
case ESC:
|
||||||
gfDontStartTransitionFromLaptop = TRUE;
|
gfDontStartTransitionFromLaptop = TRUE;
|
||||||
|
|
||||||
if( gfPreBattleInterfaceActive && !gfPersistantPBI )
|
if( IsPreBattleInterfaceActive() && !gfPersistantPBI )
|
||||||
{ //Non persistant PBI. Allow ESC to close it and return to mapscreen.
|
{ //Non persistant PBI. Allow ESC to close it and return to mapscreen.
|
||||||
KillPreBattleInterface();
|
KillPreBattleInterface();
|
||||||
gpBattleGroup = NULL;
|
gpBattleGroup = NULL;
|
||||||
@@ -7207,7 +7205,7 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PGUP:
|
case PGUP:
|
||||||
if (gfPreBattleInterfaceActive)
|
if (IsPreBattleInterfaceActive())
|
||||||
{
|
{
|
||||||
ScrollPreBattleInterface(TRUE);
|
ScrollPreBattleInterface(TRUE);
|
||||||
}
|
}
|
||||||
@@ -7220,7 +7218,7 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case PGDN:
|
case PGDN:
|
||||||
if (gfPreBattleInterfaceActive)
|
if (IsPreBattleInterfaceActive())
|
||||||
{
|
{
|
||||||
ScrollPreBattleInterface(FALSE);
|
ScrollPreBattleInterface(FALSE);
|
||||||
}
|
}
|
||||||
@@ -7650,7 +7648,7 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( gfPreBattleInterfaceActive )
|
if( IsPreBattleInterfaceActive() )
|
||||||
{
|
{
|
||||||
//activate autoresolve in prebattle interface.
|
//activate autoresolve in prebattle interface.
|
||||||
ActivatePreBattleAutoresolveAction();
|
ActivatePreBattleAutoresolveAction();
|
||||||
@@ -7756,7 +7754,7 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
|||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case 'e':
|
case 'e':
|
||||||
if( gfPreBattleInterfaceActive )
|
if( IsPreBattleInterfaceActive() )
|
||||||
{ //activate enter sector in prebattle interface.
|
{ //activate enter sector in prebattle interface.
|
||||||
gfHotKeyEnterSector = TRUE;
|
gfHotKeyEnterSector = TRUE;
|
||||||
}
|
}
|
||||||
@@ -8194,7 +8192,7 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
|||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
if( gfPreBattleInterfaceActive )
|
if( IsPreBattleInterfaceActive() )
|
||||||
{ //activate autoresolve in prebattle interface.
|
{ //activate autoresolve in prebattle interface.
|
||||||
ActivatePreBattleRetreatAction();
|
ActivatePreBattleRetreatAction();
|
||||||
}
|
}
|
||||||
@@ -9176,7 +9174,7 @@ void PollLeftButtonInMapView( UINT32 *puiNewEvent )
|
|||||||
{
|
{
|
||||||
if ( /*( gTacticalStatus.fDidGameJustStart == TRUE ) || */
|
if ( /*( gTacticalStatus.fDidGameJustStart == TRUE ) || */
|
||||||
// commented out to allow heli drop off change @/b4 start ;)
|
// commented out to allow heli drop off change @/b4 start ;)
|
||||||
( gfPreBattleInterfaceActive == TRUE ) ||
|
( IsPreBattleInterfaceActive() == TRUE ) ||
|
||||||
( fDisableMapInterfaceDueToBattle == TRUE ) )
|
( fDisableMapInterfaceDueToBattle == TRUE ) )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -9185,7 +9183,7 @@ void PollLeftButtonInMapView( UINT32 *puiNewEvent )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( ( gTacticalStatus.fDidGameJustStart == TRUE ) ||
|
if ( ( gTacticalStatus.fDidGameJustStart == TRUE ) ||
|
||||||
( gfPreBattleInterfaceActive == TRUE ) ||
|
( IsPreBattleInterfaceActive() == TRUE ) ||
|
||||||
( fDisableMapInterfaceDueToBattle == TRUE ) )
|
( fDisableMapInterfaceDueToBattle == TRUE ) )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -9293,7 +9291,7 @@ void PollRightButtonInMapView( UINT32 *puiNewEvent )
|
|||||||
// ignore right clicks in the map area if:
|
// ignore right clicks in the map area if:
|
||||||
// game just started or we're in the prebattle interface or if we are about to hit pre-battle
|
// game just started or we're in the prebattle interface or if we are about to hit pre-battle
|
||||||
if ( ( gTacticalStatus.fDidGameJustStart == TRUE ) ||
|
if ( ( gTacticalStatus.fDidGameJustStart == TRUE ) ||
|
||||||
( gfPreBattleInterfaceActive == TRUE ) ||
|
( IsPreBattleInterfaceActive() == TRUE ) ||
|
||||||
( fDisableMapInterfaceDueToBattle == TRUE ) )
|
( fDisableMapInterfaceDueToBattle == TRUE ) )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -10922,7 +10920,7 @@ void BlitBackgroundToSaveBuffer( void )
|
|||||||
// render character info
|
// render character info
|
||||||
RenderCharacterInfoBackground( );
|
RenderCharacterInfoBackground( );
|
||||||
}
|
}
|
||||||
else if( gfPreBattleInterfaceActive )
|
else if( IsPreBattleInterfaceActive() )
|
||||||
{
|
{
|
||||||
ForceButtonUnDirty( giMapContractButton );
|
ForceButtonUnDirty( giMapContractButton );
|
||||||
ForceButtonUnDirty( giCharInfoButton[ 0 ] );
|
ForceButtonUnDirty( giCharInfoButton[ 0 ] );
|
||||||
@@ -11288,7 +11286,7 @@ void TeamListInfoRegionBtnCallBack(MOUSE_REGION *pRegion, INT32 iReason )
|
|||||||
SOLDIERTYPE *pSoldier = NULL;
|
SOLDIERTYPE *pSoldier = NULL;
|
||||||
|
|
||||||
|
|
||||||
if( fLockOutMapScreenInterface || gfPreBattleInterfaceActive )
|
if( fLockOutMapScreenInterface || IsPreBattleInterfaceActive() )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -11410,7 +11408,7 @@ void TeamListInfoRegionMvtCallBack(MOUSE_REGION *pRegion, INT32 iReason )
|
|||||||
INT32 iValue = 0;
|
INT32 iValue = 0;
|
||||||
|
|
||||||
|
|
||||||
if( fLockOutMapScreenInterface || gfPreBattleInterfaceActive )
|
if( fLockOutMapScreenInterface || IsPreBattleInterfaceActive() )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -11443,7 +11441,7 @@ void TeamListAssignmentRegionBtnCallBack(MOUSE_REGION *pRegion, INT32 iReason )
|
|||||||
SOLDIERTYPE *pSoldier = NULL;
|
SOLDIERTYPE *pSoldier = NULL;
|
||||||
|
|
||||||
|
|
||||||
if( fLockOutMapScreenInterface || gfPreBattleInterfaceActive )
|
if( fLockOutMapScreenInterface || IsPreBattleInterfaceActive() )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -11624,7 +11622,7 @@ void TeamListAssignmentRegionMvtCallBack(MOUSE_REGION *pRegion, INT32 iReason )
|
|||||||
INT32 iValue = 0;
|
INT32 iValue = 0;
|
||||||
|
|
||||||
|
|
||||||
if( fLockOutMapScreenInterface || gfPreBattleInterfaceActive )
|
if( fLockOutMapScreenInterface || IsPreBattleInterfaceActive() )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -11683,7 +11681,7 @@ void TeamListDestinationRegionBtnCallBack(MOUSE_REGION *pRegion, INT32 iReason )
|
|||||||
{
|
{
|
||||||
INT32 iValue = 0;
|
INT32 iValue = 0;
|
||||||
|
|
||||||
if( fLockOutMapScreenInterface || gfPreBattleInterfaceActive || fShowMapInventoryPool )
|
if( fLockOutMapScreenInterface || IsPreBattleInterfaceActive() || fShowMapInventoryPool )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -11805,7 +11803,7 @@ void TeamListDestinationRegionMvtCallBack(MOUSE_REGION *pRegion, INT32 iReason )
|
|||||||
INT32 iValue = -1;
|
INT32 iValue = -1;
|
||||||
|
|
||||||
|
|
||||||
if( fLockOutMapScreenInterface || gfPreBattleInterfaceActive )
|
if( fLockOutMapScreenInterface || IsPreBattleInterfaceActive() )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -11857,7 +11855,7 @@ void TeamListSleepRegionBtnCallBack( MOUSE_REGION *pRegion, INT32 iReason )
|
|||||||
SOLDIERTYPE *pSoldier = NULL;
|
SOLDIERTYPE *pSoldier = NULL;
|
||||||
|
|
||||||
|
|
||||||
if( fLockOutMapScreenInterface || gfPreBattleInterfaceActive )
|
if( fLockOutMapScreenInterface || IsPreBattleInterfaceActive() )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -11946,7 +11944,7 @@ void TeamListSleepRegionMvtCallBack( MOUSE_REGION *pRegion, INT32 iReason )
|
|||||||
INT32 iValue = -1;
|
INT32 iValue = -1;
|
||||||
|
|
||||||
|
|
||||||
if( fLockOutMapScreenInterface || gfPreBattleInterfaceActive )
|
if( fLockOutMapScreenInterface || IsPreBattleInterfaceActive() )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -12062,7 +12060,7 @@ void TeamListContractRegionBtnCallBack(MOUSE_REGION *pRegion, INT32 iReason )
|
|||||||
INT32 iValue = 0;
|
INT32 iValue = 0;
|
||||||
|
|
||||||
|
|
||||||
if( fLockOutMapScreenInterface || gfPreBattleInterfaceActive )
|
if( fLockOutMapScreenInterface || IsPreBattleInterfaceActive() )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -12126,7 +12124,7 @@ void TeamListContractRegionMvtCallBack(MOUSE_REGION *pRegion, INT32 iReason )
|
|||||||
INT32 iValue = -1;
|
INT32 iValue = -1;
|
||||||
|
|
||||||
|
|
||||||
if( fLockOutMapScreenInterface || gfPreBattleInterfaceActive )
|
if( fLockOutMapScreenInterface || IsPreBattleInterfaceActive() )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -13498,7 +13496,7 @@ void FaceRegionBtnCallback( MOUSE_REGION *pRegion, INT32 iReason )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( gfPreBattleInterfaceActive == TRUE )
|
if( IsPreBattleInterfaceActive() == TRUE )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -13736,7 +13734,7 @@ void UpdateStatusOfMapSortButtons( void )
|
|||||||
static BOOLEAN fShownLastTime = FALSE;
|
static BOOLEAN fShownLastTime = FALSE;
|
||||||
|
|
||||||
|
|
||||||
if( ( gfPreBattleInterfaceActive ) || fShowInventoryFlag )
|
if( ( IsPreBattleInterfaceActive() ) || fShowInventoryFlag )
|
||||||
{
|
{
|
||||||
if ( fShownLastTime )
|
if ( fShownLastTime )
|
||||||
{
|
{
|
||||||
@@ -13752,7 +13750,7 @@ void UpdateStatusOfMapSortButtons( void )
|
|||||||
HideButton( giMapMPButton[ iCounter ] );
|
HideButton( giMapMPButton[ iCounter ] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( gfPreBattleInterfaceActive )
|
if ( IsPreBattleInterfaceActive() )
|
||||||
{
|
{
|
||||||
HideButton( giCharInfoButton[ 0 ] );
|
HideButton( giCharInfoButton[ 0 ] );
|
||||||
HideButton( giCharInfoButton[ 1 ] );
|
HideButton( giCharInfoButton[ 1 ] );
|
||||||
@@ -14112,7 +14110,7 @@ void MonitorMapUIMessage( void )
|
|||||||
|
|
||||||
void HandlePreBattleInterfaceWithInventoryPanelUp( void )
|
void HandlePreBattleInterfaceWithInventoryPanelUp( void )
|
||||||
{
|
{
|
||||||
if( ( gfPreBattleInterfaceActive == TRUE ) && ( fShowInventoryFlag == TRUE ) )
|
if( ( IsPreBattleInterfaceActive() == TRUE ) && ( fShowInventoryFlag == TRUE ) )
|
||||||
{
|
{
|
||||||
if( fShowDescriptionFlag == TRUE )
|
if( fShowDescriptionFlag == TRUE )
|
||||||
{
|
{
|
||||||
@@ -14334,7 +14332,7 @@ BOOLEAN CharacterIsInLoadedSectorAndWantsToMoveInventoryButIsNotAllowed( INT16 b
|
|||||||
|
|
||||||
void UpdateTheStateOfTheNextPrevMapScreenCharacterButtons( void )
|
void UpdateTheStateOfTheNextPrevMapScreenCharacterButtons( void )
|
||||||
{
|
{
|
||||||
if( gfPreBattleInterfaceActive )
|
if( IsPreBattleInterfaceActive() )
|
||||||
{
|
{
|
||||||
if( IsMapScreenHelpTextUp() )
|
if( IsMapScreenHelpTextUp() )
|
||||||
{
|
{
|
||||||
@@ -15169,7 +15167,7 @@ BOOLEAN CanToggleSelectedCharInventory( void )
|
|||||||
SOLDIERTYPE *pSoldier = NULL;
|
SOLDIERTYPE *pSoldier = NULL;
|
||||||
|
|
||||||
|
|
||||||
if( gfPreBattleInterfaceActive == TRUE )
|
if( IsPreBattleInterfaceActive() == TRUE )
|
||||||
{
|
{
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
@@ -15293,7 +15291,7 @@ void ChangeSelectedMapSector( INT16 sMapX, INT16 sMapY, INT8 bMapZ )
|
|||||||
if( fShowMapInventoryPool )
|
if( fShowMapInventoryPool )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( gfPreBattleInterfaceActive )
|
if ( IsPreBattleInterfaceActive() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( !IsTheCursorAllowedToHighLightThisSector( sMapX, sMapY ) )
|
if( !IsTheCursorAllowedToHighLightThisSector( sMapX, sMapY ) )
|
||||||
@@ -17196,7 +17194,7 @@ void RequestContractMenu( void )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( gfPreBattleInterfaceActive == TRUE )
|
if( IsPreBattleInterfaceActive() == TRUE )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -17253,7 +17251,7 @@ void ChangeCharacterListSortMethod( INT32 iValue )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( gfPreBattleInterfaceActive == TRUE )
|
if( IsPreBattleInterfaceActive() == TRUE )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -178,8 +178,6 @@ INT8 gbRegToElitePromotions = 0;
|
|||||||
INT8 gbMilitiaPromotions = 0;
|
INT8 gbMilitiaPromotions = 0;
|
||||||
|
|
||||||
|
|
||||||
extern BOOLEAN gfUsePersistantPBI;
|
|
||||||
|
|
||||||
BOOLEAN gfUseAlternateMap = FALSE;
|
BOOLEAN gfUseAlternateMap = FALSE;
|
||||||
// whether or not we have found Orta yet
|
// whether or not we have found Orta yet
|
||||||
BOOLEAN fFoundOrta = FALSE;
|
BOOLEAN fFoundOrta = FALSE;
|
||||||
@@ -6527,7 +6525,7 @@ BOOLEAN HandlePotentialBringUpAutoresolveToFinishBattle( int pSectorX, int pSect
|
|||||||
gfEnteringMapScreen = TRUE;
|
gfEnteringMapScreen = TRUE;
|
||||||
gfEnteringMapScreenToEnterPreBattleInterface = TRUE;
|
gfEnteringMapScreenToEnterPreBattleInterface = TRUE;
|
||||||
gfAutomaticallyStartAutoResolve = TRUE;
|
gfAutomaticallyStartAutoResolve = TRUE;
|
||||||
gfUsePersistantPBI = FALSE;
|
SetPersistantPBI( FALSE );
|
||||||
gubPBSectorX = (UINT8)pSectorX;
|
gubPBSectorX = (UINT8)pSectorX;
|
||||||
gubPBSectorY = (UINT8)pSectorY;
|
gubPBSectorY = (UINT8)pSectorY;
|
||||||
gubPBSectorZ = (UINT8)pSectorZ;
|
gubPBSectorZ = (UINT8)pSectorZ;
|
||||||
|
|||||||
@@ -239,7 +239,7 @@ BOOLEAN BeginAirRaid( )
|
|||||||
|
|
||||||
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,"BeginAirRaid: in pre-battle interface?");
|
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,"BeginAirRaid: in pre-battle interface?");
|
||||||
// ( unless we are in prebattle interface, then ignore... )
|
// ( unless we are in prebattle interface, then ignore... )
|
||||||
if ( gfPreBattleInterfaceActive )
|
if ( IsPreBattleInterfaceActive() )
|
||||||
{
|
{
|
||||||
return( FALSE );
|
return( FALSE );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user