summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-02-04 14:37:24 +0000
committerrubidium <rubidium@openttd.org>2011-02-04 14:37:24 +0000
commit2ad1279725c08c98db9eaaceb684709f59a6650f (patch)
tree53f916efc3dc42e7e1badddfdbd26c1f75c4365a /src
parent3057a26fd5e2cffe9afc6ed5034dcd2c61fb2c6e (diff)
downloadopenttd-2ad1279725c08c98db9eaaceb684709f59a6650f.tar.xz
(svn r21954) -Cleanup: remove setting to not show the vehicle speed in the vehicle view
Diffstat (limited to 'src')
-rw-r--r--src/aircraft_cmd.cpp4
-rw-r--r--src/ground_vehicle.hpp2
-rw-r--r--src/lang/english.txt10
-rw-r--r--src/settings_type.h1
-rw-r--r--src/ship_cmd.cpp4
-rw-r--r--src/table/settings.h1
-rw-r--r--src/vehicle_gui.cpp12
7 files changed, 9 insertions, 25 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index 58a46e4ad..6edc4fff7 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -605,9 +605,7 @@ static int UpdateAircraftSpeed(Aircraft *v, uint speed_limit = SPEED_LIMIT_NONE,
/* updates statusbar only if speed have changed to save CPU time */
if (spd != v->cur_speed) {
v->cur_speed = spd;
- if (_settings_client.gui.vehicle_speed) {
- SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH);
- }
+ SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH);
}
/* Adjust distance moved by plane speed setting */
diff --git a/src/ground_vehicle.hpp b/src/ground_vehicle.hpp
index c2bd97151..6d6932e0d 100644
--- a/src/ground_vehicle.hpp
+++ b/src/ground_vehicle.hpp
@@ -340,7 +340,7 @@ struct GroundVehicle : public SpecializedVehicle<T, Type> {
FORCEINLINE void SetLastSpeed()
{
if (this->cur_speed != this->gcache.last_speed) {
- if (_settings_client.gui.vehicle_speed || (this->gcache.last_speed == 0) != (this->cur_speed == 0)) {
+ if ((this->gcache.last_speed == 0) != (this->cur_speed == 0)) {
SetWindowWidgetDirty(WC_VEHICLE_VIEW, this->index, VVW_WIDGET_START_STOP_VEH);
}
this->gcache.last_speed = this->cur_speed;
diff --git a/src/lang/english.txt b/src/lang/english.txt
index 54952199a..e183afcce 100644
--- a/src/lang/english.txt
+++ b/src/lang/english.txt
@@ -1090,7 +1090,6 @@ STR_CONFIG_SETTING_CAPTION :{WHITE}Advanced
STR_CONFIG_SETTING_OFF :Off
STR_CONFIG_SETTING_ON :On
STR_CONFIG_SETTING_DISABLED :disabled
-STR_CONFIG_SETTING_VEHICLESPEED :{LTBLUE}Show vehicle speed in status bar: {ORANGE}{STRING1}
STR_CONFIG_SETTING_BUILDONSLOPES :{LTBLUE}Allow building on slopes and coasts: {ORANGE}{STRING1}
STR_CONFIG_SETTING_AUTOSLOPE :{LTBLUE}Allow landscaping under buildings, tracks, etc. (autoslope): {ORANGE}{STRING1}
STR_CONFIG_SETTING_CATCHMENT :{LTBLUE}Allow more realistically sized catchment areas: {ORANGE}{STRING1}
@@ -3038,23 +3037,14 @@ STR_VEHICLE_STATUS_LEAVING :{LTBLUE}Leaving
STR_VEHICLE_STATUS_CRASHED :{RED}Crashed!
STR_VEHICLE_STATUS_BROKEN_DOWN :{RED}Broken down
STR_VEHICLE_STATUS_STOPPED :{RED}Stopped
-STR_VEHICLE_STATUS_TRAIN_STOPPING :{RED}Stopping
STR_VEHICLE_STATUS_TRAIN_STOPPING_VEL :{RED}Stopping, {VELOCITY}
STR_VEHICLE_STATUS_TRAIN_NO_POWER :{RED}No power
STR_VEHICLE_STATUS_TRAIN_STUCK :{ORANGE}Waiting for free path
-STR_VEHICLE_STATUS_HEADING_FOR_STATION :{LTBLUE}Heading for {STATION}
STR_VEHICLE_STATUS_HEADING_FOR_STATION_VEL :{LTBLUE}Heading for {STATION}, {VELOCITY}
-STR_VEHICLE_STATUS_NO_ORDERS :{LTBLUE}No orders
STR_VEHICLE_STATUS_NO_ORDERS_VEL :{LTBLUE}No orders, {VELOCITY}
-
-STR_VEHICLE_STATUS_HEADING_FOR_WAYPOINT :{LTBLUE}Heading for {WAYPOINT}
STR_VEHICLE_STATUS_HEADING_FOR_WAYPOINT_VEL :{LTBLUE}Heading for {WAYPOINT}, {VELOCITY}
-
-STR_VEHICLE_STATUS_HEADING_FOR_DEPOT :{ORANGE}Heading for {DEPOT}
STR_VEHICLE_STATUS_HEADING_FOR_DEPOT_VEL :{ORANGE}Heading for {DEPOT}, {VELOCITY}
-
-STR_VEHICLE_STATUS_HEADING_FOR_DEPOT_SERVICE :{LTBLUE}Service at {DEPOT}
STR_VEHICLE_STATUS_HEADING_FOR_DEPOT_SERVICE_VEL :{LTBLUE}Service at {DEPOT}, {VELOCITY}
# Vehicle stopped/started animations
diff --git a/src/settings_type.h b/src/settings_type.h
index 38cca46e8..6a163be08 100644
--- a/src/settings_type.h
+++ b/src/settings_type.h
@@ -42,7 +42,6 @@ struct DifficultySettings {
/** Settings related to the GUI and other stuff that is not saved in the savegame. */
struct GUISettings {
- bool vehicle_speed; ///< show vehicle speed
bool sg_full_load_any; ///< new full load calculation, any cargo must be full read from pre v93 savegames
bool lost_vehicle_warn; ///< if a vehicle can't find its destination, show a warning
uint8 order_review_system; ///< perform order reviews on vehicles
diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp
index 6e733d360..972cf9961 100644
--- a/src/ship_cmd.cpp
+++ b/src/ship_cmd.cpp
@@ -307,9 +307,7 @@ static bool ShipAccelerate(Vehicle *v)
/* updates statusbar only if speed have changed to save CPU time */
if (spd != v->cur_speed) {
v->cur_speed = spd;
- if (_settings_client.gui.vehicle_speed) {
- SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH);
- }
+ SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH);
}
/* Convert direction-indepenent speed into direction-dependent speed. (old movement method) */
diff --git a/src/table/settings.h b/src/table/settings.h
index 8c5d98bba..b9c012fbf 100644
--- a/src/table/settings.h
+++ b/src/table/settings.h
@@ -563,7 +563,6 @@ const SettingDesc _settings[] = {
SDTC_OMANY(gui.autosave, SLE_UINT8, S, 0, 1, 4, _autosave_interval, STR_NULL, NULL),
SDTC_BOOL(gui.threaded_saves, S, 0, true, STR_NULL, NULL),
SDTC_OMANY(gui.date_format_in_default_names,SLE_UINT8,S,MS, 0, 2, _savegame_date, STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES, NULL),
- SDTC_BOOL(gui.vehicle_speed, S, 0, true, STR_CONFIG_SETTING_VEHICLESPEED, NULL),
SDTC_BOOL(gui.status_long_date, S, 0, true, STR_CONFIG_SETTING_LONGDATE, NULL),
SDTC_BOOL(gui.show_finances, S, 0, true, STR_CONFIG_SETTING_SHOWFINANCES, NULL),
SDTC_BOOL(gui.autoscroll, S, 0, false, STR_CONFIG_SETTING_AUTOSCROLL, NULL),
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp
index a6197c608..eaa88674c 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -2404,7 +2404,7 @@ public:
}
} else {
SetDParam(0, v->GetDisplaySpeed());
- str = STR_VEHICLE_STATUS_TRAIN_STOPPING + _settings_client.gui.vehicle_speed;
+ str = STR_VEHICLE_STATUS_TRAIN_STOPPING_VEL;
}
} else { // no train
str = STR_VEHICLE_STATUS_STOPPED;
@@ -2416,7 +2416,7 @@ public:
case OT_GOTO_STATION: {
SetDParam(0, v->current_order.GetDestination());
SetDParam(1, v->GetDisplaySpeed());
- str = STR_VEHICLE_STATUS_HEADING_FOR_STATION + _settings_client.gui.vehicle_speed;
+ str = STR_VEHICLE_STATUS_HEADING_FOR_STATION_VEL;
break;
}
@@ -2425,9 +2425,9 @@ public:
SetDParam(1, v->current_order.GetDestination());
SetDParam(2, v->GetDisplaySpeed());
if (v->current_order.GetDepotActionType() & ODATFB_HALT) {
- str = STR_VEHICLE_STATUS_HEADING_FOR_DEPOT + _settings_client.gui.vehicle_speed;
+ str = STR_VEHICLE_STATUS_HEADING_FOR_DEPOT_VEL;
} else {
- str = STR_VEHICLE_STATUS_HEADING_FOR_DEPOT_SERVICE + _settings_client.gui.vehicle_speed;
+ str = STR_VEHICLE_STATUS_HEADING_FOR_DEPOT_SERVICE_VEL;
}
break;
}
@@ -2439,7 +2439,7 @@ public:
case OT_GOTO_WAYPOINT: {
assert(v->type == VEH_TRAIN || v->type == VEH_SHIP);
SetDParam(0, v->current_order.GetDestination());
- str = STR_VEHICLE_STATUS_HEADING_FOR_WAYPOINT + _settings_client.gui.vehicle_speed;
+ str = STR_VEHICLE_STATUS_HEADING_FOR_WAYPOINT_VEL;
SetDParam(1, v->GetDisplaySpeed());
break;
}
@@ -2453,7 +2453,7 @@ public:
default:
if (v->GetNumManualOrders() == 0) {
- str = STR_VEHICLE_STATUS_NO_ORDERS + _settings_client.gui.vehicle_speed;
+ str = STR_VEHICLE_STATUS_NO_ORDERS_VEL;
SetDParam(0, v->GetDisplaySpeed());
} else {
str = STR_EMPTY;