Number and type of prisoners in player-controlled prisons is now displayed in sector info box.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7185 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2014-05-02 23:06:54 +00:00
parent 3a7f7b263b
commit b571d62a8b
10 changed files with 29 additions and 13 deletions
@@ -28,6 +28,7 @@
#include "Tactical Save.h"
#include "GameSettings.h"
#include "debug.h"
#include "Overhead.h" // added by Flugente
#endif
#include "Strategic Mines.h"
@@ -170,9 +171,8 @@ void CreateDestroyTownInfoBox( void )
AddItemsInSectorToBox();
// set font type
SetBoxFont(ghTownMineBox, BLOCKFONT2);
SetBoxFont(ghTownMineBox, BLOCKFONT2);
// set highlight color
SetBoxHighLight(ghTownMineBox, FONT_WHITE);
@@ -228,7 +228,6 @@ void CreateDestroyTownInfoBox( void )
}
else if( ( fCreated == TRUE ) && ( fShowTownInfo == FALSE ) )
{
// get box size
GetBoxSize( ghTownMineBox, &pDimensions );
@@ -247,9 +246,6 @@ void CreateDestroyTownInfoBox( void )
fCreated = FALSE;
}
return;
}
@@ -289,7 +285,6 @@ void AddTextToTownBox( void )
UINT16 usTownSectorIndex;
INT16 sMineSector = 0;
// remember town id
ubTownId = GetTownIdForSector( bCurrentTownMineSectorX, bCurrentTownMineSectorY );
Assert((ubTownId >= FIRST_TOWN) && (ubTownId < NUM_TOWNS));
@@ -395,10 +390,10 @@ void AddTextToTownBox( void )
// town size
if( gfHiddenTown[ GetTownIdForSector( bCurrentTownMineSectorX, bCurrentTownMineSectorY ) ] )
{
swprintf( wString, L"%s:", pwTownInfoStrings[ 0 ] );
AddMonoString( &hStringHandle, wString );
swprintf( wString, L"%d", GetTownSectorSize( ubTownId ) );
AddSecondColumnMonoString( &hStringHandle, wString );
swprintf( wString, L"%s:", pwTownInfoStrings[ 0 ] );
AddMonoString( &hStringHandle, wString );
swprintf( wString, L"%d", GetTownSectorSize( ubTownId ) );
AddSecondColumnMonoString( &hStringHandle, wString );
}
// main facilities
@@ -432,9 +427,21 @@ void AddTextToTownBox( void )
if( sMineSector != -1 && gfHiddenTown[ GetTownIdForSector( bCurrentTownMineSectorX, bCurrentTownMineSectorY ) ] )
{
// Associated Mine: Sector
swprintf( wString, L"%s:", pwTownInfoStrings[ 4 ] );
swprintf( wString, L"%s:", pwTownInfoStrings[ 4 ] );
AddMonoString( &hStringHandle, wString );
GetShortSectorString( ( INT16 )( sMineSector % MAP_WORLD_X ), ( INT16 )( sMineSector / MAP_WORLD_X ), wString );
GetShortSectorString( ( INT16 )( sMineSector % MAP_WORLD_X ), ( INT16 )( sMineSector / MAP_WORLD_X ), wString );
AddSecondColumnMonoString( &hStringHandle, wString );
}
// Flugente: if this is a prison we control, display number of prisoners here
UINT8 prisoners[PRISONER_MAX] = { 0 };
UINT16 numprisoners = GetNumberOfPrisoners( &(SectorInfo[SECTOR( bCurrentTownMineSectorX, bCurrentTownMineSectorY )]), &prisoners[PRISONER_OFFICER], &prisoners[PRISONER_ELITE], &prisoners[PRISONER_REGULAR], &prisoners[PRISONER_ADMIN] );
if ( numprisoners )
{
// prisoners
swprintf( wString, L"%s:", pwTownInfoStrings[13] );
AddMonoString( &hStringHandle, wString );
swprintf( wString, L"%d/%d/%d/%d%", prisoners[PRISONER_ADMIN], prisoners[PRISONER_REGULAR], prisoners[PRISONER_ELITE], prisoners[PRISONER_OFFICER] );
AddSecondColumnMonoString( &hStringHandle, wString );
}
}
+1
View File
@@ -3528,6 +3528,7 @@ STR16 pwTownInfoStrings[] =
L"民兵训练度", // 10 // state of civilian training in town
L"民兵", // the state of the trained civilians in the town
L"巡逻民兵", // L"Mobile Training", // HEADROCK HAM 3.6: The stat of Mobile militia training in town
L"Prisoners", // Flugente: display number of prisoners // TODO.Translate
};
// Mine strings
+1
View File
@@ -3526,6 +3526,7 @@ STR16 pwTownInfoStrings[] =
L"Training Burgers", // 10 // state of civilian training in town
L"Militie", // the state of the trained civilians in the town
L"Mobile Training", // HEADROCK HAM 3.6: The stat of Mobile militia training in town // TODO.Translate
L"Prisoners", // Flugente: display number of prisoners // TODO.Translate
};
// Mine strings
+1
View File
@@ -3527,6 +3527,7 @@ STR16 pwTownInfoStrings[] =
L"Civilian Training", // 10 // state of civilian training in town
L"Militia", // the state of the trained civilians in the town
L"Mobile Training", // HEADROCK HAM 3.6: The stat of Mobile militia training in town
L"Prisoners", // Flugente: display number of prisoners
};
// Mine strings
+1
View File
@@ -3532,6 +3532,7 @@ STR16 pwTownInfoStrings[] =
L"Formation ", // 10 // state of civilian training in town
L"Milice ", // the state of the trained civilians in the town
L"Formation mobile ", // HEADROCK HAM 3.6: The stat of Mobile militia training in town
L"Prisoners", // Flugente: display number of prisoners // TODO.Translate
};
// Mine strings
+1
View File
@@ -3524,6 +3524,7 @@ STR16 pwTownInfoStrings[] =
L"Zivilistentraining", // 10 // state of civilian training in town
L"Miliz", // the state of the trained civilians in the town
L"Mobile M. Training", // HEADROCK HAM 3.6: The stat of Mobile militia training in town
L"Prisoners", // Flugente: display number of prisoners // TODO.Translate
};
// Mine strings
+1
View File
@@ -3521,6 +3521,7 @@ STR16 pwTownInfoStrings[] =
L"addestramento civili", // 10 // state of civilian training in town
L"Esercito", // the state of the trained civilians in the town
L"Mobile Training", // HEADROCK HAM 3.6: The stat of Mobile militia training in town // TODO.Translate
L"Prisoners", // Flugente: display number of prisoners // TODO.Translate
};
// Mine strings
+1
View File
@@ -3535,6 +3535,7 @@ STR16 pwTownInfoStrings[] =
L"Szkolenie cywili", // 10 // state of civilian training in town
L"Samoobrona", // the state of the trained civilians in the town
L"Mobile Training", // HEADROCK HAM 3.6: The stat of Mobile militia training in town // TODO.Translate
L"Prisoners", // Flugente: display number of prisoners // TODO.Translate
};
// Mine strings
+1
View File
@@ -3528,6 +3528,7 @@ STR16 pwTownInfoStrings[] =
L"Тренировка ополчения", // 10 // state of civilian training in town
L"Ополчение", // the state of the trained civilians in the town
L"Тренинг мобильных групп", // HEADROCK HAM 3.6: The stat of Mobile militia training in town //Mobile Training
L"Prisoners", // Flugente: display number of prisoners // TODO.Translate
};
// Mine strings
+1
View File
@@ -3531,6 +3531,7 @@ STR16 pwTownInfoStrings[] =
L"Civilian Training", // 10 // state of civilian training in town
L"Militia", // the state of the trained civilians in the town
L"Mobile Training", // HEADROCK HAM 3.6: The stat of Mobile militia training in town // TODO.Translate
L"Prisoners", // Flugente: display number of prisoners // TODO.Translate
};
// Mine strings