minor code cleanup (by sun_alf)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8813 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2020-05-30 13:34:57 +00:00
parent 51e2c6b293
commit e932393eae
6 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -375,7 +375,7 @@ void ASDDecideHeliOperations()
// build a list of all possible locations that require us to drop troops in
for ( UINT8 sX = 1; sX < MAP_WORLD_X - 1; ++sX )
{
for ( UINT8 sY = 1; sY < MAP_WORLD_X - 1; ++sY )
for ( UINT8 sY = 1; sY < MAP_WORLD_Y - 1; ++sY )
{
// not if the enemy controls this sector
if ( StrategicMap[CALCULATE_STRATEGIC_INDEX( sX, sY )].fEnemyControlled )
+5 -5
View File
@@ -2904,7 +2904,7 @@ void UpdateAssignments()
// run through sectors and handle each type in sector
for(sX = 0 ; sX < MAP_WORLD_X; ++sX )
{
for( sY =0; sY < MAP_WORLD_X; ++sY )
for( sY =0; sY < MAP_WORLD_Y; ++sY )
{
for( bZ = 0; bZ < 4; ++bZ )
{
@@ -6203,7 +6203,7 @@ void HandleRadioScanInSector( INT16 sMapX, INT16 sMapY, INT8 bZ )
// run through sectors and handle each type in sector
for(INT16 sX = 1; sX < MAP_WORLD_X - 1; ++sX )
{
for(INT16 sY = 1; sY < MAP_WORLD_X - 1; ++sY )
for(INT16 sY = 1; sY < MAP_WORLD_Y - 1; ++sY )
{
// is this sector within range?
FLOAT euklid_dist = (sX - sMapX)*(sX - sMapX) + (sY - sMapY)*(sY - sMapY);
@@ -6259,7 +6259,7 @@ void ClearSectorScanResults()
{
for(INT16 sX = 1; sX < MAP_WORLD_X - 1; ++sX )
{
for(INT16 sY = 1; sY < MAP_WORLD_X - 1; ++sY )
for(INT16 sY = 1; sY < MAP_WORLD_Y - 1; ++sY )
{
SectorInfo[ SECTOR( sX, sY ) ].uiFlags &= ~(SF_ASSIGN_NOTICED_ENEMIES_HERE|SF_ASSIGN_NOTICED_ENEMIES_KNOW_NUMBER);
}
@@ -6377,7 +6377,7 @@ void HandleStrategicDiseaseAndBurial()
// turn corpses into disease once they are old enough
for ( INT16 sX = 1; sX < MAP_WORLD_X - 1; ++sX )
{
for ( INT16 sY = 1; sY < MAP_WORLD_X - 1; ++sY )
for ( INT16 sY = 1; sY < MAP_WORLD_Y - 1; ++sY )
{
SECTORINFO *pSectorInfo = &( SectorInfo[SECTOR( sX, sY )] );
@@ -7039,7 +7039,7 @@ void HandleGatheringInformationBySoldier( SOLDIERTYPE* pSoldier )
// run through sectors and handle each type in sector
for(INT16 sX = 1; sX < MAP_WORLD_X - 1; ++sX )
{
for(INT16 sY = 1; sY < MAP_WORLD_X - 1; ++sY )
for(INT16 sY = 1; sY < MAP_WORLD_Y - 1; ++sY )
{
if( SectorInfo[ SECTOR( sX, sY ) ].uiFlags & ( SF_ASSIGN_NOTICED_ENEMIES_HERE | SF_ASSIGN_NOTICED_ENEMIES_KNOW_NUMBER ) )
{
+1 -1
View File
@@ -831,7 +831,7 @@ void HandleEarlyMorningEvents( void )
// Flugente: no reason to put this into LUA
for ( UINT8 sX = 1; sX < MAP_WORLD_X - 1; ++sX )
{
for ( UINT8 sY = 1; sY < MAP_WORLD_X - 1; ++sY )
for ( UINT8 sY = 1; sY < MAP_WORLD_Y - 1; ++sY )
{
UINT8 sector = SECTOR( sX, sY );
+2 -2
View File
@@ -1894,7 +1894,7 @@ UINT16 GetTownWorkers(INT8 bTownId, UINT16& arusMax)
for ( UINT8 sX = 1; sX < MAP_WORLD_X - 1; ++sX )
{
for ( UINT8 sY = 1; sY < MAP_WORLD_X - 1; ++sY )
for ( UINT8 sY = 1; sY < MAP_WORLD_Y - 1; ++sY )
{
UINT16 strategicsector = CALCULATE_STRATEGIC_INDEX( sX, sY );
@@ -1924,7 +1924,7 @@ void AddTownWorkers( INT8 bTownId, INT16 asAdd )
{
for ( UINT8 sX = 1; sX < MAP_WORLD_X - 1; ++sX )
{
for ( UINT8 sY = 1; sY < MAP_WORLD_X - 1; ++sY )
for ( UINT8 sY = 1; sY < MAP_WORLD_Y - 1; ++sY )
{
UINT16 strategicsector = CALCULATE_STRATEGIC_INDEX( sX, sY );
+1 -1
View File
@@ -339,7 +339,7 @@ FLOAT GetWorkforceEffectivenessWithDisease( INT8 bTownId, UINT8 usTeam )
for ( UINT8 sX = 1; sX < MAP_WORLD_X - 1; ++sX )
{
for ( UINT8 sY = 1; sY < MAP_WORLD_X - 1; ++sY )
for ( UINT8 sY = 1; sY < MAP_WORLD_Y - 1; ++sY )
{
UINT16 strategicsector = CALCULATE_STRATEGIC_INDEX( sX, sY );
+1 -1
View File
@@ -6829,7 +6829,7 @@ BOOLEAN GetPlayerControlledPrisonList( std::vector<UINT8>& arSectorIDVector )
for(INT16 sX = 1; sX < MAP_WORLD_X - 1; ++sX )
{
for(INT16 sY = 1; sY < MAP_WORLD_X - 1; ++sY )
for(INT16 sY = 1; sY < MAP_WORLD_Y - 1; ++sY )
{
// if sector is controlled by enemies, it's not ours (duh!)
if ( StrategicMap[sX + sY * MAP_WORLD_X].fEnemyControlled )