forked from mirror/OpenTTD
(svn r4322) - Codechange: Remove conversion of kmh to mph from gui code to within the units conversion system, in string.c. This means displaying kmh requires no conversion, instead of being convert from kmh to mph, and then back to kmh again.
This commit is contained in:
@@ -129,7 +129,7 @@ static void DrawTrainEngineInfo(EngineID engine, int x, int y, int maxw)
|
||||
uint multihead = (rvi->flags & RVI_MULTIHEAD) ? 1 : 0;
|
||||
|
||||
SetDParam(0, (_price.build_railvehicle >> 3) * rvi->base_cost >> 5);
|
||||
SetDParam(2, rvi->max_speed * 10 >> 4);
|
||||
SetDParam(2, rvi->max_speed);
|
||||
SetDParam(3, rvi->power << multihead);
|
||||
SetDParam(1, rvi->weight << multihead);
|
||||
|
||||
@@ -177,7 +177,7 @@ static void DrawAircraftEngineInfo(EngineID engine, int x, int y, int maxw)
|
||||
{
|
||||
const AircraftVehicleInfo *avi = AircraftVehInfo(engine);
|
||||
SetDParam(0, (_price.aircraft_base >> 3) * avi->base_cost >> 5);
|
||||
SetDParam(1, avi->max_speed << 3);
|
||||
SetDParam(1, avi->max_speed * 128 / 10);
|
||||
SetDParam(2, avi->passenger_capacity);
|
||||
SetDParam(3, avi->mail_capacity);
|
||||
SetDParam(4, avi->running_cost * _price.aircraft_running >> 8);
|
||||
@@ -217,7 +217,7 @@ static void DrawRoadVehEngineInfo(EngineID engine, int x, int y, int maxw)
|
||||
const RoadVehicleInfo *rvi = RoadVehInfo(engine);
|
||||
|
||||
SetDParam(0, (_price.roadveh_base >> 3) * rvi->base_cost >> 5);
|
||||
SetDParam(1, rvi->max_speed * 10 >> 5);
|
||||
SetDParam(1, rvi->max_speed / 2);
|
||||
SetDParam(2, rvi->running_cost * _price.roadveh_running >> 8);
|
||||
|
||||
SetDParam(4, rvi->capacity);
|
||||
@@ -256,7 +256,7 @@ static void DrawShipEngineInfo(EngineID engine, int x, int y, int maxw)
|
||||
{
|
||||
const ShipVehicleInfo *svi = ShipVehInfo(engine);
|
||||
SetDParam(0, svi->base_cost * (_price.ship_base >> 3) >> 5);
|
||||
SetDParam(1, svi->max_speed * 10 >> 5);
|
||||
SetDParam(1, svi->max_speed / 2);
|
||||
SetDParam(2, _cargoc.names_long[svi->cargo_type]);
|
||||
SetDParam(3, svi->capacity);
|
||||
SetDParam(4, svi->running_cost * _price.ship_running >> 8);
|
||||
|
Reference in New Issue
Block a user