From 59ace676eb14b98a16688685d938c48569dbf236 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Sat, 8 Apr 2006 12:04:23 +0000 Subject: (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. --- aircraft_gui.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'aircraft_gui.c') diff --git a/aircraft_gui.c b/aircraft_gui.c index 60af41598..a2d11bdc3 100644 --- a/aircraft_gui.c +++ b/aircraft_gui.c @@ -36,7 +36,7 @@ void DrawAircraftPurchaseInfo(int x, int y, EngineID engine_number) /* Purchase cost - Max speed */ SetDParam(0, avi->base_cost * (_price.aircraft_base>>3)>>5); - SetDParam(1, avi->max_speed * 8); + SetDParam(1, avi->max_speed * 128 / 10); DrawString(x, y, STR_PURCHASE_INFO_COST_SPEED, 0); y += 10; @@ -333,7 +333,7 @@ static void AircraftDetailsWndProc(Window *w, WindowEvent *e) /* Draw max speed */ { - SetDParam(0, v->max_speed * 8); + SetDParam(0, v->max_speed * 128 / 10); DrawString(2, 25, STR_A00E_MAX_SPEED, 0); } @@ -520,13 +520,13 @@ static void AircraftViewWndProc(Window *w, WindowEvent *e) switch (v->current_order.type) { case OT_GOTO_STATION: { SetDParam(0, v->current_order.station); - SetDParam(1, v->cur_speed * 8); + SetDParam(1, v->cur_speed * 128 / 10); str = STR_HEADING_FOR_STATION + _patches.vehicle_speed; } break; case OT_GOTO_DEPOT: { SetDParam(0, v->current_order.station); - SetDParam(1, v->cur_speed * 8); + SetDParam(1, v->cur_speed * 128 / 10); str = STR_HEADING_FOR_HANGAR + _patches.vehicle_speed; } break; @@ -537,7 +537,7 @@ static void AircraftViewWndProc(Window *w, WindowEvent *e) default: if (v->num_orders == 0) { str = STR_NO_ORDERS + _patches.vehicle_speed; - SetDParam(0, v->cur_speed * 8); + SetDParam(0, v->cur_speed * 128 / 10); } else { str = STR_EMPTY; } -- cgit v1.2.3-54-g00ecf