summaryrefslogtreecommitdiff
path: root/aircraft_gui.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-04-08 12:04:23 +0000
committerpeter1138 <peter1138@openttd.org>2006-04-08 12:04:23 +0000
commit59ace676eb14b98a16688685d938c48569dbf236 (patch)
treeae74d349c3ffaa93a6e05ea9dabd121e4daf8e43 /aircraft_gui.c
parentf3563e5d6fbc8fcf2d0df03d0a5e2f5b0c8ed33a (diff)
downloadopenttd-59ace676eb14b98a16688685d938c48569dbf236.tar.xz
(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.
Diffstat (limited to 'aircraft_gui.c')
-rw-r--r--aircraft_gui.c10
1 files changed, 5 insertions, 5 deletions
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;
}