mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00: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
@@ -1250,7 +1250,7 @@ void JumpToLevel( INT32 iLevel )
|
||||
return;
|
||||
}
|
||||
|
||||
if( gfPreBattleInterfaceActive == TRUE )
|
||||
if( IsPreBattleInterfaceActive() == TRUE )
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -2164,7 +2164,7 @@ void UpdateMapScreenAssignmentPositions( void )
|
||||
|
||||
if( bSelectedAssignChar == -1 )
|
||||
{
|
||||
if( gfPreBattleInterfaceActive == FALSE )
|
||||
if( IsPreBattleInterfaceActive() == FALSE )
|
||||
{
|
||||
giBoxY = 0;
|
||||
}
|
||||
@@ -2173,14 +2173,14 @@ void UpdateMapScreenAssignmentPositions( void )
|
||||
|
||||
if( gCharactersList[ bSelectedAssignChar ].fValid == FALSE )
|
||||
{
|
||||
if( gfPreBattleInterfaceActive == FALSE )
|
||||
if( IsPreBattleInterfaceActive() == FALSE )
|
||||
{
|
||||
giBoxY = 0;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if( gfPreBattleInterfaceActive )
|
||||
if( IsPreBattleInterfaceActive() )
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
@@ -2325,7 +2325,7 @@ void UpdateMapScreenMilitiaControlPositions( void )
|
||||
|
||||
if( bSelectedAssignChar == -1 )
|
||||
{
|
||||
if( gfPreBattleInterfaceActive == FALSE )
|
||||
if( IsPreBattleInterfaceActive() == FALSE )
|
||||
{
|
||||
giBoxY = 0;
|
||||
}
|
||||
@@ -2334,14 +2334,14 @@ void UpdateMapScreenMilitiaControlPositions( void )
|
||||
|
||||
if( gCharactersList[ bSelectedAssignChar ].fValid == FALSE )
|
||||
{
|
||||
if( gfPreBattleInterfaceActive == FALSE )
|
||||
if( IsPreBattleInterfaceActive() == FALSE )
|
||||
{
|
||||
giBoxY = 0;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if( gfPreBattleInterfaceActive )
|
||||
if( IsPreBattleInterfaceActive() )
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user