mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user