summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-07-25 10:54:42 +0000
committerrubidium <rubidium@openttd.org>2009-07-25 10:54:42 +0000
commit65d4d8b46c5549fa5a9eb5a5ea6a73c02e6aed7b (patch)
treec398b4a565b604a4aa08097c53e4daaebdb25e40 /src
parent4017439c37e661dbd694771106a8b29e9b860137 (diff)
downloadopenttd-65d4d8b46c5549fa5a9eb5a5ea6a73c02e6aed7b.tar.xz
(svn r16949) -Codechange: unify the way the DisplayOption enums are written
Diffstat (limited to 'src')
-rw-r--r--src/openttd.h12
-rw-r--r--src/table/settings.h2
-rw-r--r--src/toolbar_gui.cpp28
-rw-r--r--src/viewport.cpp4
4 files changed, 23 insertions, 23 deletions
diff --git a/src/openttd.h b/src/openttd.h
index c8d22b03c..a1a67d6a3 100644
--- a/src/openttd.h
+++ b/src/openttd.h
@@ -29,12 +29,12 @@ enum SwitchMode {
/* Display Options */
enum {
- DO_SHOW_TOWN_NAMES = 0,
- DO_SHOW_STATION_NAMES = 1,
- DO_SHOW_SIGNS = 2,
- DO_FULL_ANIMATION = 3,
- DO_FULL_DETAIL = 5,
- DO_WAYPOINTS = 6,
+ DO_SHOW_TOWN_NAMES = 0,
+ DO_SHOW_STATION_NAMES = 1,
+ DO_SHOW_SIGNS = 2,
+ DO_FULL_ANIMATION = 3,
+ DO_FULL_DETAIL = 5,
+ DO_SHOW_WAYPOINT_NAMES = 6,
};
extern GameMode _game_mode;
diff --git a/src/table/settings.h b/src/table/settings.h
index ec8eaa4e4..b2c855e49 100644
--- a/src/table/settings.h
+++ b/src/table/settings.h
@@ -234,7 +234,7 @@ static const SettingDescGlobVarList _win32_settings[] = {
#endif /* WIN32 */
static const SettingDescGlobVarList _misc_settings[] = {
- SDTG_MMANY("display_opt", SLE_UINT8, S, 0, _display_opt, (1 << DO_SHOW_TOWN_NAMES | 1 << DO_SHOW_STATION_NAMES | 1 << DO_SHOW_SIGNS | 1 << DO_FULL_ANIMATION | 1 << DO_FULL_DETAIL | 1 << DO_WAYPOINTS), "SHOW_TOWN_NAMES|SHOW_STATION_NAMES|SHOW_SIGNS|FULL_ANIMATION||FULL_DETAIL|WAYPOINTS", STR_NULL, NULL),
+ SDTG_MMANY("display_opt", SLE_UINT8, S, 0, _display_opt, (1 << DO_SHOW_TOWN_NAMES | 1 << DO_SHOW_STATION_NAMES | 1 << DO_SHOW_SIGNS | 1 << DO_FULL_ANIMATION | 1 << DO_FULL_DETAIL | 1 << DO_SHOW_WAYPOINT_NAMES), "SHOW_TOWN_NAMES|SHOW_STATION_NAMES|SHOW_SIGNS|FULL_ANIMATION||FULL_DETAIL|WAYPOINTS", STR_NULL, NULL),
SDTG_BOOL("news_ticker_sound", S, 0, _news_ticker_sound, true, STR_NULL, NULL),
SDTG_BOOL("fullscreen", S, 0, _fullscreen, false, STR_NULL, NULL),
SDTG_STR("graphicsset", SLE_STRQ, S, 0, _ini_graphics_set, NULL, STR_NULL, NULL),
diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp
index 7296ae1a3..2ccc8df83 100644
--- a/src/toolbar_gui.cpp
+++ b/src/toolbar_gui.cpp
@@ -294,7 +294,7 @@ static void ToolbarOptionsClick(Window *w)
list->push_back(new DropDownListCheckedItem(STR_SETTINGS_MENU_TOWN_NAMES_DISPLAYED, OME_SHOW_TOWNNAMES, false, HasBit(_display_opt, DO_SHOW_TOWN_NAMES)));
list->push_back(new DropDownListCheckedItem(STR_SETTINGS_MENU_STATION_NAMES_DISPLAYED, OME_SHOW_STATIONNAMES, false, HasBit(_display_opt, DO_SHOW_STATION_NAMES)));
list->push_back(new DropDownListCheckedItem(STR_SETTINGS_MENU_SIGNS_DISPLAYED, OME_SHOW_SIGNS, false, HasBit(_display_opt, DO_SHOW_SIGNS)));
- list->push_back(new DropDownListCheckedItem(STR_SETTINGS_MENU_WAYPOINTS_DISPLAYED, OME_SHOW_WAYPOINTNAMES, false, HasBit(_display_opt, DO_WAYPOINTS)));
+ list->push_back(new DropDownListCheckedItem(STR_SETTINGS_MENU_WAYPOINTS_DISPLAYED, OME_SHOW_WAYPOINTNAMES, false, HasBit(_display_opt, DO_SHOW_WAYPOINT_NAMES)));
list->push_back(new DropDownListCheckedItem(STR_SETTINGS_MENU_FULL_ANIMATION, OME_FULL_ANIMATION, false, HasBit(_display_opt, DO_FULL_ANIMATION)));
list->push_back(new DropDownListCheckedItem(STR_SETTINGS_MENU_FULL_DETAIL, OME_FULL_DETAILS, false, HasBit(_display_opt, DO_FULL_DETAIL)));
list->push_back(new DropDownListCheckedItem(STR_SETTINGS_MENU_TRANSPARENT_BUILDINGS, OME_TRANSPARENTBUILDINGS, false, IsTransparencySet(TO_HOUSES)));
@@ -307,20 +307,20 @@ static void ToolbarOptionsClick(Window *w)
static void MenuClickSettings(int index)
{
switch (index) {
- case OME_GAMEOPTIONS: ShowGameOptions(); return;
- case OME_DIFFICULTIES: ShowGameDifficulty(); return;
- case OME_SETTINGS: ShowGameSettings(); return;
+ case OME_GAMEOPTIONS: ShowGameOptions(); return;
+ case OME_DIFFICULTIES: ShowGameDifficulty(); return;
+ case OME_SETTINGS: ShowGameSettings(); return;
case OME_NEWGRFSETTINGS: ShowNewGRFSettings(!_networking, true, true, &_grfconfig); return;
- case OME_TRANSPARENCIES: ShowTransparencyToolbar(); break;
-
- case OME_SHOW_TOWNNAMES: ToggleBit(_display_opt, DO_SHOW_TOWN_NAMES); break;
- case OME_SHOW_STATIONNAMES: ToggleBit(_display_opt, DO_SHOW_STATION_NAMES); break;
- case OME_SHOW_SIGNS: ToggleBit(_display_opt, DO_SHOW_SIGNS); break;
- case OME_SHOW_WAYPOINTNAMES: ToggleBit(_display_opt, DO_WAYPOINTS); break;
- case OME_FULL_ANIMATION: ToggleBit(_display_opt, DO_FULL_ANIMATION); break;
- case OME_FULL_DETAILS: ToggleBit(_display_opt, DO_FULL_DETAIL); break;
- case OME_TRANSPARENTBUILDINGS: ToggleTransparency(TO_HOUSES); break;
- case OME_SHOW_STATIONSIGNS: ToggleTransparency(TO_SIGNS); break;
+ case OME_TRANSPARENCIES: ShowTransparencyToolbar(); break;
+
+ case OME_SHOW_TOWNNAMES: ToggleBit(_display_opt, DO_SHOW_TOWN_NAMES); break;
+ case OME_SHOW_STATIONNAMES: ToggleBit(_display_opt, DO_SHOW_STATION_NAMES); break;
+ case OME_SHOW_SIGNS: ToggleBit(_display_opt, DO_SHOW_SIGNS); break;
+ case OME_SHOW_WAYPOINTNAMES: ToggleBit(_display_opt, DO_SHOW_WAYPOINT_NAMES); break;
+ case OME_FULL_ANIMATION: ToggleBit(_display_opt, DO_FULL_ANIMATION); break;
+ case OME_FULL_DETAILS: ToggleBit(_display_opt, DO_FULL_DETAIL); break;
+ case OME_TRANSPARENTBUILDINGS: ToggleTransparency(TO_HOUSES); break;
+ case OME_SHOW_STATIONSIGNS: ToggleTransparency(TO_SIGNS); break;
}
MarkWholeScreenDirty();
}
diff --git a/src/viewport.cpp b/src/viewport.cpp
index 9b59e496c..282a26a98 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -1229,7 +1229,7 @@ static void ViewportAddWaypoints(DrawPixelInfo *dpi)
const Waypoint *wp;
int left, top, right, bottom;
- if (!HasBit(_display_opt, DO_WAYPOINTS))
+ if (!HasBit(_display_opt, DO_SHOW_WAYPOINT_NAMES))
return;
left = dpi->left;
@@ -2016,7 +2016,7 @@ static bool CheckClickOnWaypoint(const ViewPort *vp, int x, int y)
{
const Waypoint *wp;
- if (!HasBit(_display_opt, DO_WAYPOINTS) || IsInvisibilitySet(TO_SIGNS)) return false;
+ if (!HasBit(_display_opt, DO_SHOW_WAYPOINT_NAMES) || IsInvisibilitySet(TO_SIGNS)) return false;
switch (vp->zoom) {
case ZOOM_LVL_NORMAL: