Mercurial > hg > openttd
changeset 8264:2495310e220f draft
(svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h.
line wrap: on
line diff
--- 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 @@ }; -#include "../../table/ai_rail.h" - static TrackBits GetRailTrackStatus(TileIndex tile) { uint32 r = GetTileTrackStatus(tile, TRANSPORT_RAIL, 0);
--- 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
--- 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;
--- 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) *
--- 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();
--- 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 */
--- 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;
--- 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)
--- 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;
--- a/src/blitter/32bpp_simple.cpp +++ b/src/blitter/32bpp_simple.cpp @@ -4,8 +4,9 @@ #include "../gfx_func.h" #include "../zoom_func.h" #include "../debug.h" +#include "32bpp_simple.hpp" + #include "../table/sprites.h" -#include "32bpp_simple.hpp" static FBlitter_32bppSimple iFBlitter_32bppSimple;
--- 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;
--- 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 {
--- 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];
--- 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;
--- 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,8 +16,11 @@ #include "tile_cmd.h" #include "functions.h" #include "economy_func.h" +#include "viewport_func.h" + +#include "table/strings.h" +#include "table/sprites.h" #include "table/clear_land.h" -#include "viewport_func.h" static CommandCost ClearTile_Clear(TileIndex tile, byte flags) {
--- 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; /**
--- 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
--- 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 @@ return true; } -#ifdef ENABLE_NETWORK - #include "table/strings.h" -#endif /* ENABLE_NETWORK */ - DEF_CONSOLE_CMD(ConPlayers) { Player *p;
--- a/src/currency.cpp +++ b/src/currency.cpp @@ -7,8 +7,9 @@ #include "currency.h" #include "news.h" #include "variables.h" +#include "date_func.h" + #include "table/strings.h" -#include "date_func.h" // exchange rate prefix symbol_pos // | separator | postfix |
--- 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,
--- 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) /**
--- 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.
--- 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,
--- 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();
--- a/src/dummy_land.cpp +++ b/src/dummy_land.cpp @@ -4,11 +4,12 @@ #include "stdafx.h" #include "openttd.h" -#include "table/strings.h" #include "tile_cmd.h" #include "command_func.h" +#include "viewport_func.h" + +#include "table/strings.h" #include "table/sprites.h" -#include "viewport_func.h" static void DrawTile_Dummy(TileInfo *ti) {
--- 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. *
--- 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) {
--- 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];
--- 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
--- 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) {
--- 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;
--- 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
--- 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" +#include "table/sprites.h" +#include "table/control_codes.h" + #ifdef WITH_FREETYPE - #include <ft2build.h> #include FT_FREETYPE_H #include FT_GLYPH_H
--- 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();
--- 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. */
--- 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;
--- 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
--- 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;
--- 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
--- 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;
--- a/src/gui.h +++ b/src/gui.h @@ -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);
--- 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
--- 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,
--- 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);
--- 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 */
--- 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},
--- 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,
--- 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;
--- 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];
--- 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
--- 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;
--- 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];
--- a/src/namegen.cpp +++ b/src/namegen.cpp @@ -6,8 +6,9 @@ #include "openttd.h" #include "debug.h" #include "namegen.h" +#include "string_func.h" + #include "table/namegen.h" -#include "string_func.h" static inline uint32 SeedChance(int shift_by, int max, uint32 seed) {
--- 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() {
--- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -15,7 +15,6 @@ #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 @@ #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);
--- 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
--- 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
--- 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);
--- 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.
--- 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
--- 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
--- 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];
--- 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. */
--- 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);
--- 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 {
--- 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
--- 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
--- 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)
--- 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 */
--- 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)
--- 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)
--- 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,
--- 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();
--- 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;
--- 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) /**
--- 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,
--- 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>
--- 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);
--- 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
--- 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;
--- 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,
--- 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;
--- 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 */
--- 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();
--- 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,
--- 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) {
--- 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!
--- 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;
--- 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 @@ #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) {
--- 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;
--- 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};
--- 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);
--- 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;
--- 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;
--- 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},
--- 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;
--- 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);
--- 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)
--- 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;
--- 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>
--- 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()
--- 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];
--- 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;
--- 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[] = {
--- 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.
--- 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) {
--- 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,
--- 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
--- 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) {
--- 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) { /*
--- 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,
--- 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)
--- 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,
--- 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);
--- 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;
--- 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{
--- 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. *
--- 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[] = { /*
--- 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>
--- 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.
--- 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))
--- 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;
--- 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;
--- 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);
--- 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);
--- 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,
--- 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) {
--- 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;