diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp index 5a49673ac6..4c5af1e388 100644 --- a/src/ai/default/default.cpp +++ b/src/ai/default/default.cpp @@ -29,6 +29,7 @@ #include "../../saveload.h" #include "../../player_func.h" #include "../../player_base.h" +#include "../../settings_type.h" #include "default.h" #include "../../table/ai_rail.h" diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index d262e09faa..a8ce785e83 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -35,6 +35,7 @@ #include "autoreplace_gui.h" #include "gfx_func.h" #include "player_func.h" +#include "settings_type.h" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/airport.cpp b/src/airport.cpp index 6002ab411f..9d91a5d751 100644 --- a/src/airport.cpp +++ b/src/airport.cpp @@ -6,11 +6,11 @@ #include "openttd.h" #include "debug.h" #include "airport.h" -#include "variables.h" #include "airport_movement.h" #include "core/bitmath_func.hpp" #include "core/alloc_func.hpp" #include "date_func.h" +#include "settings_type.h" /* Uncomment this to print out a full report of the airport-structure * You should either use diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp index 8d4b9d6136..c65951bc96 100644 --- a/src/airport_gui.cpp +++ b/src/airport_gui.cpp @@ -14,7 +14,7 @@ #include "depot.h" #include "sound_func.h" #include "window_func.h" -#include "variables.h" +#include "settings_type.h" #include "viewport_func.h" #include "gfx_func.h" #include "player_func.h" diff --git a/src/clear_cmd.cpp b/src/clear_cmd.cpp index a530bb1875..320d299991 100644 --- a/src/clear_cmd.cpp +++ b/src/clear_cmd.cpp @@ -17,6 +17,7 @@ #include "functions.h" #include "economy_func.h" #include "viewport_func.h" +#include "settings_type.h" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index c69870dd53..fda8d54222 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -32,6 +32,7 @@ #include "string_func.h" #include "player_func.h" #include "player_base.h" +#include "settings_type.h" #ifdef ENABLE_NETWORK #include "table/strings.h" diff --git a/src/currency.cpp b/src/currency.cpp index 3c7df4d4ef..db90fa1b0f 100644 --- a/src/currency.cpp +++ b/src/currency.cpp @@ -6,7 +6,7 @@ #include "openttd.h" #include "currency.h" #include "news.h" -#include "variables.h" +#include "settings_type.h" #include "date_func.h" #include "table/strings.h" diff --git a/src/date.cpp b/src/date.cpp index c6de516aa1..0e56000ef9 100644 --- a/src/date.cpp +++ b/src/date.cpp @@ -5,6 +5,7 @@ #include "stdafx.h" #include "openttd.h" #include "variables.h" +#include "settings_type.h" #include "network/network.h" #include "network/network_data.h" #include "network/network_server.h" diff --git a/src/disaster_cmd.cpp b/src/disaster_cmd.cpp index 9deb10a160..83d73f07a7 100644 --- a/src/disaster_cmd.cpp +++ b/src/disaster_cmd.cpp @@ -32,6 +32,7 @@ #include "player_func.h" #include "airport.h" #include "variables.h" +#include "settings_type.h" #include "strings_func.h" #include "date_func.h" #include "functions.h" diff --git a/src/dock_gui.cpp b/src/dock_gui.cpp index 32109965d3..bdb0282d51 100644 --- a/src/dock_gui.cpp +++ b/src/dock_gui.cpp @@ -11,7 +11,7 @@ #include "window_gui.h" #include "station_gui.h" #include "command_func.h" -#include "variables.h" +#include "settings_type.h" #include "water.h" #include "window_func.h" #include "vehicle_func.h" diff --git a/src/elrail.cpp b/src/elrail.cpp index 56067e66de..154590b9bb 100644 --- a/src/elrail.cpp +++ b/src/elrail.cpp @@ -49,7 +49,7 @@ #include "openttd.h" #include "station_map.h" #include "viewport_func.h" -#include "variables.h" /* ... same here */ +#include "settings_type.h" #include "landscape.h" #include "rail_type.h" #include "debug.h" diff --git a/src/engine.cpp b/src/engine.cpp index 6af2a856aa..94574b492b 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -25,6 +25,7 @@ #include "autoreplace_base.h" #include "autoreplace_gui.h" #include "string_func.h" +#include "settings_type.h" #include "table/strings.h" #include "table/engines.h" diff --git a/src/genworld.cpp b/src/genworld.cpp index 5638f07a11..27ea4fd4d8 100644 --- a/src/genworld.cpp +++ b/src/genworld.cpp @@ -22,6 +22,7 @@ #include "date_func.h" #include "core/random_func.hpp" #include "engine.h" +#include "settings_type.h" #include "table/sprites.h" diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp index 9c94e25185..d0c1f9f7e5 100644 --- a/src/genworld_gui.cpp +++ b/src/genworld_gui.cpp @@ -24,6 +24,7 @@ #include "fios.h" #include "string_func.h" #include "gfx_func.h" +#include "settings_type.h" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/gfx.cpp b/src/gfx.cpp index bbfd5bf8f6..5000961707 100644 --- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -16,6 +16,7 @@ #include "video/video_driver.hpp" #include "strings_func.h" #include "core/math_func.hpp" +#include "settings_type.h" #include "table/palettes.h" #include "table/sprites.h" diff --git a/src/gfxinit.cpp b/src/gfxinit.cpp index d767755a8d..ea6125c709 100644 --- a/src/gfxinit.cpp +++ b/src/gfxinit.cpp @@ -17,6 +17,7 @@ #include "core/alloc_func.hpp" #include "core/bitmath_func.hpp" #include +#include "settings_type.h" #include "table/sprites.h" diff --git a/src/heightmap.cpp b/src/heightmap.cpp index 507f55449c..c04ebd83da 100644 --- a/src/heightmap.cpp +++ b/src/heightmap.cpp @@ -15,6 +15,7 @@ #include "gfx_func.h" #include "core/alloc_func.hpp" #include "fios.h" +#include "settings_type.h" #include "table/strings.h" diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index b77c3a2a3b..b4621df003 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -22,6 +22,7 @@ #include "strings_func.h" #include "map_func.h" #include "player_func.h" +#include "settings_type.h" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/intro_gui.cpp b/src/intro_gui.cpp index a8168df834..e1ad8599b2 100644 --- a/src/intro_gui.cpp +++ b/src/intro_gui.cpp @@ -17,6 +17,7 @@ #include "window_func.h" #include "fios.h" #include "gfx_func.h" +#include "settings_type.h" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/landscape.cpp b/src/landscape.cpp index b4824f834c..adeaf00469 100644 --- a/src/landscape.cpp +++ b/src/landscape.cpp @@ -22,6 +22,7 @@ #include "functions.h" #include "date_func.h" #include "vehicle_func.h" +#include "settings_type.h" #include "table/sprites.h" diff --git a/src/main_gui.cpp b/src/main_gui.cpp index 11e69af96b..055e4761a0 100644 --- a/src/main_gui.cpp +++ b/src/main_gui.cpp @@ -43,6 +43,7 @@ #include "player_base.h" #include "player_func.h" #include "player_gui.h" +#include "settings_type.h" #include "network/network.h" #include "network/network_data.h" diff --git a/src/misc_cmd.cpp b/src/misc_cmd.cpp index 8716333e86..87b945296a 100644 --- a/src/misc_cmd.cpp +++ b/src/misc_cmd.cpp @@ -21,6 +21,7 @@ #include "player_func.h" #include "player_base.h" #include "player_gui.h" +#include "settings_type.h" #include "table/strings.h" diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index b0772427ee..f32a9902b2 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -39,6 +39,7 @@ #include "sound_func.h" #include "string_func.h" #include "player_gui.h" +#include "settings_type.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/network/network.cpp b/src/network/network.cpp index e24da5053f..72cd515e8c 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -32,6 +32,7 @@ extern const char _openttd_revision[]; #include "../window_func.h" #include "../string_func.h" #include "../player_func.h" +#include "../settings_type.h" #ifdef DEBUG_DUMP_COMMANDS #include "../core/alloc_func.hpp" #endif /* DEBUG_DUMP_COMMANDS */ diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index 7cee89512d..1f69296706 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -25,6 +25,7 @@ #include "../string_func.h" #include "../gfx_func.h" #include "../player_func.h" +#include "../settings_type.h" #include "table/strings.h" #include "../table/sprites.h" diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index b0f4ed6599..10d0c590bd 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -25,6 +25,7 @@ #include "../player_base.h" #include "../player_func.h" #include "../player_gui.h" +#include "../settings_type.h" #include "table/strings.h" diff --git a/src/network/network_udp.cpp b/src/network/network_udp.cpp index 441b45b0a4..3ffe45f9b9 100644 --- a/src/network/network_udp.cpp +++ b/src/network/network_udp.cpp @@ -22,6 +22,7 @@ #include "../string_func.h" #include "../player_base.h" #include "../player_func.h" +#include "../settings_type.h" #include "core/udp.h" diff --git a/src/newgrf.cpp b/src/newgrf.cpp index df6ab668d6..f6c532cf2b 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -43,6 +43,7 @@ #include "string_func.h" #include "road_func.h" #include "player_base.h" +#include "settings_type.h" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/newgrf_commons.cpp b/src/newgrf_commons.cpp index 227b9fe9da..03557b6fff 100644 --- a/src/newgrf_commons.cpp +++ b/src/newgrf_commons.cpp @@ -14,6 +14,7 @@ #include "newgrf_commons.h" #include "tile_map.h" #include "station_map.h" +#include "settings_type.h" /** Constructor of generic class * @param offset end of original data for this entity. i.e: houses = 110 diff --git a/src/newgrf_spritegroup.cpp b/src/newgrf_spritegroup.cpp index 34f6c69edb..e4222628dc 100644 --- a/src/newgrf_spritegroup.cpp +++ b/src/newgrf_spritegroup.cpp @@ -11,6 +11,7 @@ #include "newgrf_spritegroup.h" #include "sprite.h" #include "date_func.h" +#include "settings_type.h" static void SpriteGroupPoolCleanBlock(uint start_item, uint end_item); diff --git a/src/newgrf_town.cpp b/src/newgrf_town.cpp index 2d5d772913..c341a0a869 100644 --- a/src/newgrf_town.cpp +++ b/src/newgrf_town.cpp @@ -4,7 +4,7 @@ #include "stdafx.h" #include "openttd.h" -#include "variables.h" +#include "settings_type.h" #include "debug.h" #include "core/bitmath_func.hpp" #include "town.h" diff --git a/src/news.h b/src/news.h index 08b1069acf..075378326d 100644 --- a/src/news.h +++ b/src/news.h @@ -50,6 +50,8 @@ void DrawNewsBorder(const Window *w); void InitNewsItemStructs(); extern NewsItem _statusbar_news_item; +extern uint32 _news_display_opt; +extern bool _news_ticker_sound; /** Type of news. */ enum NewsType { diff --git a/src/news_gui.cpp b/src/news_gui.cpp index 91252ece47..c814840620 100644 --- a/src/news_gui.cpp +++ b/src/news_gui.cpp @@ -7,7 +7,7 @@ #include "window_gui.h" #include "viewport_func.h" #include "news.h" -#include "variables.h" +#include "settings_type.h" #include "transparency.h" #include "strings_func.h" #include "window_func.h" @@ -52,6 +52,8 @@ typedef byte NewsID; #define INVALID_NEWS 255 NewsItem _statusbar_news_item; +uint32 _news_display_opt; +bool _news_ticker_sound; static NewsItem _news_items[MAX_NEWS]; ///< The news FIFO queue static NewsID _current_news = INVALID_NEWS; ///< points to news item that should be shown next static NewsID _oldest_news = 0; ///< points to first item in fifo queue diff --git a/src/pathfind.cpp b/src/pathfind.cpp index eafee883a6..5ac8277cfc 100644 --- a/src/pathfind.cpp +++ b/src/pathfind.cpp @@ -13,7 +13,7 @@ #include "rail_type.h" #include "debug.h" #include "tunnel_map.h" -#include "variables.h" +#include "settings_type.h" #include "depot.h" #include "tunnelbridge_map.h" #include "core/random_func.hpp" diff --git a/src/player_gui.cpp b/src/player_gui.cpp index 3d9d9818c6..8da3b7f25d 100644 --- a/src/player_gui.cpp +++ b/src/player_gui.cpp @@ -27,6 +27,7 @@ #include "window_func.h" #include "date_func.h" #include "string_func.h" +#include "settings_type.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index a2e5d3c974..af4572c6ca 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -26,6 +26,7 @@ #include "date_func.h" #include "sound_func.h" #include "player_func.h" +#include "settings_type.h" #include "bridge_map.h" #include "rail_map.h" diff --git a/src/road_gui.cpp b/src/road_gui.cpp index a6349d6236..11ccd44efd 100644 --- a/src/road_gui.cpp +++ b/src/road_gui.cpp @@ -22,6 +22,7 @@ #include "vehicle_func.h" #include "sound_func.h" #include "player_func.h" +#include "settings_type.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index 8cb3cb67f2..baaca558e0 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -41,6 +41,7 @@ #include "variables.h" #include "autoreplace_gui.h" #include "gfx_func.h" +#include "settings_type.h" #include "table/strings.h" diff --git a/src/settings_internal.h b/src/settings_internal.h index 23a8050016..74dab482d8 100644 --- a/src/settings_internal.h +++ b/src/settings_internal.h @@ -6,6 +6,7 @@ #define SETTINGS_INTERNAL_H #include "saveload.h" +#include "settings_type.h" /** Convention/Type of settings. This is then further specified if necessary * with the SLE_ (SLE_VAR/SLE_FILE) enums in saveload.h diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp index 04b4713ec7..eb41ffdc0e 100644 --- a/src/ship_cmd.cpp +++ b/src/ship_cmd.cpp @@ -37,6 +37,7 @@ #include "variables.h" #include "autoreplace_gui.h" #include "gfx_func.h" +#include "settings_type.h" #include "table/strings.h" diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index 7ec9925526..07baf6b2f3 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -27,6 +27,7 @@ #include "core/endian_func.hpp" #include "vehicle_base.h" #include "sound_func.h" +#include "settings_type.h" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/station.cpp b/src/station.cpp index 29314a1224..fce6626db0 100644 --- a/src/station.cpp +++ b/src/station.cpp @@ -29,6 +29,7 @@ #include "window_func.h" #include "date_func.h" #include "variables.h" +#include "settings_type.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/strings.cpp b/src/strings.cpp index 3a1f11d14f..1c48f99d6d 100644 --- a/src/strings.cpp +++ b/src/strings.cpp @@ -35,6 +35,7 @@ #include "player_func.h" #include "player_base.h" #include "fios.h" +#include "settings_type.h" #include "table/strings.h" #include "table/control_codes.h" diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp index cca3ff545f..998dbf72f6 100644 --- a/src/terraform_gui.cpp +++ b/src/terraform_gui.cpp @@ -21,6 +21,7 @@ #include "unmovable_map.h" #include "textbuf_gui.h" #include "genworld.h" +#include "settings_type.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/texteff.cpp b/src/texteff.cpp index f1478b5be9..c9486d3bc3 100644 --- a/src/texteff.cpp +++ b/src/texteff.cpp @@ -19,6 +19,7 @@ #include "date_func.h" #include "functions.h" #include "viewport_func.h" +#include "settings_type.h" #include "table/sprites.h" diff --git a/src/tgp.cpp b/src/tgp.cpp index 7519df0b0e..b798210fc7 100644 --- a/src/tgp.cpp +++ b/src/tgp.cpp @@ -14,6 +14,7 @@ #include "genworld.h" #include "core/alloc_func.hpp" #include "core/random_func.hpp" +#include "settings_type.h" #include "table/strings.h" diff --git a/src/timetable_cmd.cpp b/src/timetable_cmd.cpp index c4a7f87249..ee9a8f8dd2 100644 --- a/src/timetable_cmd.cpp +++ b/src/timetable_cmd.cpp @@ -10,6 +10,7 @@ #include "window_func.h" #include "vehicle_func.h" #include "vehicle_base.h" +#include "settings_type.h" #include "table/strings.h" diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp index 29ec66ec09..66c47f53b1 100644 --- a/src/timetable_gui.cpp +++ b/src/timetable_gui.cpp @@ -17,6 +17,7 @@ #include "string_func.h" #include "gfx_func.h" #include "player_func.h" +#include "settings_type.h" #include "table/strings.h" diff --git a/src/town_gui.cpp b/src/town_gui.cpp index 38856459ca..828a722a51 100644 --- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -20,6 +20,7 @@ #include "strings_func.h" #include "economy_func.h" #include "core/alloc_func.hpp" +#include "settings_type.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 1bbec7cb17..c2171d0fab 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -46,6 +46,7 @@ #include "variables.h" #include "autoreplace_gui.h" #include "gfx_func.h" +#include "settings_type.h" #include "table/strings.h" #include "table/train_cmd.h" diff --git a/src/tree_cmd.cpp b/src/tree_cmd.cpp index 084698b481..6a9526958c 100644 --- a/src/tree_cmd.cpp +++ b/src/tree_cmd.cpp @@ -19,6 +19,7 @@ #include "functions.h" #include "player_func.h" #include "sound_func.h" +#include "settings_type.h" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/variables.h b/src/variables.h index 253956d536..cfba96391b 100644 --- a/src/variables.h +++ b/src/variables.h @@ -5,7 +5,6 @@ #ifndef VARIABLES_H #define VARIABLES_H -#include "settings_type.h" #include "tile_type.h" #include "strings_type.h" @@ -79,8 +78,6 @@ VARDEF int _autosave_ctr; VARDEF byte _display_opt; VARDEF int _caret_timer; -VARDEF uint32 _news_display_opt; -VARDEF bool _news_ticker_sound; VARDEF StringID _error_message; diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 3c455a4814..facd6e5170 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -47,6 +47,7 @@ #include "autoreplace_func.h" #include "autoreplace_gui.h" #include "string_func.h" +#include "settings_type.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index bbe21ccd92..042582709d 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -34,6 +34,7 @@ #include "autoreplace_gui.h" #include "core/alloc_func.hpp" #include "string_func.h" +#include "settings_type.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/viewport.cpp b/src/viewport.cpp index 19da9ac951..6106299b54 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -24,6 +24,7 @@ #include "zoom_func.h" #include "vehicle_func.h" #include "player_func.h" +#include "settings_type.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp index 1e709273b6..45d6f514c3 100644 --- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -32,6 +32,7 @@ #include "sound_func.h" #include "variables.h" #include "player_func.h" +#include "settings_type.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/waypoint.cpp b/src/waypoint.cpp index 0275e76863..bf2c7c06e6 100644 --- a/src/waypoint.cpp +++ b/src/waypoint.cpp @@ -30,6 +30,7 @@ #include "string_func.h" #include "signal_func.h" #include "player_func.h" +#include "settings_type.h" #include "table/strings.h" diff --git a/src/window.cpp b/src/window.cpp index 0163f5bac8..d7fbfea3d8 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -18,6 +18,7 @@ #include "core/alloc_func.hpp" #include "map_func.h" #include "vehicle_base.h" +#include "settings_type.h" #include "table/sprites.h"