summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-01-30 21:10:04 +0000
committerpeter1138 <peter1138@openttd.org>2007-01-30 21:10:04 +0000
commit8933ffd9acf617cbb30ef3f1abcac166d3f4f97b (patch)
treeef47070cdf31f3435f0b446ef917dbd3af38cc27 /src
parent6e85681ae05137994b245426a31e0e184cf91a7e (diff)
downloadopenttd-8933ffd9acf617cbb30ef3f1abcac166d3f4f97b.tar.xz
(svn r8464) -Revert (r4322): Change back to converting to mph in the GUI code, as 1 mph == 1.6 km/h is too far out for some people.
Diffstat (limited to 'src')
-rw-r--r--src/aircraft_gui.cpp6
-rw-r--r--src/build_vehicle_gui.cpp10
-rw-r--r--src/roadveh_gui.cpp6
-rw-r--r--src/ship_gui.cpp6
-rw-r--r--src/strings.cpp6
-rw-r--r--src/train_gui.cpp12
6 files changed, 23 insertions, 23 deletions
diff --git a/src/aircraft_gui.cpp b/src/aircraft_gui.cpp
index ef641ca7c..5a3572de2 100644
--- a/src/aircraft_gui.cpp
+++ b/src/aircraft_gui.cpp
@@ -261,14 +261,14 @@ static void AircraftViewWndProc(Window *w, WindowEvent *e)
switch (v->current_order.type) {
case OT_GOTO_STATION: {
SetDParam(0, v->current_order.dest);
- SetDParam(1, v->cur_speed * 128 / 10);
+ SetDParam(1, v->cur_speed * 8);
str = STR_HEADING_FOR_STATION + _patches.vehicle_speed;
} break;
case OT_GOTO_DEPOT: {
/* Aircrafts always go to a station, even if you say depot */
SetDParam(0, v->current_order.dest);
- SetDParam(1, v->cur_speed * 128 / 10);
+ SetDParam(1, v->cur_speed * 8);
if (HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT) && !HASBIT(v->current_order.flags, OFB_PART_OF_ORDERS)) {
str = STR_HEADING_FOR_HANGAR + _patches.vehicle_speed;
} else {
@@ -283,7 +283,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 * 128 / 10);
+ SetDParam(0, v->cur_speed * 8);
} else {
str = STR_EMPTY;
}
diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp
index 5c077a6ad..b43327f15 100644
--- a/src/build_vehicle_gui.cpp
+++ b/src/build_vehicle_gui.cpp
@@ -378,7 +378,7 @@ static int DrawRailWagonPurchaseInfo(int x, int y, EngineID engine_number, const
/* Wagon speed limit, displayed if above zero */
if (rvi->max_speed > 0 && _patches.wagon_speed_limits) {
- SetDParam(0, rvi->max_speed);
+ SetDParam(0, rvi->max_speed * 10 / 16);
DrawString(x,y, STR_PURCHASE_INFO_SPEED, 0);
y += 10;
}
@@ -397,7 +397,7 @@ static int DrawRailEnginePurchaseInfo(int x, int y, EngineID engine_number, cons
y += 10;
/* Max speed - Engine power */
- SetDParam(0, rvi->max_speed);
+ SetDParam(0, rvi->max_speed * 10 / 16);
SetDParam(1, rvi->power << multihead);
DrawString(x,y, STR_PURCHASE_INFO_SPEED_POWER, 0);
y += 10;
@@ -432,7 +432,7 @@ static int DrawRoadVehPurchaseInfo(int x, int y, EngineID engine_number, const R
/* Purchase cost - Max speed */
SetDParam(0, rvi->base_cost * (_price.roadveh_base>>3)>>5);
- SetDParam(1, rvi->max_speed / 2);
+ SetDParam(1, rvi->max_speed * 10 / 32);
DrawString(x, y, STR_PURCHASE_INFO_COST_SPEED, 0);
y += 10;
@@ -456,7 +456,7 @@ static int DrawShipPurchaseInfo(int x, int y, EngineID engine_number, const Ship
{
/* Purchase cost - Max speed */
SetDParam(0, svi->base_cost * (_price.ship_base>>3)>>5);
- SetDParam(1, svi->max_speed / 2);
+ SetDParam(1, svi->max_speed * 10 / 32);
DrawString(x,y, STR_PURCHASE_INFO_COST_SPEED, 0);
y += 10;
@@ -482,7 +482,7 @@ static int DrawAircraftPurchaseInfo(int x, int y, EngineID engine_number, const
/* Purchase cost - Max speed */
SetDParam(0, avi->base_cost * (_price.aircraft_base>>3)>>5);
- SetDParam(1, avi->max_speed * 128 / 10);
+ SetDParam(1, avi->max_speed * 8);
DrawString(x, y, STR_PURCHASE_INFO_COST_SPEED, 0);
y += 10;
diff --git a/src/roadveh_gui.cpp b/src/roadveh_gui.cpp
index c4308cd54..e9e06d524 100644
--- a/src/roadveh_gui.cpp
+++ b/src/roadveh_gui.cpp
@@ -206,14 +206,14 @@ static void RoadVehViewWndProc(Window *w, WindowEvent *e)
switch (v->current_order.type) {
case OT_GOTO_STATION: {
SetDParam(0, v->current_order.dest);
- SetDParam(1, v->cur_speed / 2);
+ SetDParam(1, v->cur_speed * 10 / 32);
str = STR_HEADING_FOR_STATION + _patches.vehicle_speed;
} break;
case OT_GOTO_DEPOT: {
Depot *depot = GetDepot(v->current_order.dest);
SetDParam(0, depot->town_index);
- SetDParam(1, v->cur_speed / 2);
+ SetDParam(1, v->cur_speed * 10 / 32);
if (HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT) && !HASBIT(v->current_order.flags, OFB_PART_OF_ORDERS)) {
str = STR_HEADING_FOR_ROAD_DEPOT + _patches.vehicle_speed;
} else {
@@ -229,7 +229,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 / 2);
+ SetDParam(0, v->cur_speed * 10 / 32);
} else {
str = STR_EMPTY;
}
diff --git a/src/ship_gui.cpp b/src/ship_gui.cpp
index 2bd300eff..4176e9655 100644
--- a/src/ship_gui.cpp
+++ b/src/ship_gui.cpp
@@ -213,14 +213,14 @@ static void ShipViewWndProc(Window *w, WindowEvent *e)
switch (v->current_order.type) {
case OT_GOTO_STATION: {
SetDParam(0, v->current_order.dest);
- SetDParam(1, v->cur_speed / 2);
+ SetDParam(1, v->cur_speed * 10 / 32);
str = STR_HEADING_FOR_STATION + _patches.vehicle_speed;
} break;
case OT_GOTO_DEPOT: {
Depot *depot = GetDepot(v->current_order.dest);
SetDParam(0, depot->town_index);
- SetDParam(1, v->cur_speed / 2);
+ SetDParam(1, v->cur_speed * 10 / 32);
if (HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT) && !HASBIT(v->current_order.flags, OFB_PART_OF_ORDERS)) {
str = STR_HEADING_FOR_SHIP_DEPOT + _patches.vehicle_speed;
} else {
@@ -236,7 +236,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 / 2);
+ SetDParam(0, v->cur_speed * 10 / 32);
} else {
str = STR_EMPTY;
}
diff --git a/src/strings.cpp b/src/strings.cpp
index 7c317c09f..341cfa446 100644
--- a/src/strings.cpp
+++ b/src/strings.cpp
@@ -487,21 +487,21 @@ typedef struct Units {
/* Unit conversions */
static const Units units[] = {
{ // Imperial (Original, mph, hp, metric ton, litre, kN)
- 10, 4, STR_UNITS_VELOCITY_IMPERIAL,
+ 1, 0, STR_UNITS_VELOCITY_IMPERIAL,
1, 0, STR_UNITS_POWER_IMPERIAL,
1, 0, STR_UNITS_WEIGHT_SHORT_METRIC, STR_UNITS_WEIGHT_LONG_METRIC,
1000, 0, STR_UNITS_VOLUME_SHORT_METRIC, STR_UNITS_VOLUME_LONG_METRIC,
1, 0, STR_UNITS_FORCE_SI,
},
{ // Metric (km/h, hp, metric ton, litre, kN)
- 1, 0, STR_UNITS_VELOCITY_METRIC,
+ 103, 6, STR_UNITS_VELOCITY_METRIC,
1, 0, STR_UNITS_POWER_METRIC,
1, 0, STR_UNITS_WEIGHT_SHORT_METRIC, STR_UNITS_WEIGHT_LONG_METRIC,
1000, 0, STR_UNITS_VOLUME_SHORT_METRIC, STR_UNITS_VOLUME_LONG_METRIC,
1, 0, STR_UNITS_FORCE_SI,
},
{ // SI (m/s, kilowatt, kilogram, cubic metres, kilonewton)
- 284, 10, STR_UNITS_VELOCITY_SI,
+ 1831, 12, STR_UNITS_VELOCITY_SI,
764, 10, STR_UNITS_POWER_SI,
1000, 0, STR_UNITS_WEIGHT_SHORT_SI, STR_UNITS_WEIGHT_LONG_SI,
1, 0, STR_UNITS_VOLUME_SHORT_SI, STR_UNITS_VOLUME_LONG_SI,
diff --git a/src/train_gui.cpp b/src/train_gui.cpp
index e5ccddd8a..cff2edf20 100644
--- a/src/train_gui.cpp
+++ b/src/train_gui.cpp
@@ -183,7 +183,7 @@ static void TrainViewWndProc(Window *w, WindowEvent *e)
str = STR_8861_STOPPED;
}
} else {
- SetDParam(0, v->u.rail.last_speed);
+ SetDParam(0, v->u.rail.last_speed * 10 / 16);
str = STR_TRAIN_STOPPING + _patches.vehicle_speed;
}
} else {
@@ -191,7 +191,7 @@ static void TrainViewWndProc(Window *w, WindowEvent *e)
case OT_GOTO_STATION: {
str = STR_HEADING_FOR_STATION + _patches.vehicle_speed;
SetDParam(0, v->current_order.dest);
- SetDParam(1, v->u.rail.last_speed);
+ SetDParam(1, v->u.rail.last_speed * 10 / 16);
} break;
case OT_GOTO_DEPOT: {
@@ -202,7 +202,7 @@ static void TrainViewWndProc(Window *w, WindowEvent *e)
} else {
str = STR_HEADING_FOR_TRAIN_DEPOT_SERVICE + _patches.vehicle_speed;
}
- SetDParam(1, v->u.rail.last_speed);
+ SetDParam(1, v->u.rail.last_speed * 10 / 16);
} break;
case OT_LOADING:
@@ -213,14 +213,14 @@ static void TrainViewWndProc(Window *w, WindowEvent *e)
case OT_GOTO_WAYPOINT: {
SetDParam(0, v->current_order.dest);
str = STR_HEADING_FOR_WAYPOINT + _patches.vehicle_speed;
- SetDParam(1, v->u.rail.last_speed);
+ SetDParam(1, v->u.rail.last_speed * 10 / 16);
break;
}
default:
if (v->num_orders == 0) {
str = STR_NO_ORDERS + _patches.vehicle_speed;
- SetDParam(0, v->u.rail.last_speed);
+ SetDParam(0, v->u.rail.last_speed * 10 / 16);
} else {
str = STR_EMPTY;
}
@@ -425,7 +425,7 @@ static void DrawTrainDetailsWindow(Window *w)
SetDParam(3, GetTrainRunningCost(v) >> 8);
DrawString(x, 15, STR_885D_AGE_RUNNING_COST_YR, 0);
- SetDParam(2, v->u.rail.cached_max_speed);
+ SetDParam(2, v->u.rail.cached_max_speed * 10 / 16);
SetDParam(1, v->u.rail.cached_power);
SetDParam(0, v->u.rail.cached_weight);
SetDParam(3, v->u.rail.cached_max_te / 1000);