|
@@ -498,25 +498,25 @@ static int DrawRailWagonPurchaseInfo(int
|
|
|
SetDParam(0, (GetEngineProperty(engine_number, 0x17, rvi->base_cost) * _price.build_railwagon) >> 8);
|
|
|
DrawString(x, y, STR_PURCHASE_INFO_COST, TC_FROMSTRING);
|
|
|
y += 10;
|
|
|
|
|
|
/* Wagon weight - (including cargo) */
|
|
|
uint weight = GetEngineProperty(engine_number, 0x16, rvi->weight);
|
|
|
SetDParam(0, weight);
|
|
|
SetDParam(1, (GetCargo(rvi->cargo_type)->weight * GetEngineProperty(engine_number, 0x14, rvi->capacity) >> 4) + weight);
|
|
|
DrawString(x, y, STR_PURCHASE_INFO_WEIGHT_CWEIGHT, TC_FROMSTRING);
|
|
|
y += 10;
|
|
|
|
|
|
/* Wagon speed limit, displayed if above zero */
|
|
|
if (_settings.vehicle.wagon_speed_limits) {
|
|
|
if (_settings_game.vehicle.wagon_speed_limits) {
|
|
|
uint max_speed = GetEngineProperty(engine_number, 0x09, rvi->max_speed);
|
|
|
if (max_speed > 0) {
|
|
|
SetDParam(0, max_speed * 10 / 16);
|
|
|
DrawString(x, y, STR_PURCHASE_INFO_SPEED, TC_FROMSTRING);
|
|
|
y += 10;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/* Running cost */
|
|
|
if (rvi->running_cost_class != 0xFF) {
|
|
|
SetDParam(0, GetEngineProperty(engine_number, 0x0D, rvi->running_cost) * GetPriceByIndex(rvi->running_cost_class) >> 8);
|
|
|
DrawString(x, y, STR_PURCHASE_INFO_RUNNINGCOST, TC_FROMSTRING);
|
|
@@ -536,25 +536,25 @@ static int DrawRailEnginePurchaseInfo(in
|
|
|
SetDParam(0, GetEngineProperty(engine_number, 0x17, rvi->base_cost) * (_price.build_railvehicle >> 3) >> 5);
|
|
|
SetDParam(1, weight << multihead);
|
|
|
DrawString(x, y, STR_PURCHASE_INFO_COST_WEIGHT, TC_FROMSTRING);
|
|
|
y += 10;
|
|
|
|
|
|
/* Max speed - Engine power */
|
|
|
SetDParam(0, GetEngineProperty(engine_number, 0x09, rvi->max_speed) * 10 / 16);
|
|
|
SetDParam(1, GetEngineProperty(engine_number, 0x0B, rvi->power));
|
|
|
DrawString(x, y, STR_PURCHASE_INFO_SPEED_POWER, TC_FROMSTRING);
|
|
|
y += 10;
|
|
|
|
|
|
/* Max tractive effort - not applicable if old acceleration or maglev */
|
|
|
if (_settings.vehicle.realistic_acceleration && rvi->railtype != RAILTYPE_MAGLEV) {
|
|
|
if (_settings_game.vehicle.realistic_acceleration && rvi->railtype != RAILTYPE_MAGLEV) {
|
|
|
SetDParam(0, ((weight << multihead) * 10 * GetEngineProperty(engine_number, 0x1F, rvi->tractive_effort)) / 256);
|
|
|
DrawString(x, y, STR_PURCHASE_INFO_MAX_TE, TC_FROMSTRING);
|
|
|
y += 10;
|
|
|
}
|
|
|
|
|
|
/* Running cost */
|
|
|
if (rvi->running_cost_class != 0xFF) {
|
|
|
SetDParam(0, GetEngineProperty(engine_number, 0x0D, rvi->running_cost) * GetPriceByIndex(rvi->running_cost_class) >> 8);
|
|
|
DrawString(x, y, STR_PURCHASE_INFO_RUNNINGCOST, TC_FROMSTRING);
|
|
|
y += 10;
|
|
|
}
|
|
|
|