@ -319,7 +319,7 @@ struct CompanyFinancesWindow : Window {
case WID_CF_BALANCE_VALUE :
case WID_CF_LOAN_VALUE :
case WID_CF_TOTAL_VALUE :
SetDParam ( 0 , CompanyFinancesWindow : : max_money ) ;
SetDParam MaxValue ( 0 , CompanyFinancesWindow : : max_money ) ;
size - > width = max ( GetStringBoundingBox ( STR_FINANCES_NEGATIVE_INCOME ) . width , GetStringBoundingBox ( STR_FINANCES_POSITIVE_INCOME ) . width ) + padding . width ;
break ;
@ -1691,12 +1691,12 @@ struct CompanyInfrastructureWindow : Window
max_val = max ( max_val , c - > infrastructure . airport ) ;
max_cost = max ( max_cost , AirportMaintenanceCost ( c - > index ) ) ;
SetDParam ( 0 , max_val ) ;
SetDParam ( 1 , max_cost * 12 ) ; // Convert to per year
SetDParam MaxValue ( 0 , max_val ) ;
SetDParam MaxValue ( 1 , max_cost * 12 ) ; // Convert to per year
size - > width = max ( size - > width , GetStringBoundingBox ( _settings_game . economy . infrastructure_maintenance ? STR_COMPANY_INFRASTRUCTURE_VIEW_COST : STR_WHITE_COMMA ) . width + 20 ) ; // Reserve some wiggle room.
if ( _settings_game . economy . infrastructure_maintenance ) {
SetDParam ( 0 , this - > GetTotalMaintenanceCost ( ) * 12 ) ; // Convert to per year
SetDParam MaxValue ( 0 , this - > GetTotalMaintenanceCost ( ) * 12 ) ; // Convert to per year
this - > total_width = GetStringBoundingBox ( STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL ) . width + 20 ;
size - > width = max ( size - > width , this - > total_width ) ;
}
@ -2095,14 +2095,14 @@ struct CompanyWindow : Window
break ;
case WID_C_DESC_VEHICLE_COUNTS :
SetDParam ( 0 , 5000 ) ; // Maximum number of vehicles
SetDParam MaxValue ( 0 , 5000 ) ; // Maximum number of vehicles
for ( uint i = 0 ; i < lengthof ( _company_view_vehicle_count_strings ) ; i + + ) {
size - > width = max ( size - > width , GetStringBoundingBox ( _company_view_vehicle_count_strings [ i ] ) . width ) ;
}
break ;
case WID_C_DESC_INFRASTRUCTURE_COUNTS :
SetDParam ( 0 , UINT_MAX ) ;
SetDParam MaxValue ( 0 , UINT_MAX ) ;
size - > width = max ( size - > width , GetStringBoundingBox ( STR_COMPANY_VIEW_INFRASTRUCTURE_RAIL ) . width ) ;
size - > width = max ( size - > width , GetStringBoundingBox ( STR_COMPANY_VIEW_INFRASTRUCTURE_ROAD ) . width ) ;
size - > width = max ( size - > width , GetStringBoundingBox ( STR_COMPANY_VIEW_INFRASTRUCTURE_WATER ) . width ) ;
@ -2115,7 +2115,7 @@ struct CompanyWindow : Window
const Company * c2 ;
FOR_ALL_COMPANIES ( c2 ) {
SetDParam ( 0 , 2 5) ;
SetDParam MaxValue( 0 , 7 5) ;
SetDParam ( 1 , c2 - > index ) ;
size - > width = max ( size - > width , GetStringBoundingBox ( STR_COMPANY_VIEW_SHARES_OWNED_BY ) . width ) ;