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 /roadveh_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 'roadveh_gui.c')
-rw-r--r-- | roadveh_gui.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/roadveh_gui.c b/roadveh_gui.c index 0d5344495..a5c4876c2 100644 --- a/roadveh_gui.c +++ b/roadveh_gui.c @@ -34,7 +34,7 @@ void DrawRoadVehPurchaseInfo(int x, int y, EngineID engine_number) /* Purchase cost - Max speed */ SetDParam(0, rvi->base_cost * (_price.roadveh_base>>3)>>5); - SetDParam(1, rvi->max_speed * 10 >> 5); + SetDParam(1, rvi->max_speed / 2); DrawString(x, y, STR_PURCHASE_INFO_COST_SPEED, 0); y += 10; @@ -101,7 +101,7 @@ static void RoadVehDetailsWndProc(Window *w, WindowEvent *e) /* Draw max speed */ { - SetDParam(0, v->max_speed * 10 >> 5); + SetDParam(0, v->max_speed / 2); DrawString(2, 25, STR_900E_MAX_SPEED, 0); } @@ -251,14 +251,14 @@ static void RoadVehViewWndProc(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_ROAD_DEPOT + _patches.vehicle_speed; } break; @@ -270,7 +270,7 @@ static void RoadVehViewWndProc(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; |