New feature: mines require workers for maximum income, these can be trained like militia.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8267 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2016-07-04 22:31:37 +00:00
parent ce6e63831d
commit 951da7812d
26 changed files with 460 additions and 9 deletions
+16
View File
@@ -4568,6 +4568,22 @@ void BlitMineText( INT16 sMapX, INT16 sMapY )
AdjustXForLeftMapEdge(wString, &sScreenX, MapMineLabelsFont);
mprintf( ( sScreenX - StringPixLengthArg( MapMineLabelsFont, wcslen(wString), wString ) / 2 ) , sScreenY + ubLineCnt * GetFontHeight( MapMineLabelsFont ), wString );
++ubLineCnt;
// Flugente: workforce
if ( gGameExternalOptions.fMineRequiresWorkers )
{
INT8 bTownId = gMineStatus[ ubMineIndex ].bAssociatedTown;
UINT16 maxworkforce = 0;
UINT16 workforce = GetTownWorkers( bTownId, maxworkforce);
if ( maxworkforce > 0 )
{
swprintf( wString, L"%d/%d workers", workforce, maxworkforce );
AdjustXForLeftMapEdge(wString, &sScreenX, MapMineLabelsFont);
mprintf( ( sScreenX - StringPixLength( wString, MapMineLabelsFont ) / 2 ) , sScreenY + ubLineCnt * GetFontHeight( MapMineLabelsFont ) , wString );
++ubLineCnt;
}
}
}
SetFontDestBuffer( FRAME_BUFFER, MAP_VIEW_START_X, MAP_VIEW_START_Y, MAP_VIEW_START_X+MAP_VIEW_WIDTH+MAP_GRID_X, MAP_VIEW_START_Y+MAP_VIEW_HEIGHT+7, FALSE );