diff options
author | rubidium <rubidium@openttd.org> | 2008-01-13 01:21:35 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-01-13 01:21:35 +0000 |
commit | d4e6a6bf57216b39745b61971141e088e15e2d0d (patch) | |
tree | fc3e123d733a91dd61b578c69516fae69754c97f /src | |
parent | a78d73805f467d3ced0a70a1758435498fd1dbac (diff) | |
download | openttd-d4e6a6bf57216b39745b61971141e088e15e2d0d.tar.xz |
(svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h.
Diffstat (limited to 'src')
129 files changed, 311 insertions, 213 deletions
diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp index b9d0f2f92..5a49673ac 100644 --- a/src/ai/default/default.cpp +++ b/src/ai/default/default.cpp @@ -31,6 +31,8 @@ #include "../../player_base.h" #include "default.h" +#include "../../table/ai_rail.h" + // remove some day perhaps? static uint _ai_service_interval; PlayerAI _players_ai[MAX_PLAYERS]; @@ -65,8 +67,6 @@ enum { }; -#include "../../table/ai_rail.h" - static TrackBits GetRailTrackStatus(TileIndex tile) { uint32 r = GetTileTrackStatus(tile, TRANSPORT_RAIL, 0); diff --git a/src/ai/trolly/trolly.cpp b/src/ai/trolly/trolly.cpp index 8a863142e..f7c488b49 100644 --- a/src/ai/trolly/trolly.cpp +++ b/src/ai/trolly/trolly.cpp @@ -22,7 +22,6 @@ #include "../../debug.h" #include "../../road_map.h" #include "../../station_map.h" -#include "table/strings.h" #include "../../command_func.h" #include "trolly.h" #include "../../town.h" @@ -39,6 +38,8 @@ #include "../../player_base.h" #include "../../player_func.h" +#include "table/strings.h" + PlayerAiNew _players_ainew[MAX_PLAYERS]; // This function is called after StartUp. It is the init of an AI diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index cfc763270..d262e09fa 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -9,7 +9,6 @@ #include "debug.h" #include "landscape.h" #include "station_map.h" -#include "table/strings.h" #include "timetable.h" #include "depot.h" #include "engine.h" @@ -18,7 +17,6 @@ #include "aircraft.h" #include "airport.h" #include "vehicle_gui.h" -#include "table/sprites.h" #include "newgrf_engine.h" #include "newgrf_callbacks.h" #include "newgrf_text.h" @@ -38,6 +36,9 @@ #include "gfx_func.h" #include "player_func.h" +#include "table/strings.h" +#include "table/sprites.h" + void Aircraft::UpdateDeltaXY(Direction direction) { uint32 x; diff --git a/src/aircraft_gui.cpp b/src/aircraft_gui.cpp index c9b733e76..984d66e82 100644 --- a/src/aircraft_gui.cpp +++ b/src/aircraft_gui.cpp @@ -6,8 +6,6 @@ #include "openttd.h" #include "aircraft.h" #include "debug.h" -#include "table/sprites.h" -#include "table/strings.h" #include "gui.h" #include "engine.h" #include "depot.h" @@ -17,6 +15,9 @@ #include "vehicle_func.h" #include "gfx_func.h" +#include "table/sprites.h" +#include "table/strings.h" + /** * Draw the details for the given vehicle at the position (x,y) * diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp index a2a9e0a90..8d4b9d613 100644 --- a/src/airport_gui.cpp +++ b/src/airport_gui.cpp @@ -4,8 +4,6 @@ #include "stdafx.h" #include "openttd.h" -#include "table/sprites.h" -#include "table/strings.h" #include "window_gui.h" #include "gui.h" #include "station_gui.h" @@ -21,6 +19,9 @@ #include "gfx_func.h" #include "player_func.h" +#include "table/sprites.h" +#include "table/strings.h" + static byte _selected_airport_type; static void ShowBuildAirportPicker(); diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp index a0bffa4b3..f0a8f171a 100644 --- a/src/autoreplace_cmd.cpp +++ b/src/autoreplace_cmd.cpp @@ -4,7 +4,6 @@ #include "openttd.h" #include "roadveh.h" #include "ship.h" -#include "table/strings.h" #include "news.h" #include "player_func.h" #include "engine.h" @@ -23,6 +22,8 @@ #include "variables.h" #include "autoreplace_func.h" +#include "table/strings.h" + /* * move the cargo from one engine to another if possible */ diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp index ce18ac732..f2c368bea 100644 --- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -5,8 +5,6 @@ #include "stdafx.h" #include "openttd.h" #include "debug.h" -#include "table/sprites.h" -#include "table/strings.h" #include "gui.h" #include "command_func.h" #include "variables.h" @@ -21,6 +19,9 @@ #include "gfx_func.h" #include "player_func.h" +#include "table/sprites.h" +#include "table/strings.h" + static RailType _railtype_selected_in_replace_gui; static bool _rebuild_left_list; diff --git a/src/blitter/32bpp_anim.cpp b/src/blitter/32bpp_anim.cpp index 6af9926e1..924803be9 100644 --- a/src/blitter/32bpp_anim.cpp +++ b/src/blitter/32bpp_anim.cpp @@ -5,10 +5,11 @@ #include "../gfx_func.h" #include "../zoom_func.h" #include "../debug.h" -#include "../table/sprites.h" #include "../video/video_driver.hpp" #include "32bpp_anim.hpp" +#include "../table/sprites.h" + static FBlitter_32bppAnim iFBlitter_32bppAnim; void Blitter_32bppAnim::Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) diff --git a/src/blitter/32bpp_optimized.cpp b/src/blitter/32bpp_optimized.cpp index 2906158be..f4be19926 100644 --- a/src/blitter/32bpp_optimized.cpp +++ b/src/blitter/32bpp_optimized.cpp @@ -4,7 +4,6 @@ #include "../zoom_func.h" #include "../gfx_func.h" #include "../debug.h" -#include "../table/sprites.h" #include "32bpp_optimized.hpp" static FBlitter_32bppOptimized iFBlitter_32bppOptimized; diff --git a/src/blitter/32bpp_simple.cpp b/src/blitter/32bpp_simple.cpp index f5ecba8ad..b5fa3f06d 100644 --- a/src/blitter/32bpp_simple.cpp +++ b/src/blitter/32bpp_simple.cpp @@ -4,9 +4,10 @@ #include "../gfx_func.h" #include "../zoom_func.h" #include "../debug.h" -#include "../table/sprites.h" #include "32bpp_simple.hpp" +#include "../table/sprites.h" + static FBlitter_32bppSimple iFBlitter_32bppSimple; void Blitter_32bppSimple::Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) diff --git a/src/bridge_gui.cpp b/src/bridge_gui.cpp index 5706ab3ba..596ac1107 100644 --- a/src/bridge_gui.cpp +++ b/src/bridge_gui.cpp @@ -4,7 +4,6 @@ #include "stdafx.h" #include "openttd.h" -#include "table/strings.h" #include "gui.h" #include "window_gui.h" #include "command_func.h" @@ -18,6 +17,8 @@ #include "viewport_func.h" #include "gfx_func.h" +#include "table/strings.h" + static struct BridgeData { uint8 last_size; uint count; diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp index 69cb432b0..b2bf30ca9 100644 --- a/src/build_vehicle_gui.cpp +++ b/src/build_vehicle_gui.cpp @@ -9,8 +9,6 @@ #include "ship.h" #include "aircraft.h" #include "debug.h" -#include "table/sprites.h" -#include "table/strings.h" #include "gui.h" #include "articulated_vehicles.h" #include "textbuf_gui.h" @@ -32,6 +30,9 @@ #include "settings_type.h" #include "gfx_func.h" +#include "table/sprites.h" +#include "table/strings.h" + struct buildvehicle_d { VehicleType vehicle_type; union { diff --git a/src/cargotype.cpp b/src/cargotype.cpp index 0d3bcd827..2bc7928b9 100644 --- a/src/cargotype.cpp +++ b/src/cargotype.cpp @@ -4,12 +4,12 @@ #include "stdafx.h" #include "openttd.h" -#include "table/sprites.h" -#include "table/strings.h" #include "newgrf_cargo.h" #include "cargotype.h" #include "core/bitmath_func.hpp" +#include "table/sprites.h" +#include "table/strings.h" #include "table/cargo_const.h" CargoSpec _cargo[NUM_CARGO]; diff --git a/src/cargotype.h b/src/cargotype.h index fe55d9099..8f00ef4cd 100644 --- a/src/cargotype.h +++ b/src/cargotype.h @@ -7,6 +7,7 @@ #include "cargo_type.h" #include "gfx_type.h" +#include "strings_type.h" typedef uint32 CargoLabel; diff --git a/src/clear_cmd.cpp b/src/clear_cmd.cpp index afcdc268c..a530bb187 100644 --- a/src/clear_cmd.cpp +++ b/src/clear_cmd.cpp @@ -5,12 +5,10 @@ #include "stdafx.h" #include "openttd.h" #include "clear_map.h" -#include "table/strings.h" #include "command_func.h" #include "bridge.h" #include "landscape.h" #include "variables.h" -#include "table/sprites.h" #include "unmovable_map.h" #include "genworld.h" #include "industry.h" @@ -18,9 +16,12 @@ #include "tile_cmd.h" #include "functions.h" #include "economy_func.h" -#include "table/clear_land.h" #include "viewport_func.h" +#include "table/strings.h" +#include "table/sprites.h" +#include "table/clear_land.h" + static CommandCost ClearTile_Clear(TileIndex tile, byte flags) { static const Money* clear_price_table[] = { diff --git a/src/command.cpp b/src/command.cpp index d48cc9906..8587e8a52 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -4,7 +4,6 @@ #include "stdafx.h" #include "openttd.h" -#include "table/strings.h" #include "landscape.h" #include "tile_map.h" #include "gui.h" @@ -22,6 +21,8 @@ #include "player_func.h" #include "player_base.h" +#include "table/strings.h" + const char *_cmd_text = NULL; /** diff --git a/src/console.cpp b/src/console.cpp index b5fbf83ab..be90dfc4e 100644 --- a/src/console.cpp +++ b/src/console.cpp @@ -4,7 +4,6 @@ #include "stdafx.h" #include "openttd.h" -#include "table/strings.h" #include "gui.h" #include "textbuf_gui.h" #include "window_gui.h" @@ -20,6 +19,8 @@ #include "string_func.h" #include "gfx_func.h" +#include "table/strings.h" + #define ICON_BUFFER 79 #define ICON_HISTORY_SIZE 20 #define ICON_LINE_HEIGHT 12 diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index ede00c4c2..516bcad1a 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -33,6 +33,10 @@ #include "player_func.h" #include "player_base.h" +#ifdef ENABLE_NETWORK + #include "table/strings.h" +#endif /* ENABLE_NETWORK */ + // ** scriptfile handling ** // static FILE *_script_file; static bool _script_running; @@ -1224,10 +1228,6 @@ DEF_CONSOLE_CMD(ConSay) return true; } -#ifdef ENABLE_NETWORK - #include "table/strings.h" -#endif /* ENABLE_NETWORK */ - DEF_CONSOLE_CMD(ConPlayers) { Player *p; diff --git a/src/currency.cpp b/src/currency.cpp index 091a9fd80..3c7df4d4e 100644 --- a/src/currency.cpp +++ b/src/currency.cpp @@ -7,9 +7,10 @@ #include "currency.h" #include "news.h" #include "variables.h" -#include "table/strings.h" #include "date_func.h" +#include "table/strings.h" + // exchange rate prefix symbol_pos // | separator | postfix | // | | Euro year | | | name diff --git a/src/currency.h b/src/currency.h index 8d1eaff74..cd967f603 100644 --- a/src/currency.h +++ b/src/currency.h @@ -6,6 +6,7 @@ #define CURRENCY_H #include "date_type.h" +#include "strings_type.h" enum { CF_NOEURO = 0, diff --git a/src/depot.cpp b/src/depot.cpp index 387397520..524274261 100644 --- a/src/depot.cpp +++ b/src/depot.cpp @@ -6,11 +6,12 @@ #include "openttd.h" #include "depot.h" #include "landscape.h" -#include "table/strings.h" #include "saveload.h" #include "order.h" #include "window_func.h" +#include "table/strings.h" + DEFINE_OLD_POOL_GENERIC(Depot, Depot) /** diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp index f628da3cb..97ca253d7 100644 --- a/src/depot_gui.cpp +++ b/src/depot_gui.cpp @@ -8,8 +8,6 @@ #include "roadveh.h" #include "ship.h" #include "aircraft.h" -#include "table/strings.h" -#include "table/sprites.h" #include "gui.h" #include "textbuf_gui.h" #include "viewport_func.h" @@ -25,6 +23,9 @@ #include "vehicle_func.h" #include "player_func.h" +#include "table/strings.h" +#include "table/sprites.h" + /* * Since all depot window sizes aren't the same, we need to modify sizes a little. * It's done with the following arrays of widget indexes. Each of them tells if a widget side should be moved and in what direction. diff --git a/src/disaster_cmd.cpp b/src/disaster_cmd.cpp index 146f7c98e..9deb10a16 100644 --- a/src/disaster_cmd.cpp +++ b/src/disaster_cmd.cpp @@ -22,7 +22,6 @@ #include "industry_map.h" #include "station_map.h" -#include "table/strings.h" #include "command_func.h" #include "tile_cmd.h" #include "news.h" @@ -33,7 +32,6 @@ #include "player_func.h" #include "airport.h" #include "variables.h" -#include "table/sprites.h" #include "strings_func.h" #include "date_func.h" #include "functions.h" @@ -41,6 +39,9 @@ #include "vehicle_base.h" #include "sound_func.h" +#include "table/strings.h" +#include "table/sprites.h" + enum DisasterSubType { ST_Zeppeliner, ST_Zeppeliner_Shadow, diff --git a/src/dock_gui.cpp b/src/dock_gui.cpp index a26a8a497..32109965d 100644 --- a/src/dock_gui.cpp +++ b/src/dock_gui.cpp @@ -4,8 +4,6 @@ #include "stdafx.h" #include "openttd.h" -#include "table/sprites.h" -#include "table/strings.h" #include "tile_map.h" #include "station.h" #include "gui.h" @@ -22,6 +20,9 @@ #include "gfx_func.h" #include "player_func.h" +#include "table/sprites.h" +#include "table/strings.h" + static void ShowBuildDockStationPicker(); static void ShowBuildDocksDepotPicker(); diff --git a/src/dummy_land.cpp b/src/dummy_land.cpp index 1d4491f16..f2d7527f8 100644 --- a/src/dummy_land.cpp +++ b/src/dummy_land.cpp @@ -4,12 +4,13 @@ #include "stdafx.h" #include "openttd.h" -#include "table/strings.h" #include "tile_cmd.h" #include "command_func.h" -#include "table/sprites.h" #include "viewport_func.h" +#include "table/strings.h" +#include "table/sprites.h" + static void DrawTile_Dummy(TileInfo *ti) { DrawGroundSpriteAt(SPR_SHADOW_CELL, PAL_NONE, ti->x, ti->y, ti->z); diff --git a/src/economy.cpp b/src/economy.cpp index 30ebd96c6..9780db4fa 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -6,8 +6,6 @@ #include "openttd.h" #include "currency.h" #include "landscape.h" -#include "table/strings.h" -#include "table/sprites.h" #include "news.h" #include "player_base.h" #include "player_func.h" @@ -47,6 +45,9 @@ #include "signal_func.h" #include "gfx_func.h" +#include "table/strings.h" +#include "table/sprites.h" + /** * Multiply two integer values and shift the results to right. * diff --git a/src/elrail.cpp b/src/elrail.cpp index e0b158aea..56067e66d 100644 --- a/src/elrail.cpp +++ b/src/elrail.cpp @@ -58,8 +58,6 @@ #include "bridge_map.h" #include "bridge.h" #include "rail_map.h" -#include "table/sprites.h" -#include "table/elrail_data.h" #include "train.h" #include "rail_gui.h" #include "transparency.h" @@ -67,6 +65,8 @@ #include "vehicle_func.h" #include "player_base.h" +#include "table/sprites.h" +#include "table/elrail_data.h" static inline TLG GetTLG(TileIndex t) { diff --git a/src/engine.cpp b/src/engine.cpp index 80c639eac..499de4d2f 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -5,7 +5,6 @@ #include "stdafx.h" #include "openttd.h" #include "debug.h" -#include "table/strings.h" #include "engine.h" #include "player_base.h" #include "player_func.h" @@ -16,7 +15,6 @@ #include "train.h" #include "aircraft.h" #include "newgrf_cargo.h" -#include "table/engines.h" #include "group.h" #include "misc/autoptr.hpp" #include "strings_func.h" @@ -28,6 +26,9 @@ #include "autoreplace_gui.h" #include "string_func.h" +#include "table/strings.h" +#include "table/engines.h" + EngineInfo _engine_info[TOTAL_NUM_ENGINES]; RailVehicleInfo _rail_vehicle_info[NUM_TRAIN_ENGINES]; ShipVehicleInfo _ship_vehicle_info[NUM_SHIP_ENGINES]; diff --git a/src/engine.h b/src/engine.h index 6b5a4d833..5e2f1e678 100644 --- a/src/engine.h +++ b/src/engine.h @@ -12,6 +12,7 @@ #include "date_type.h" #include "sound_type.h" #include "player_type.h" +#include "strings_type.h" enum RailVehicleTypes { RAILVEH_SINGLEHEAD, ///< indicates a "standalone" locomotive diff --git a/src/engine_gui.cpp b/src/engine_gui.cpp index 8924da6ed..fe89809ac 100644 --- a/src/engine_gui.cpp +++ b/src/engine_gui.cpp @@ -4,8 +4,6 @@ #include "stdafx.h" #include "openttd.h" -#include "table/strings.h" -#include "table/sprites.h" #include "gui.h" #include "window_gui.h" #include "gfx_func.h" @@ -17,6 +15,8 @@ #include "newgrf_engine.h" #include "strings_func.h" +#include "table/strings.h" +#include "table/sprites.h" static StringID GetEngineCategoryName(EngineID engine) { diff --git a/src/fios.cpp b/src/fios.cpp index b83520e21..93ec66174 100644 --- a/src/fios.cpp +++ b/src/fios.cpp @@ -8,7 +8,6 @@ #include "openttd.h" #include "variables.h" #include "heightmap.h" -#include "table/strings.h" #include "fios.h" #include "fileio.h" #include "core/alloc_func.hpp" @@ -24,6 +23,8 @@ # include <unistd.h> #endif /* WIN32 */ +#include "table/strings.h" + /* Variables to display file lists */ int _fios_num; diff --git a/src/fios.h b/src/fios.h index 016f43c4a..ccc548286 100644 --- a/src/fios.h +++ b/src/fios.h @@ -5,6 +5,8 @@ #ifndef FIOS_H #define FIOS_H +#include "strings_type.h" + enum { /** * Slot used for the GRF scanning and such. This slot cannot be reused diff --git a/src/fontcache.cpp b/src/fontcache.cpp index efde18eed..7a5813c75 100644 --- a/src/fontcache.cpp +++ b/src/fontcache.cpp @@ -5,8 +5,6 @@ #include "stdafx.h" #include "openttd.h" #include "debug.h" -#include "table/sprites.h" -#include "table/control_codes.h" #include "spritecache.h" #include "fontcache.h" #include "spriteloader/spriteloader.hpp" @@ -15,8 +13,10 @@ #include "core/alloc_func.hpp" #include "core/math_func.hpp" -#ifdef WITH_FREETYPE +#include "table/sprites.h" +#include "table/control_codes.h" +#ifdef WITH_FREETYPE #include <ft2build.h> #include FT_FREETYPE_H #include FT_GLYPH_H diff --git a/src/genworld.cpp b/src/genworld.cpp index 9359ac014..5638f07a1 100644 --- a/src/genworld.cpp +++ b/src/genworld.cpp @@ -6,7 +6,6 @@ #include "openttd.h" #include "landscape.h" #include "player_func.h" -#include "table/sprites.h" #include "variables.h" #include "thread.h" #include "command_func.h" @@ -24,6 +23,8 @@ #include "core/random_func.hpp" #include "engine.h" +#include "table/sprites.h" + void GenerateClearTile(); void GenerateIndustries(); void GenerateUnmovables(); diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp index 95f456752..9c94e2518 100644 --- a/src/genworld_gui.cpp +++ b/src/genworld_gui.cpp @@ -5,8 +5,6 @@ #include "stdafx.h" #include "openttd.h" #include "heightmap.h" -#include "table/strings.h" -#include "table/sprites.h" #include "gui.h" #include "window_gui.h" #include "textbuf_gui.h" @@ -27,6 +25,9 @@ #include "string_func.h" #include "gfx_func.h" +#include "table/strings.h" +#include "table/sprites.h" + /** * In what 'mode' the GenerateLandscapeWindowProc is. */ diff --git a/src/gfx.cpp b/src/gfx.cpp index 8f2717e1f..bbfd5bf8f 100644 --- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -6,10 +6,7 @@ #include "openttd.h" #include "gfx_func.h" #include "spritecache.h" -#include "table/palettes.h" -#include "table/sprites.h" #include "variables.h" -#include "table/control_codes.h" #include "fontcache.h" #include "genworld.h" #include "debug.h" @@ -20,6 +17,10 @@ #include "strings_func.h" #include "core/math_func.hpp" +#include "table/palettes.h" +#include "table/sprites.h" +#include "table/control_codes.h" + byte _dirkeys; ///< 1 = left, 2 = up, 4 = right, 8 = down bool _fullscreen; CursorVars _cursor; diff --git a/src/gfxinit.cpp b/src/gfxinit.cpp index 01f82d34a..d767755a8 100644 --- a/src/gfxinit.cpp +++ b/src/gfxinit.cpp @@ -7,7 +7,6 @@ #include "debug.h" #include "gfxinit.h" #include "spritecache.h" -#include "table/sprites.h" #include "fileio.h" #include "fios.h" #include "newgrf.h" @@ -19,6 +18,8 @@ #include "core/bitmath_func.hpp" #include <string.h> +#include "table/sprites.h" + struct MD5File { const char * filename; ///< filename uint8 hash[16]; ///< md5 sum of the file diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp index 672ba51d0..3c69e19d5 100644 --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -4,8 +4,6 @@ #include "stdafx.h" #include "openttd.h" -#include "table/strings.h" -#include "table/sprites.h" #include "gui.h" #include "window_gui.h" #include "player_base.h" @@ -19,6 +17,9 @@ #include "date_func.h" #include "gfx_func.h" +#include "table/strings.h" +#include "table/sprites.h" + /* Bitmasks of player and cargo indices that shouldn't be drawn. */ static uint _legend_excluded_players; static uint _legend_excluded_cargo; diff --git a/src/group_cmd.cpp b/src/group_cmd.cpp index b04d2ad7a..c1698bbe4 100644 --- a/src/group_cmd.cpp +++ b/src/group_cmd.cpp @@ -5,7 +5,6 @@ #include "stdafx.h" #include "openttd.h" #include "variables.h" -#include "table/strings.h" #include "command_func.h" #include "saveload.h" #include "debug.h" @@ -23,6 +22,8 @@ #include "string_func.h" #include "player_func.h" +#include "table/strings.h" + /** * Update the num engines of a groupID. Decrease the old one and increase the new one * @note called in SetTrainGroupID and UpdateTrainGroupID diff --git a/src/group_gui.cpp b/src/group_gui.cpp index 7ec5287b6..7175e555f 100644 --- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -4,8 +4,6 @@ #include "stdafx.h" #include "openttd.h" -#include "table/strings.h" -#include "table/sprites.h" #include "gui.h" #include "window_gui.h" #include "textbuf_gui.h" @@ -26,6 +24,8 @@ #include "gfx_func.h" #include "player_func.h" +#include "table/strings.h" +#include "table/sprites.h" struct Sorting { Listing aircraft; @@ -10,6 +10,7 @@ #include "gfx_type.h" #include "economy_type.h" #include "tile_type.h" +#include "strings_type.h" /* main_gui.cpp */ void CcPlaySound10(bool success, TileIndex tile, uint32 p1, uint32 p2); diff --git a/src/heightmap.cpp b/src/heightmap.cpp index 6a99c5579..507f55449 100644 --- a/src/heightmap.cpp +++ b/src/heightmap.cpp @@ -7,7 +7,6 @@ #include "variables.h" #include "heightmap.h" #include "clear_map.h" -#include "table/strings.h" #include "void_map.h" #include "debug.h" #include "gui.h" @@ -17,6 +16,8 @@ #include "core/alloc_func.hpp" #include "fios.h" +#include "table/strings.h" + /** * Convert RGB colors to Grayscale using 29.9% Red, 58.7% Green, 11.4% Blue * (average luminosity formula) -- Dalestan diff --git a/src/industry.h b/src/industry.h index 8916dae24..b754fff2c 100644 --- a/src/industry.h +++ b/src/industry.h @@ -15,6 +15,7 @@ #include "date_type.h" #include "town_type.h" #include "industry_type.h" +#include "strings_type.h" enum { INVALID_INDUSTRY = 0xFFFF, diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index 2074f7a0a..62769b099 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -7,8 +7,6 @@ #include "clear_map.h" #include "industry_map.h" #include "station_map.h" -#include "table/strings.h" -#include "table/sprites.h" #include "train.h" #include "landscape.h" #include "viewport_func.h" @@ -18,8 +16,6 @@ #include "news.h" #include "saveload.h" #include "variables.h" -#include "table/industry_land.h" -#include "table/build_industry.h" #include "genworld.h" #include "water_map.h" #include "tree_map.h" @@ -41,6 +37,11 @@ #include "vehicle_func.h" #include "sound_func.h" +#include "table/strings.h" +#include "table/sprites.h" +#include "table/industry_land.h" +#include "table/build_industry.h" + void ShowIndustryViewWindow(int industry); void BuildOilRig(TileIndex tile); diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index a8e5b2f2d..b77c3a2a3 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -5,8 +5,6 @@ #include "stdafx.h" #include "openttd.h" #include "debug.h" -#include "table/strings.h" -#include "table/sprites.h" #include "gui.h" #include "window_gui.h" #include "textbuf_gui.h" @@ -25,6 +23,9 @@ #include "map_func.h" #include "player_func.h" +#include "table/strings.h" +#include "table/sprites.h" + bool _ignore_restrictions; /** Names of the widgets of the dynamic place industries gui */ diff --git a/src/intro_gui.cpp b/src/intro_gui.cpp index 3be6109b0..a8168df83 100644 --- a/src/intro_gui.cpp +++ b/src/intro_gui.cpp @@ -4,8 +4,6 @@ #include "stdafx.h" #include "openttd.h" -#include "table/strings.h" -#include "table/sprites.h" #include "gui.h" #include "window_gui.h" #include "textbuf_gui.h" @@ -20,6 +18,9 @@ #include "fios.h" #include "gfx_func.h" +#include "table/strings.h" +#include "table/sprites.h" + static const Widget _select_game_widgets[] = { { WWT_CAPTION, RESIZE_NONE, 13, 0, 335, 0, 13, STR_0307_OPENTTD, STR_NULL}, { WWT_PANEL, RESIZE_NONE, 13, 0, 335, 14, 194, 0x0, STR_NULL}, diff --git a/src/landscape.cpp b/src/landscape.cpp index c2acd0b70..b4824f834 100644 --- a/src/landscape.cpp +++ b/src/landscape.cpp @@ -6,7 +6,6 @@ #include "heightmap.h" #include "clear_map.h" #include "spritecache.h" -#include "table/sprites.h" #include <stdarg.h> #include "viewport_func.h" #include "command_func.h" @@ -24,6 +23,8 @@ #include "date_func.h" #include "vehicle_func.h" +#include "table/sprites.h" + extern const TileTypeProcs _tile_type_clear_procs, _tile_type_rail_procs, diff --git a/src/main_gui.cpp b/src/main_gui.cpp index 24a98c4ec..11e69af96 100644 --- a/src/main_gui.cpp +++ b/src/main_gui.cpp @@ -7,8 +7,6 @@ #include "heightmap.h" #include "currency.h" #include "spritecache.h" -#include "table/sprites.h" -#include "table/strings.h" #include "gui.h" #include "window_gui.h" #include "window_func.h" @@ -18,7 +16,6 @@ #include "news.h" #include "town.h" #include "console.h" -#include "network/network.h" #include "signs.h" #include "waypoint.h" #include "variables.h" @@ -38,11 +35,6 @@ #include "sound_func.h" #include "fios.h" #include "terraform_gui.h" - -#include "network/network_data.h" -#include "network/network_client.h" -#include "network/network_server.h" -#include "network/network_gui.h" #include "industry.h" #include "transparency.h" #include "strings_func.h" @@ -52,6 +44,15 @@ #include "player_func.h" #include "player_gui.h" +#include "network/network.h" +#include "network/network_data.h" +#include "network/network_client.h" +#include "network/network_server.h" +#include "network/network_gui.h" + +#include "table/sprites.h" +#include "table/strings.h" + static int _rename_id = 1; static int _rename_what = -1; diff --git a/src/misc.cpp b/src/misc.cpp index 1c65671c2..55a62e532 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -7,8 +7,6 @@ #include "currency.h" #include "landscape.h" #include "news.h" -#include "table/strings.h" -#include "table/sprites.h" #include "saveload.h" #include "engine.h" #include "vehicle_gui.h" @@ -28,6 +26,8 @@ #include "string_func.h" #include "gfx_func.h" +#include "table/strings.h" +#include "table/sprites.h" char _name_array[512][32]; diff --git a/src/misc_cmd.cpp b/src/misc_cmd.cpp index 0e020bd03..8716333e8 100644 --- a/src/misc_cmd.cpp +++ b/src/misc_cmd.cpp @@ -4,7 +4,6 @@ #include "stdafx.h" #include "openttd.h" -#include "table/strings.h" #include "command_func.h" #include "economy_func.h" #include "gui.h" @@ -23,6 +22,8 @@ #include "player_base.h" #include "player_gui.h" +#include "table/strings.h" + /** Change the player's face. * @param tile unused * @param flags operation to perform diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index 3e5ed9633..b0772427e 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -10,9 +10,6 @@ #include "newgrf.h" #include "newgrf_text.h" #include "saveload.h" -#include "table/sprites.h" -#include "table/strings.h" -#include "table/tree_land.h" #include "tile_map.h" #include "gui.h" #include "window_gui.h" @@ -43,6 +40,10 @@ #include "string_func.h" #include "player_gui.h" +#include "table/sprites.h" +#include "table/strings.h" +#include "table/tree_land.h" + /* Variables to display file lists */ FiosItem *_fios_list; SaveLoadDialogMode _saveload_mode; diff --git a/src/music_gui.cpp b/src/music_gui.cpp index 4b187e171..1816147c8 100644 --- a/src/music_gui.cpp +++ b/src/music_gui.cpp @@ -4,8 +4,6 @@ #include "stdafx.h" #include "openttd.h" -#include "table/strings.h" -#include "table/sprites.h" #include "fileio.h" #include "variables.h" #include "music.h" @@ -17,6 +15,9 @@ #include "gfx_func.h" #include "core/math_func.hpp" +#include "table/strings.h" +#include "table/sprites.h" + static byte _music_wnd_cursong; static bool _song_is_active; static byte _cur_playlist[NUM_SONGS_PLAYLIST]; diff --git a/src/namegen.cpp b/src/namegen.cpp index 901c7175c..26b117126 100644 --- a/src/namegen.cpp +++ b/src/namegen.cpp @@ -6,9 +6,10 @@ #include "openttd.h" #include "debug.h" #include "namegen.h" -#include "table/namegen.h" #include "string_func.h" +#include "table/namegen.h" + static inline uint32 SeedChance(int shift_by, int max, uint32 seed) { return (GB(seed, shift_by, 16) * max) >> 16; diff --git a/src/network/core/tcp.cpp b/src/network/core/tcp.cpp index eaed4bd07..a4b763b1a 100644 --- a/src/network/core/tcp.cpp +++ b/src/network/core/tcp.cpp @@ -10,12 +10,13 @@ #include "../../debug.h" #include "../../openttd.h" #include "../../variables.h" -#include "table/strings.h" #include "../network_data.h" #include "packet.h" #include "tcp.h" +#include "table/strings.h" + /** Very ugly temporary hack !!! */ void NetworkTCPSocketHandler::Initialize() { diff --git a/src/network/network.cpp b/src/network/network.cpp index 7b44daa5c..7040a4d71 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -15,7 +15,6 @@ extern const char _openttd_revision[]; #include "../variables.h" #include "../date_func.h" #include "../newgrf_config.h" -#include "table/strings.h" #include "network_client.h" #include "network_server.h" #include "network_udp.h" @@ -37,6 +36,8 @@ extern const char _openttd_revision[]; #include "../core/alloc_func.hpp" #endif /* DEBUG_DUMP_COMMANDS */ +#include "table/strings.h" + /* Check whether NETWORK_NUM_LANDSCAPES is still in sync with NUM_LANDSCAPE */ assert_compile((int)NETWORK_NUM_LANDSCAPES == (int)NUM_LANDSCAPE); diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp index 190f6b944..378e6de56 100644 --- a/src/network/network_client.cpp +++ b/src/network/network_client.cpp @@ -7,7 +7,6 @@ #include "../openttd.h" #include "network_data.h" #include "core/tcp.h" -#include "table/strings.h" #include "network_client.h" #include "network_gamelist.h" #include "network_gui.h" @@ -26,6 +25,8 @@ #include "../player_base.h" #include "../player_gui.h" +#include "table/strings.h" + // This file handles all the client-commands diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index ee7106bcf..7cee89512 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -4,12 +4,9 @@ #include "../stdafx.h" #include "../openttd.h" #include "../strings_func.h" -#include "../table/sprites.h" #include "network.h" #include "../date_func.h" - #include "../fios.h" -#include "table/strings.h" #include "network_data.h" #include "network_client.h" #include "network_gui.h" @@ -29,6 +26,9 @@ #include "../gfx_func.h" #include "../player_func.h" +#include "table/strings.h" +#include "../table/sprites.h" + #define BGC 5 #define BTC 15 diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index bb56bba89..b0f4ed659 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -11,7 +11,6 @@ #include "../train.h" #include "../aircraft.h" #include "../date_func.h" -#include "table/strings.h" #include "network_server.h" #include "network_udp.h" #include "../console.h" @@ -27,6 +26,8 @@ #include "../player_func.h" #include "../player_gui.h" +#include "table/strings.h" + // This file handles all the server-commands static void NetworkHandleCommandQueue(NetworkTCPSocketHandler* cs); diff --git a/src/newgrf.cpp b/src/newgrf.cpp index d1006667b..df6ab668d 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -15,12 +15,10 @@ #include "sprite.h" #include "newgrf.h" #include "variables.h" -#include "table/strings.h" #include "bridge.h" #include "town.h" #include "newgrf_engine.h" #include "newgrf_text.h" -#include "table/sprites.h" #include "fontcache.h" #include "currency.h" #include "landscape.h" @@ -28,15 +26,12 @@ #include "newgrf_house.h" #include "newgrf_sound.h" #include "newgrf_spritegroup.h" -#include "table/town_land.h" #include "cargotype.h" #include "industry.h" #include "newgrf_canal.h" -#include "table/build_industry.h" #include "newgrf_commons.h" #include "newgrf_townname.h" #include "newgrf_industries.h" -#include "table/landscape_sprite.h" #include "gfxinit.h" #include "fios.h" #include "rail.h" @@ -49,6 +44,12 @@ #include "road_func.h" #include "player_base.h" +#include "table/strings.h" +#include "table/sprites.h" +#include "table/town_land.h" +#include "table/build_industry.h" +#include "table/landscape_sprite.h" + /* TTDPatch extended GRF format codec * (c) Petr Baudis 2004 (GPL'd) * Changes by Florian octo Forster are (c) by the OpenTTD development team. diff --git a/src/newgrf_cargo.h b/src/newgrf_cargo.h index 2bad1213e..168e6861e 100644 --- a/src/newgrf_cargo.h +++ b/src/newgrf_cargo.h @@ -7,6 +7,7 @@ #include "newgrf_callbacks.h" #include "cargo_type.h" +#include "gfx_type.h" enum { CC_NOAVAILABLE = 0, ///< No cargo class has been specified diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index 4978b1d54..119463dcb 100644 --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -8,8 +8,6 @@ #include "gui.h" #include "window_gui.h" #include "textbuf_gui.h" -#include "table/strings.h" -#include "table/sprites.h" #include "newgrf.h" #include "newgrf_config.h" #include "strings_func.h" @@ -18,6 +16,9 @@ #include "string_func.h" #include "gfx_func.h" +#include "table/strings.h" +#include "table/sprites.h" + /** Parse an integerlist string and set each found value * @param p the string to be parsed. Each element in the list is seperated by a * comma or a space character diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp index 929e61890..5f7adedf8 100644 --- a/src/newgrf_house.cpp +++ b/src/newgrf_house.cpp @@ -11,9 +11,6 @@ #include "town.h" #include "town_map.h" #include "sprite.h" -#include "table/strings.h" -#include "table/sprites.h" -#include "table/town_land.h" #include "newgrf.h" #include "newgrf_house.h" #include "newgrf_spritegroup.h" @@ -25,6 +22,10 @@ #include "functions.h" #include "player_func.h" +#include "table/strings.h" +#include "table/sprites.h" +#include "table/town_land.h" + static BuildingCounts _building_counts; static HouseClassMapping _class_mapping[HOUSE_CLASS_MAX]; diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp index 4fd63b79f..f4e504945 100644 --- a/src/newgrf_industries.cpp +++ b/src/newgrf_industries.cpp @@ -7,7 +7,6 @@ #include "debug.h" #include "variables.h" #include "landscape.h" -#include "table/strings.h" #include "industry.h" #include "industry_map.h" #include "newgrf.h" @@ -23,6 +22,8 @@ #include "player_func.h" #include "player_base.h" +#include "table/strings.h" + /* Since the industry IDs defined by the GRF file don't necessarily correlate * to those used by the game, the IDs used for overriding old industries must be * translated when the idustry spec is set. */ diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp index 8c4a55634..d9e12ef22 100644 --- a/src/newgrf_industrytiles.cpp +++ b/src/newgrf_industrytiles.cpp @@ -18,13 +18,14 @@ #include "newgrf_text.h" #include "industry_map.h" #include "clear_map.h" -#include "table/sprites.h" -#include "table/strings.h" #include "sprite.h" #include "transparency.h" #include "functions.h" #include "town.h" +#include "table/sprites.h" +#include "table/strings.h" + static uint32 GetGRFParameter(IndustryGfx indtile_id, byte parameter) { const IndustryTileSpec *indtspec = GetIndustryTileSpec(indtile_id); diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp index 13c6da683..cdbdac87e 100644 --- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -9,8 +9,6 @@ #include "landscape.h" #include "debug.h" #include "sprite.h" -#include "table/sprites.h" -#include "table/strings.h" #include "station.h" #include "station_map.h" #include "newgrf.h" @@ -25,6 +23,9 @@ #include "date_func.h" #include "player_func.h" +#include "table/sprites.h" +#include "table/strings.h" + static StationClass station_classes[STAT_CLASS_MAX]; enum { diff --git a/src/newgrf_station.h b/src/newgrf_station.h index ee9050b5e..cb969bc86 100644 --- a/src/newgrf_station.h +++ b/src/newgrf_station.h @@ -9,6 +9,7 @@ #include "newgrf_callbacks.h" #include "newgrf_cargo.h" #include "tile_type.h" +#include "strings_type.h" enum StationClassID { STAT_CLASS_BEGIN = 0, ///< the lowest valid value diff --git a/src/newgrf_text.cpp b/src/newgrf_text.cpp index f1b03e237..c98c7e48b 100644 --- a/src/newgrf_text.cpp +++ b/src/newgrf_text.cpp @@ -13,15 +13,16 @@ #include "debug.h" #include "openttd.h" #include "variables.h" -#include "table/strings.h" #include "newgrf.h" #include "newgrf_text.h" -#include "table/control_codes.h" #include "strings_func.h" #include "core/alloc_func.hpp" #include "newgrf_storage.h" #include "string_func.h" +#include "table/strings.h" +#include "table/control_codes.h" + #define GRFTAB 28 #define TABSIZE 11 diff --git a/src/newgrf_townname.cpp b/src/newgrf_townname.cpp index fdaa66230..f06915b91 100644 --- a/src/newgrf_townname.cpp +++ b/src/newgrf_townname.cpp @@ -8,11 +8,12 @@ #include "stdafx.h" #include "openttd.h" -#include "table/strings.h" #include "newgrf_townname.h" #include "core/alloc_func.hpp" #include "string_func.h" +#include "table/strings.h" + static GRFTownName *_grf_townnames = NULL; GRFTownName *GetGRFTownName(uint32 grfid) diff --git a/src/newgrf_townname.h b/src/newgrf_townname.h index 75ab2bfe7..d1fdb429e 100644 --- a/src/newgrf_townname.h +++ b/src/newgrf_townname.h @@ -2,6 +2,8 @@ #ifndef NEWGRF_TOWNNAME_H #define NEWGRF_TOWNNAME_H +#include "strings_type.h" + /** @file newgrf_townname.h * Header of Action 0F "universal holder" structure and functions */ diff --git a/src/news.h b/src/news.h index 5d9baf94a..20d04f3a3 100644 --- a/src/news.h +++ b/src/news.h @@ -9,6 +9,7 @@ #include "vehicle_type.h" #include "tile_type.h" #include "date_type.h" +#include "strings_type.h" struct NewsItem { StringID string_id; ///< Message text (sometimes also used for storing other info) diff --git a/src/news_gui.cpp b/src/news_gui.cpp index 8a5811a77..922d14b2c 100644 --- a/src/news_gui.cpp +++ b/src/news_gui.cpp @@ -3,8 +3,6 @@ #include "stdafx.h" #include "openttd.h" -#include "table/sprites.h" -#include "table/strings.h" #include "gui.h" #include "window_gui.h" #include "viewport_func.h" @@ -18,6 +16,9 @@ #include "sound_func.h" #include "string_func.h" +#include "table/sprites.h" +#include "table/strings.h" + /** @file news_gui.cpp * * News system is realized as a FIFO queue (in an array) diff --git a/src/oldloader.cpp b/src/oldloader.cpp index 89330fd68..190824503 100644 --- a/src/oldloader.cpp +++ b/src/oldloader.cpp @@ -5,7 +5,6 @@ #include "stdafx.h" #include "openttd.h" #include "station_map.h" -#include "table/strings.h" #include "town.h" #include "industry.h" #include "station.h" @@ -28,6 +27,8 @@ #include "vehicle_func.h" #include "variables.h" +#include "table/strings.h" + enum { HEADER_SIZE = 49, BUFFER_SIZE = 4096, diff --git a/src/openttd.cpp b/src/openttd.cpp index e57901ae0..c3ee5e035 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -9,7 +9,6 @@ #include "saveload.h" #include "openttd.h" -#include "table/strings.h" #include "bridge_map.h" #include "mixer.h" #include "spritecache.h" @@ -79,6 +78,8 @@ #include <stdarg.h> +#include "table/strings.h" + void CallLandscapeTick(); void IncreaseDate(); void DoPaletteAnimations(); diff --git a/src/openttd.h b/src/openttd.h index 40114baf6..8b8f0c0a2 100644 --- a/src/openttd.h +++ b/src/openttd.h @@ -8,8 +8,6 @@ #define VARDEF extern #endif -#include "strings_type.h" - // Forward declarations of structs. struct Depot; struct Waypoint; diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp index cee298a2f..78ebb3120 100644 --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -7,7 +7,6 @@ #include "order.h" #include "airport.h" #include "depot.h" -#include "table/strings.h" #include "waypoint.h" #include "command_func.h" #include "station.h" @@ -24,6 +23,8 @@ #include "settings_type.h" #include "string_func.h" +#include "table/strings.h" + DEFINE_OLD_POOL_GENERIC(Order, Order) /** diff --git a/src/order_gui.cpp b/src/order_gui.cpp index d58489642..3fe32e859 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -6,8 +6,6 @@ #include "openttd.h" #include "road_map.h" #include "station_map.h" -#include "table/sprites.h" -#include "table/strings.h" #include "gui.h" #include "window_gui.h" #include "station.h" @@ -29,6 +27,9 @@ #include "settings_type.h" #include "player_func.h" +#include "table/sprites.h" +#include "table/strings.h" + enum OrderWindowWidgets { ORDER_WIDGET_CLOSEBOX = 0, ORDER_WIDGET_CAPTION, diff --git a/src/os2.cpp b/src/os2.cpp index f82c0881e..f0ebb9291 100644 --- a/src/os2.cpp +++ b/src/os2.cpp @@ -5,7 +5,6 @@ #include "stdafx.h" #include "openttd.h" #include "variables.h" -#include "table/strings.h" #include "gui.h" #include "fileio.h" #include "fios.h" // opendir/readdir/closedir @@ -14,6 +13,8 @@ #include "string_func.h" #include "textbuf_gui.h" +#include "table/strings.h" + #include <dirent.h> #include <unistd.h> #include <sys/stat.h> diff --git a/src/player_func.h b/src/player_func.h index 2017e2cc6..2f698add9 100644 --- a/src/player_func.h +++ b/src/player_func.h @@ -8,6 +8,7 @@ #include "core/math_func.hpp" #include "player_type.h" #include "tile_type.h" +#include "strings_type.h" void ChangeOwnershipOfPlayerItems(PlayerID old_player, PlayerID new_player); void GetNameOfOwner(Owner owner, TileIndex tile); diff --git a/src/player_gui.cpp b/src/player_gui.cpp index afdb26586..3d9d9818c 100644 --- a/src/player_gui.cpp +++ b/src/player_gui.cpp @@ -4,8 +4,6 @@ #include "stdafx.h" #include "openttd.h" -#include "table/sprites.h" -#include "table/strings.h" #include "gui.h" #include "window_gui.h" #include "textbuf_gui.h" @@ -30,6 +28,9 @@ #include "date_func.h" #include "string_func.h" +#include "table/sprites.h" +#include "table/strings.h" + /* player face selection window */ struct facesel_d { PlayerFace face; // player face bits diff --git a/src/players.cpp b/src/players.cpp index a383aa170..70f1ffa82 100644 --- a/src/players.cpp +++ b/src/players.cpp @@ -5,8 +5,6 @@ #include "stdafx.h" #include "openttd.h" #include "engine.h" -#include "table/strings.h" -#include "table/sprites.h" #include "player_func.h" #include "player_gui.h" #include "town.h" @@ -36,6 +34,9 @@ #include "road_func.h" #include "rail.h" +#include "table/strings.h" +#include "table/sprites.h" + Player _players[MAX_PLAYERS]; PlayerByte _local_player; PlayerByte _current_player; diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index 78e8766a8..aabc1d62a 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -11,8 +11,6 @@ #include "tile_cmd.h" #include "rail_map.h" #include "road_map.h" -#include "table/sprites.h" -#include "table/strings.h" #include "landscape.h" #include "town_map.h" #include "tunnel_map.h" @@ -26,7 +24,6 @@ #include "depot.h" #include "waypoint.h" #include "rail.h" -#include "table/railtypes.h" // include table for railtypes #include "newgrf.h" #include "yapf/yapf.h" #include "newgrf_engine.h" @@ -44,6 +41,9 @@ #include "sound_func.h" #include "signal_func.h" +#include "table/sprites.h" +#include "table/strings.h" +#include "table/railtypes.h" const byte _track_sloped_sprites[14] = { 14, 15, 22, 13, diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index 96a1cc176..a2e5d3c97 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -4,8 +4,6 @@ #include "stdafx.h" #include "openttd.h" -#include "table/sprites.h" -#include "table/strings.h" #include "tile_cmd.h" #include "landscape.h" #include "gui.h" @@ -36,6 +34,8 @@ #include "tunnel_map.h" #include "tunnelbridge_map.h" +#include "table/sprites.h" +#include "table/strings.h" static RailType _cur_railtype; static bool _remove_button_clicked; diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp index b8d5025d8..7124a6943 100644 --- a/src/road_cmd.cpp +++ b/src/road_cmd.cpp @@ -11,8 +11,6 @@ #include "road_map.h" #include "road_internal.h" #include "sprite.h" -#include "table/sprites.h" -#include "table/strings.h" #include "tile_cmd.h" #include "landscape.h" #include "town_map.h" @@ -35,6 +33,8 @@ #include "vehicle_base.h" #include "sound_func.h" +#include "table/sprites.h" +#include "table/strings.h" #define M(x) (1 << (x)) /* Level crossings may only be built on these slopes */ diff --git a/src/road_gui.cpp b/src/road_gui.cpp index 5e793adc0..a6349d623 100644 --- a/src/road_gui.cpp +++ b/src/road_gui.cpp @@ -4,8 +4,6 @@ #include "stdafx.h" #include "openttd.h" -#include "table/sprites.h" -#include "table/strings.h" #include "gui.h" #include "window_gui.h" #include "station_gui.h" @@ -25,6 +23,8 @@ #include "sound_func.h" #include "player_func.h" +#include "table/sprites.h" +#include "table/strings.h" static void ShowRVStationPicker(RoadStop::Type rs); static void ShowRoadDepotPicker(); diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index 87b0cfd53..0dd9d955c 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -10,7 +10,6 @@ #include "road_map.h" #include "roadveh.h" #include "station_map.h" -#include "table/strings.h" #include "timetable.h" #include "engine.h" #include "command_func.h" @@ -43,6 +42,7 @@ #include "autoreplace_gui.h" #include "gfx_func.h" +#include "table/strings.h" static const uint16 _roadveh_images[63] = { 0xCD4, 0xCDC, 0xCE4, 0xCEC, 0xCF4, 0xCFC, 0xD0C, 0xD14, diff --git a/src/roadveh_gui.cpp b/src/roadveh_gui.cpp index 87cfcee5f..d851f31ba 100644 --- a/src/roadveh_gui.cpp +++ b/src/roadveh_gui.cpp @@ -6,8 +6,6 @@ #include "openttd.h" #include "debug.h" #include "roadveh.h" -#include "table/sprites.h" -#include "table/strings.h" #include "gui.h" #include "window_gui.h" #include "viewport_func.h" @@ -20,6 +18,8 @@ #include "vehicle_func.h" #include "string_func.h" +#include "table/sprites.h" +#include "table/strings.h" void DrawRoadVehDetails(const Vehicle *v, int x, int y) { diff --git a/src/saveload.cpp b/src/saveload.cpp index ee95c6ac1..e16d7d09d 100644 --- a/src/saveload.cpp +++ b/src/saveload.cpp @@ -22,7 +22,6 @@ #include "saveload.h" #include "network/network.h" #include "variables.h" -#include "table/strings.h" #include "window_func.h" #include "strings_func.h" #include "gfx_func.h" @@ -33,6 +32,8 @@ #include "autoreplace_base.h" #include <list> +#include "table/strings.h" + extern const uint16 SAVEGAME_VERSION = 84; uint16 _sl_version; ///< the major savegame version identifier byte _sl_minor_version; ///< the minor savegame version, DO NOT USE! diff --git a/src/screenshot.cpp b/src/screenshot.cpp index 46e81fc62..68b9bc277 100644 --- a/src/screenshot.cpp +++ b/src/screenshot.cpp @@ -3,7 +3,6 @@ #include "stdafx.h" #include "openttd.h" #include "debug.h" -#include "table/strings.h" #include "fileio.h" #include "viewport_func.h" #include "gfx_func.h" @@ -20,6 +19,8 @@ #include "date_func.h" #include "player_func.h" +#include "table/strings.h" + char _screenshot_format_name[8]; uint _num_screenshot_formats; uint _cur_screenshot_format; diff --git a/src/settings.cpp b/src/settings.cpp index 773cdd45b..0fa495fa7 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -49,6 +49,10 @@ #include "spritecache.h" #include "transparency.h" #include "string_func.h" +#include "gui.h" +#include "town.h" + +#include "table/strings.h" GameOptions _opt; GameOptions _opt_newgame; @@ -1084,11 +1088,7 @@ static void ini_save_setting_list(IniFile *ini, const char *grpname, char **list #define CR SGF_CURRENCY #define NN SGF_NO_NETWORK -#include "table/strings.h" - /* Begin - Callback Functions for the various settings */ -#include "gui.h" -#include "town.h" /* virtual PositionMainToolbar function, calls the right one.*/ static int32 v_PositionMainToolbar(int32 p1) { diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index 28d1105ce..ec7c1d4c9 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -5,8 +5,6 @@ #include "stdafx.h" #include "openttd.h" #include "currency.h" -#include "table/sprites.h" -#include "table/strings.h" #include "gui.h" #include "window_gui.h" #include "textbuf_gui.h" @@ -27,6 +25,9 @@ #include "string_func.h" #include "gfx_func.h" +#include "table/sprites.h" +#include "table/strings.h" + static uint32 _difficulty_click_a; static uint32 _difficulty_click_b; static byte _difficulty_timeout; diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp index a260cef97..04b4713ec 100644 --- a/src/ship_cmd.cpp +++ b/src/ship_cmd.cpp @@ -5,7 +5,6 @@ #include "stdafx.h" #include "openttd.h" #include "ship.h" -#include "table/strings.h" #include "tile_cmd.h" #include "landscape.h" #include "timetable.h" @@ -39,6 +38,7 @@ #include "autoreplace_gui.h" #include "gfx_func.h" +#include "table/strings.h" static const uint16 _ship_sprites[] = {0x0E5D, 0x0E55, 0x0E65, 0x0E6D}; diff --git a/src/ship_gui.cpp b/src/ship_gui.cpp index 8d950c5ee..2a041efa5 100644 --- a/src/ship_gui.cpp +++ b/src/ship_gui.cpp @@ -6,8 +6,6 @@ #include "openttd.h" #include "debug.h" #include "ship.h" -#include "table/strings.h" -#include "table/sprites.h" #include "gui.h" #include "window_gui.h" #include "viewport_func.h" @@ -18,6 +16,9 @@ #include "strings_func.h" #include "vehicle_func.h" +#include "table/strings.h" +#include "table/sprites.h" + void DrawShipImage(const Vehicle *v, int x, int y, VehicleID selection) { DrawSprite(v->GetImage(DIR_W), GetVehiclePalette(v), x + 32, y + 10); diff --git a/src/signs.cpp b/src/signs.cpp index a715763c2..7e593b233 100644 --- a/src/signs.cpp +++ b/src/signs.cpp @@ -4,7 +4,6 @@ #include "stdafx.h" #include "openttd.h" -#include "table/strings.h" #include "landscape.h" #include "player_func.h" #include "signs.h" @@ -20,6 +19,8 @@ #include "map_func.h" #include "string_func.h" +#include "table/strings.h" + SignID _new_sign_id; uint _total_signs; diff --git a/src/signs_gui.cpp b/src/signs_gui.cpp index 6374a0717..abbcda760 100644 --- a/src/signs_gui.cpp +++ b/src/signs_gui.cpp @@ -4,8 +4,6 @@ #include "stdafx.h" #include "openttd.h" -#include "table/strings.h" -#include "table/sprites.h" #include "gui.h" #include "textbuf_gui.h" #include "window_gui.h" @@ -21,6 +19,9 @@ #include "gfx_func.h" #include "viewport_func.h" +#include "table/strings.h" +#include "table/sprites.h" + static const Sign **_sign_sort; static uint _num_sign_sort; diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index 0ca556a1e..7ec992552 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -1,3 +1,4 @@ + /* $Id$ */ /** @file smallmap_gui.cpp */ @@ -9,8 +10,6 @@ #include "industry_map.h" #include "industry.h" #include "station_map.h" -#include "table/strings.h" -#include "table/sprites.h" #include "landscape.h" #include "gui.h" #include "window_gui.h" @@ -29,6 +28,8 @@ #include "vehicle_base.h" #include "sound_func.h" +#include "table/strings.h" +#include "table/sprites.h" static const Widget _smallmap_widgets[] = { { WWT_CLOSEBOX, RESIZE_NONE, 13, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, diff --git a/src/spritecache.cpp b/src/spritecache.cpp index 0f5ba6cd2..861b34097 100644 --- a/src/spritecache.cpp +++ b/src/spritecache.cpp @@ -7,7 +7,6 @@ #include "variables.h" #include "debug.h" #include "spritecache.h" -#include "table/sprites.h" #include "fileio.h" #include "spriteloader/grf.hpp" #include "core/alloc_func.hpp" @@ -17,6 +16,8 @@ #endif /* WITH_PNG */ #include "blitter/factory.hpp" +#include "table/sprites.h" + /* Default of 4MB spritecache */ uint _sprite_cache_size = 4; diff --git a/src/station.cpp b/src/station.cpp index 2581803e8..29314a122 100644 --- a/src/station.cpp +++ b/src/station.cpp @@ -7,8 +7,6 @@ #include "bridge_map.h" #include "debug.h" #include "station_map.h" -#include "table/sprites.h" -#include "table/strings.h" #include "station.h" #include "town.h" #include "news.h" @@ -32,6 +30,9 @@ #include "date_func.h" #include "variables.h" +#include "table/sprites.h" +#include "table/strings.h" + Station::Station(TileIndex tile) { DEBUG(station, cDebugCtorLevel, "I+%3d", index); diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 0a5afbf12..da9018f87 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -11,8 +11,6 @@ #include "tile_cmd.h" #include "landscape.h" #include "station_map.h" -#include "table/sprites.h" -#include "table/strings.h" #include "station.h" #include "viewport_func.h" #include "command_func.h" @@ -46,6 +44,8 @@ #include "string_func.h" #include "signal_func.h" +#include "table/sprites.h" +#include "table/strings.h" DEFINE_OLD_POOL_GENERIC(Station, Station) DEFINE_OLD_POOL_GENERIC(RoadStop, RoadStop) diff --git a/src/station_gui.cpp b/src/station_gui.cpp index d7a768479..380fbe2d5 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -5,7 +5,6 @@ #include "stdafx.h" #include "openttd.h" #include "debug.h" -#include "table/strings.h" #include "gui.h" #include "window_gui.h" #include "textbuf_gui.h" @@ -16,7 +15,6 @@ #include "command_func.h" #include "variables.h" #include "vehicle_gui.h" -#include "table/sprites.h" #include "cargotype.h" #include "station_gui.h" #include "station.h" @@ -26,6 +24,9 @@ #include "viewport_func.h" #include "gfx_func.h" +#include "table/strings.h" +#include "table/sprites.h" + typedef int CDECL StationSortListingTypeFunction(const void*, const void*); static StationSortListingTypeFunction StationNameSorter; diff --git a/src/strgen/strgen.cpp b/src/strgen/strgen.cpp index 1c5bed3a7..1147e7aec 100644 --- a/src/strgen/strgen.cpp +++ b/src/strgen/strgen.cpp @@ -1,10 +1,11 @@ /* $Id$ */ #include "../stdafx.h" -#include "../table/control_codes.h" #include "../core/alloc_func.hpp" #include "../core/endian_func.hpp" #include "../string_func.h" +#include "../table/control_codes.h" + #include <stdio.h> #include <string.h> #include <stdlib.h> diff --git a/src/string.cpp b/src/string.cpp index 2fc71621e..37fbd8942 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -4,11 +4,12 @@ #include "stdafx.h" #include "openttd.h" -#include "table/control_codes.h" #include "debug.h" #include "core/alloc_func.hpp" #include "string_func.h" +#include "table/control_codes.h" + #include <stdarg.h> #include <ctype.h> // required for tolower() diff --git a/src/strings.cpp b/src/strings.cpp index 10e921f70..3a1f11d14 100644 --- a/src/strings.cpp +++ b/src/strings.cpp @@ -5,7 +5,6 @@ #include "stdafx.h" #include "openttd.h" #include "currency.h" -#include "table/strings.h" #include "namegen.h" #include "station.h" #include "town.h" @@ -15,7 +14,6 @@ #include "industry.h" #include "variables.h" #include "newgrf_text.h" -#include "table/control_codes.h" #include "music.h" #include "industry.h" #include "fileio.h" @@ -36,9 +34,10 @@ #include "string_func.h" #include "player_func.h" #include "player_base.h" +#include "fios.h" -/* for opendir/readdir/closedir */ -# include "fios.h" +#include "table/strings.h" +#include "table/control_codes.h" DynamicLanguages _dynlang; char _userstring[128]; diff --git a/src/subsidy_gui.cpp b/src/subsidy_gui.cpp index bec2f7cdb..239f6a430 100644 --- a/src/subsidy_gui.cpp +++ b/src/subsidy_gui.cpp @@ -4,7 +4,6 @@ #include "stdafx.h" #include "openttd.h" -#include "table/strings.h" #include "station.h" #include "industry.h" #include "town.h" @@ -17,6 +16,8 @@ #include "viewport_func.h" #include "gfx_func.h" +#include "table/strings.h" + static void HandleSubsidyClick(int y) { const Subsidy *s; diff --git a/src/table/namegen.h b/src/table/namegen.h index c9695e302..80aa1ece3 100644 --- a/src/table/namegen.h +++ b/src/table/namegen.h @@ -2,7 +2,6 @@ /** @file table/namegen.h Namepart tables for the town name generator */ -#include "../stdafx.h" #include "../core/enum_type.hpp" static const char *name_original_english_1[] = { diff --git a/src/terraform_cmd.cpp b/src/terraform_cmd.cpp index b50e4bf07..27c8eb481 100644 --- a/src/terraform_cmd.cpp +++ b/src/terraform_cmd.cpp @@ -5,7 +5,6 @@ #include "stdafx.h" #include "openttd.h" #include "strings_type.h" -#include "table/strings.h" #include "command_func.h" #include "tile_map.h" #include "tunnel_map.h" @@ -14,6 +13,8 @@ #include "functions.h" #include "economy_func.h" +#include "table/strings.h" + /* * In one terraforming command all four corners of a initial tile can be raised/lowered (though this is not available to the player). * The maximal amount of height modifications is archieved when raising a complete flat land from sea level to MAX_TILE_HEIGHT or vice versa. diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp index a38ce3ddb..cca3ff545 100644 --- a/src/terraform_gui.cpp +++ b/src/terraform_gui.cpp @@ -6,8 +6,6 @@ #include "openttd.h" #include "bridge_map.h" #include "clear_map.h" -#include "table/sprites.h" -#include "table/strings.h" #include "player_func.h" #include "player_base.h" #include "gui.h" @@ -24,6 +22,9 @@ #include "textbuf_gui.h" #include "genworld.h" +#include "table/sprites.h" +#include "table/strings.h" + void CcTerraform(bool success, TileIndex tile, uint32 p1, uint32 p2) { if (success) { diff --git a/src/texteff.cpp b/src/texteff.cpp index 67c8949a7..f1478b5be 100644 --- a/src/texteff.cpp +++ b/src/texteff.cpp @@ -10,9 +10,7 @@ #include "saveload.h" #include "console.h" #include "variables.h" -#include "table/sprites.h" #include "blitter/factory.hpp" -#include <stdarg.h> /* va_list */ #include "texteff.hpp" #include "video/video_driver.hpp" #include "transparency.h" @@ -22,6 +20,10 @@ #include "functions.h" #include "viewport_func.h" +#include "table/sprites.h" + +#include <stdarg.h> /* va_list */ + enum { MAX_TEXTMESSAGE_LENGTH = 200, INIT_NUM_TEXT_MESSAGES = 20, diff --git a/src/tgp.cpp b/src/tgp.cpp index ce44df960..7519df0b0 100644 --- a/src/tgp.cpp +++ b/src/tgp.cpp @@ -6,7 +6,6 @@ #include <math.h> #include "openttd.h" #include "clear_map.h" -#include "table/strings.h" #include "clear_map.h" #include "variables.h" #include "void_map.h" @@ -16,6 +15,8 @@ #include "core/alloc_func.hpp" #include "core/random_func.hpp" +#include "table/strings.h" + /* * * Quickie guide to Perlin Noise diff --git a/src/timetable_cmd.cpp b/src/timetable_cmd.cpp index e46055f1d..c4a7f8724 100644 --- a/src/timetable_cmd.cpp +++ b/src/timetable_cmd.cpp @@ -5,13 +5,13 @@ #include "stdafx.h" #include "openttd.h" #include "variables.h" -#include "table/strings.h" #include "command_func.h" #include "functions.h" #include "window_func.h" #include "vehicle_func.h" #include "vehicle_base.h" +#include "table/strings.h" static void ChangeTimetable(Vehicle *v, VehicleOrderID order_number, uint16 time, bool is_journey) { diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp index cfecc3ed6..29ec66ec0 100644 --- a/src/timetable_gui.cpp +++ b/src/timetable_gui.cpp @@ -5,7 +5,6 @@ #include "stdafx.h" #include "openttd.h" #include "variables.h" -#include "table/strings.h" #include "command_func.h" #include "engine.h" #include "gui.h" @@ -19,6 +18,8 @@ #include "gfx_func.h" #include "player_func.h" +#include "table/strings.h" + static int GetOrderFromTimetableWndPt(Window *w, int y, const Vehicle *v) { /* diff --git a/src/town.h b/src/town.h index 4b734ae9a..16f852a77 100644 --- a/src/town.h +++ b/src/town.h @@ -12,6 +12,7 @@ #include "date_type.h" #include "town_type.h" #include "player_type.h" +#include "strings_type.h" enum { HOUSE_NO_CLASS = 0, diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index f5a1e88ac..2d84ae473 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -8,8 +8,6 @@ #include "debug.h" #include "road_map.h" #include "road_internal.h" /* Cleaning up road bits */ -#include "table/strings.h" -#include "table/sprites.h" #include "landscape.h" #include "town_map.h" #include "tunnel_map.h" @@ -27,7 +25,6 @@ #include "variables.h" #include "bridge.h" #include "bridge_map.h" -#include "table/town_land.h" #include "genworld.h" #include "newgrf.h" #include "newgrf_callbacks.h" @@ -43,6 +40,9 @@ #include "window_func.h" #include "string_func.h" +#include "table/strings.h" +#include "table/sprites.h" +#include "table/town_land.h" /* Initialize the town-pool */ DEFINE_OLD_POOL_GENERIC(Town, Town) diff --git a/src/town_gui.cpp b/src/town_gui.cpp index 99c68967b..38856459c 100644 --- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -5,8 +5,6 @@ #include "stdafx.h" #include "openttd.h" #include "debug.h" -#include "table/sprites.h" -#include "table/strings.h" #include "town.h" #include "viewport_func.h" #include "gfx_func.h" @@ -23,6 +21,9 @@ #include "economy_func.h" #include "core/alloc_func.hpp" +#include "table/sprites.h" +#include "table/strings.h" + enum TownAuthorityWidget { TWA_CLOSEBOX = 0, TWA_CAPTION, diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 1a7d1b8d7..efa820cc1 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -10,7 +10,6 @@ #include "landscape.h" #include "gui.h" #include "station_map.h" -#include "table/strings.h" #include "tunnel_map.h" #include "timetable.h" #include "articulated_vehicles.h" @@ -18,7 +17,6 @@ #include "pathfind.h" #include "npf.h" #include "station.h" -#include "table/train_cmd.h" #include "news.h" #include "engine.h" #include "player_func.h" @@ -49,6 +47,8 @@ #include "autoreplace_gui.h" #include "gfx_func.h" +#include "table/strings.h" +#include "table/train_cmd.h" static bool TrainCheckIfLineEnds(Vehicle *v); static void TrainController(Vehicle *v, bool update_image); diff --git a/src/train_gui.cpp b/src/train_gui.cpp index 2054c3e4c..83407ddce 100644 --- a/src/train_gui.cpp +++ b/src/train_gui.cpp @@ -5,8 +5,6 @@ #include "stdafx.h" #include "openttd.h" #include "debug.h" -#include "table/sprites.h" -#include "table/strings.h" #include "gui.h" #include "window_gui.h" #include "gfx_func.h" @@ -19,6 +17,9 @@ #include "vehicle_func.h" #include "settings_type.h" +#include "table/sprites.h" +#include "table/strings.h" + void CcBuildWagon(bool success, TileIndex tile, uint32 p1, uint32 p2) { Vehicle *v, *found; diff --git a/src/transparency_gui.cpp b/src/transparency_gui.cpp index 063c007fc..f09d73c3a 100644 --- a/src/transparency_gui.cpp +++ b/src/transparency_gui.cpp @@ -2,14 +2,15 @@ #include "stdafx.h" #include "openttd.h" -#include "table/sprites.h" -#include "table/strings.h" #include "gui.h" #include "window_gui.h" #include "variables.h" #include "transparency.h" #include "sound_func.h" +#include "table/sprites.h" +#include "table/strings.h" + TransparencyOptionBits _transparency_opt; enum TransparencyToolbarWidgets{ diff --git a/src/tree_cmd.cpp b/src/tree_cmd.cpp index 0c7a79659..084698b48 100644 --- a/src/tree_cmd.cpp +++ b/src/tree_cmd.cpp @@ -6,9 +6,6 @@ #include "openttd.h" #include "bridge_map.h" #include "clear_map.h" -#include "table/strings.h" -#include "table/sprites.h" -#include "table/tree_land.h" #include "tile_cmd.h" #include "landscape.h" #include "tree_map.h" @@ -23,6 +20,10 @@ #include "player_func.h" #include "sound_func.h" +#include "table/strings.h" +#include "table/sprites.h" +#include "table/tree_land.h" + /** * List of tree placer algorithm. * diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp index 57a56a48a..2642addcc 100644 --- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -10,8 +10,6 @@ #include "bridge_map.h" #include "rail_map.h" #include "road_map.h" -#include "table/sprites.h" -#include "table/strings.h" #include "tile_cmd.h" #include "landscape.h" #include "tunnel_map.h" @@ -28,7 +26,6 @@ #include "autoslope.h" #include "transparency.h" #include "tunnelbridge_map.h" -#include "table/bridge_land.h" #include "strings_func.h" #include "date_func.h" #include "functions.h" @@ -36,6 +33,9 @@ #include "sound_func.h" #include "signal_func.h" +#include "table/sprites.h" +#include "table/strings.h" +#include "table/bridge_land.h" const Bridge orig_bridge[] = { /* diff --git a/src/unix.cpp b/src/unix.cpp index 1151c373a..b1fc16db2 100644 --- a/src/unix.cpp +++ b/src/unix.cpp @@ -4,12 +4,13 @@ #include "stdafx.h" #include "openttd.h" -#include "table/strings.h" #include "variables.h" #include "textbuf_gui.h" #include "functions.h" #include "core/random_func.hpp" +#include "table/strings.h" + #include <dirent.h> #include <unistd.h> #include <sys/stat.h> diff --git a/src/unmovable_cmd.cpp b/src/unmovable_cmd.cpp index ec735edeb..dc4e3f3fe 100644 --- a/src/unmovable_cmd.cpp +++ b/src/unmovable_cmd.cpp @@ -4,8 +4,6 @@ #include "stdafx.h" #include "openttd.h" -#include "table/strings.h" -#include "table/sprites.h" #include "tile_cmd.h" #include "landscape.h" #include "command_func.h" @@ -19,7 +17,6 @@ #include "bridge_map.h" #include "unmovable_map.h" #include "variables.h" -#include "table/unmovable_land.h" #include "genworld.h" #include "bridge.h" #include "autoslope.h" @@ -29,6 +26,10 @@ #include "vehicle_func.h" #include "player_gui.h" +#include "table/strings.h" +#include "table/sprites.h" +#include "table/unmovable_land.h" + /** Destroy a HQ. * During normal gameplay you can only implicitely destroy a HQ when you are * rebuilding it. Otherwise, only water can destroy it. diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 88c771f9f..3c455a481 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -8,8 +8,6 @@ #include "roadveh.h" #include "ship.h" #include "spritecache.h" -#include "table/sprites.h" -#include "table/strings.h" #include "tile_cmd.h" #include "landscape.h" #include "timetable.h" @@ -50,6 +48,9 @@ #include "autoreplace_gui.h" #include "string_func.h" +#include "table/sprites.h" +#include "table/strings.h" + #define INVALID_COORD (0x7fffffff) #define GEN_HASH(x, y) ((GB((y), 6, 6) << 6) + GB((x), 7, 6)) diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index b0fb3b2dd..bbe21ccd9 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -7,8 +7,6 @@ #include "debug.h" #include "player_func.h" #include "station.h" -#include "table/sprites.h" -#include "table/strings.h" #include "engine.h" #include "gui.h" #include "window_gui.h" @@ -37,6 +35,9 @@ #include "core/alloc_func.hpp" #include "string_func.h" +#include "table/sprites.h" +#include "table/strings.h" + struct Sorting { Listing aircraft; Listing roadveh; diff --git a/src/viewport.cpp b/src/viewport.cpp index 31f64163a..19da9ac95 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -8,8 +8,6 @@ #include "tile_cmd.h" #include "gui.h" #include "spritecache.h" -#include "table/sprites.h" -#include "table/strings.h" #include "landscape.h" #include "viewport_func.h" #include "station.h" @@ -27,6 +25,9 @@ #include "vehicle_func.h" #include "player_func.h" +#include "table/sprites.h" +#include "table/strings.h" + #define VIEWPORT_DRAW_MEM (65536 * 2) PlaceProc *_place_proc; diff --git a/src/viewport_func.h b/src/viewport_func.h index dbdd69327..399dae45d 100644 --- a/src/viewport_func.h +++ b/src/viewport_func.h @@ -8,6 +8,7 @@ #include "gfx_type.h" #include "viewport_type.h" #include "vehicle_type.h" +#include "strings_type.h" void SetSelectionRed(bool); diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp index 76c69d59d..1e709273b 100644 --- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -8,8 +8,6 @@ #include "bridge.h" #include "cmd_helper.h" #include "station_map.h" -#include "table/sprites.h" -#include "table/strings.h" #include "tile_cmd.h" #include "landscape.h" #include "viewport_func.h" @@ -35,6 +33,8 @@ #include "variables.h" #include "player_func.h" +#include "table/sprites.h" +#include "table/strings.h" static Vehicle *FindFloodableVehicleOnTile(TileIndex tile); static void FloodVehicle(Vehicle *v); diff --git a/src/waypoint.cpp b/src/waypoint.cpp index a9b1697ca..0275e7686 100644 --- a/src/waypoint.cpp +++ b/src/waypoint.cpp @@ -16,7 +16,6 @@ #include "town.h" #include "waypoint.h" #include "variables.h" -#include "table/strings.h" #include "yapf/yapf.h" #include "newgrf.h" #include "misc/autoptr.hpp" @@ -32,6 +31,7 @@ #include "signal_func.h" #include "player_func.h" +#include "table/strings.h" enum { MAX_WAYPOINTS_PER_TOWN = 64, diff --git a/src/widget.cpp b/src/widget.cpp index e45e38653..943da370b 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -6,12 +6,12 @@ #include "openttd.h" #include "core/math_func.hpp" #include "player_func.h" -#include "table/sprites.h" -#include "table/strings.h" #include "gfx_func.h" #include "window_gui.h" #include "window_func.h" +#include "table/sprites.h" +#include "table/strings.h" static Point HandleScrollbarHittest(const Scrollbar *sb, int top, int bottom) { diff --git a/src/window.cpp b/src/window.cpp index 5253244f3..dba76b16a 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -11,7 +11,6 @@ #include "console.h" #include "viewport_func.h" #include "variables.h" -#include "table/sprites.h" #include "genworld.h" #include "blitter/factory.hpp" #include "window_gui.h" @@ -20,6 +19,8 @@ #include "map_func.h" #include "vehicle_base.h" +#include "table/sprites.h" + /* delta between mouse cursor and upper left corner of dragged window */ static Point _drag_delta; diff --git a/src/window_gui.h b/src/window_gui.h index 277ef3c27..67b936115 100644 --- a/src/window_gui.h +++ b/src/window_gui.h @@ -9,6 +9,7 @@ #include "vehicle_type.h" #include "viewport_type.h" #include "player_type.h" +#include "strings_type.h" /** * The maximum number of windows that can be opened. |