diff options
author | peter1138 <peter1138@openttd.org> | 2006-04-08 12:04:23 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2006-04-08 12:04:23 +0000 |
commit | ffadd91ca9fc5de831eb68a4303852790efa6d41 (patch) | |
tree | ae74d349c3ffaa93a6e05ea9dabd121e4daf8e43 /ship_gui.c | |
parent | 5be2aa3e9953c0904852c29e3fe88fb2a753b025 (diff) | |
download | openttd-ffadd91ca9fc5de831eb68a4303852790efa6d41.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 'ship_gui.c')
-rw-r--r-- | ship_gui.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ship_gui.c b/ship_gui.c index d4b0c9dee..c724493e2 100644 --- a/ship_gui.c +++ b/ship_gui.c @@ -33,7 +33,7 @@ void DrawShipPurchaseInfo(int x, int y, EngineID engine_number) /* Purchase cost - Max speed */ SetDParam(0, svi->base_cost * (_price.ship_base>>3)>>5); - SetDParam(1, svi->max_speed * 10 >> 5); + SetDParam(1, svi->max_speed / 2); DrawString(x,y, STR_PURCHASE_INFO_COST_SPEED, 0); y += 10; @@ -179,7 +179,7 @@ static void ShipDetailsWndProc(Window *w, WindowEvent *e) /* Draw max speed */ { - SetDParam(0, v->max_speed * 10 >> 5); + SetDParam(0, v->max_speed / 2); DrawString(2, 25, STR_9813_MAX_SPEED, 0); } @@ -489,14 +489,14 @@ static void ShipViewWndProc(Window *w, WindowEvent *e) { switch (v->current_order.type) { case OT_GOTO_STATION: { SetDParam(0, v->current_order.station); - SetDParam(1, v->cur_speed * 10 >> 5); + SetDParam(1, v->cur_speed / 2); str = STR_HEADING_FOR_STATION + _patches.vehicle_speed; } break; case OT_GOTO_DEPOT: { Depot *depot = GetDepot(v->current_order.station); SetDParam(0, depot->town_index); - SetDParam(1, v->cur_speed * 10 >> 5); + SetDParam(1, v->cur_speed / 2); str = STR_HEADING_FOR_SHIP_DEPOT + _patches.vehicle_speed; } break; @@ -508,7 +508,7 @@ static void ShipViewWndProc(Window *w, WindowEvent *e) { default: if (v->num_orders == 0) { str = STR_NO_ORDERS + _patches.vehicle_speed; - SetDParam(0, v->cur_speed * 10 >> 5); + SetDParam(0, v->cur_speed / 2); } else str = STR_EMPTY; break; |