# HG changeset patch # User rubidium # Date 1198266567 0 # Node ID dd6d21dc99c183dce73497f9cc8a9319cdc9d0c7 # Parent 31b7784db761a3d308a10ba0f278517e7a0138b6 (svn r11675) -Codechange: split the string types from the string functions. diff -r 31b7784db761 -r dd6d21dc99c1 src/aircraft_cmd.cpp --- a/src/aircraft_cmd.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/aircraft_cmd.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -10,7 +10,6 @@ #include "functions.h" #include "landscape.h" #include "station_map.h" -#include "strings.h" #include "table/strings.h" #include "map.h" #include "vehicle.h" @@ -33,6 +32,7 @@ #include "date.h" #include "spritecache.h" #include "cargotype.h" +#include "strings_func.h" void Aircraft::UpdateDeltaXY(Direction direction) { diff -r 31b7784db761 -r dd6d21dc99c1 src/aircraft_gui.cpp --- a/src/aircraft_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/aircraft_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -9,7 +9,6 @@ #include "functions.h" #include "table/sprites.h" #include "table/strings.h" -#include "strings.h" #include "map.h" #include "gui.h" #include "vehicle.h" @@ -21,6 +20,7 @@ #include "depot.h" #include "vehicle_gui.h" #include "newgrf_engine.h" +#include "strings_func.h" /** * Draw the details for the given vehicle at the position (x,y) diff -r 31b7784db761 -r dd6d21dc99c1 src/autoreplace_cmd.cpp --- a/src/autoreplace_cmd.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/autoreplace_cmd.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -17,8 +17,8 @@ #include "aircraft.h" #include "cargotype.h" #include "group.h" -#include "strings.h" #include "order.h" +#include "strings_func.h" /* * move the cargo from one engine to another if possible diff -r 31b7784db761 -r dd6d21dc99c1 src/autoreplace_gui.cpp --- a/src/autoreplace_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/autoreplace_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -8,7 +8,6 @@ #include "functions.h" #include "table/sprites.h" #include "table/strings.h" -#include "strings.h" #include "gui.h" #include "command.h" #include "variables.h" @@ -16,7 +15,7 @@ #include "newgrf_engine.h" #include "group.h" #include "rail.h" - +#include "strings_func.h" static RailType _railtype_selected_in_replace_gui; diff -r 31b7784db761 -r dd6d21dc99c1 src/bridge_gui.cpp --- a/src/bridge_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/bridge_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -5,7 +5,6 @@ #include "stdafx.h" #include "openttd.h" #include "table/strings.h" -#include "strings.h" #include "functions.h" #include "map.h" #include "gui.h" @@ -16,6 +15,7 @@ #include "sound.h" #include "variables.h" #include "bridge.h" +#include "strings_func.h" static struct BridgeData { uint8 last_size; diff -r 31b7784db761 -r dd6d21dc99c1 src/build_vehicle_gui.cpp --- a/src/build_vehicle_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/build_vehicle_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -26,10 +26,10 @@ #include "vehicle_gui.h" #include "newgrf_engine.h" #include "date.h" -#include "strings.h" #include "cargotype.h" #include "group.h" #include "road_map.h" +#include "strings_func.h" enum BuildVehicleWidgets { diff -r 31b7784db761 -r dd6d21dc99c1 src/command.cpp --- a/src/command.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/command.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -5,7 +5,6 @@ #include "stdafx.h" #include "openttd.h" #include "table/strings.h" -#include "strings.h" #include "functions.h" #include "landscape.h" #include "map.h" @@ -17,6 +16,7 @@ #include "variables.h" #include "genworld.h" #include "newgrf_storage.h" +#include "strings_func.h" const char *_cmd_text = NULL; diff -r 31b7784db761 -r dd6d21dc99c1 src/console_cmds.cpp --- a/src/console_cmds.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/console_cmds.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -22,11 +22,11 @@ #include "fileio.h" #include "vehicle.h" #include "station.h" -#include "strings.h" #include "screenshot.h" #include "genworld.h" #include "date.h" #include "network/network.h" +#include "strings_func.h" // ** scriptfile handling ** // static FILE *_script_file; diff -r 31b7784db761 -r dd6d21dc99c1 src/depot_gui.cpp --- a/src/depot_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/depot_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -10,7 +10,6 @@ #include "ship.h" #include "aircraft.h" #include "table/strings.h" -#include "strings.h" #include "table/sprites.h" #include "gui.h" #include "textbuf_gui.h" @@ -23,6 +22,7 @@ #include "station_map.h" #include "newgrf_engine.h" #include "spritecache.h" +#include "strings_func.h" /* * Since all depot window sizes aren't the same, we need to modify sizes a little. diff -r 31b7784db761 -r dd6d21dc99c1 src/disaster_cmd.cpp --- a/src/disaster_cmd.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/disaster_cmd.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -23,7 +23,6 @@ #include "industry_map.h" #include "station_map.h" #include "table/strings.h" -#include "strings.h" #include "map.h" #include "vehicle.h" #include "command.h" @@ -38,6 +37,7 @@ #include "variables.h" #include "table/sprites.h" #include "date.h" +#include "strings_func.h" enum DisasterSubType { ST_Zeppeliner, diff -r 31b7784db761 -r dd6d21dc99c1 src/economy.cpp --- a/src/economy.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/economy.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -7,7 +7,6 @@ #include "currency.h" #include "functions.h" #include "landscape.h" -#include "strings.h" // XXX InjectDParam() #include "table/strings.h" #include "table/sprites.h" #include "map.h" @@ -41,6 +40,7 @@ #include "cargotype.h" #include "player_face.h" #include "group.h" +#include "strings_func.h" /** * Multiply two integer values and shift the results to right. diff -r 31b7784db761 -r dd6d21dc99c1 src/engine.cpp --- a/src/engine.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/engine.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -22,8 +22,8 @@ #include "table/engines.h" #include "group.h" #include "string.h" -#include "strings.h" #include "misc/autoptr.hpp" +#include "strings_func.h" EngineInfo _engine_info[TOTAL_NUM_ENGINES]; RailVehicleInfo _rail_vehicle_info[NUM_TRAIN_ENGINES]; diff -r 31b7784db761 -r dd6d21dc99c1 src/engine_gui.cpp --- a/src/engine_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/engine_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -5,7 +5,6 @@ #include "stdafx.h" #include "openttd.h" #include "table/strings.h" -#include "strings.h" #include "table/sprites.h" #include "functions.h" #include "gui.h" @@ -17,6 +16,7 @@ #include "news.h" #include "variables.h" #include "newgrf_engine.h" +#include "strings_func.h" static StringID GetEngineCategoryName(EngineID engine) diff -r 31b7784db761 -r dd6d21dc99c1 src/genworld_gui.cpp --- a/src/genworld_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/genworld_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -12,7 +12,6 @@ #include "window_gui.h" #include "textbuf_gui.h" #include "gfx.h" -#include "strings.h" #include "gfxinit.h" #include "player.h" #include "command.h" @@ -26,6 +25,7 @@ #include "thread.h" #include "date.h" #include "newgrf_config.h" +#include "strings_func.h" /** * In what 'mode' the GenerateLandscapeWindowProc is. diff -r 31b7784db761 -r dd6d21dc99c1 src/gfx.cpp --- a/src/gfx.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/gfx.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -6,7 +6,6 @@ #include "openttd.h" #include "functions.h" #include "spritecache.h" -#include "strings.h" #include "string.h" #include "gfx.h" #include "table/palettes.h" @@ -20,6 +19,7 @@ #include "texteff.hpp" #include "blitter/factory.hpp" #include "video/video_driver.hpp" +#include "strings_func.h" byte _dirkeys; ///< 1 = left, 2 = up, 4 = right, 8 = down bool _fullscreen; diff -r 31b7784db761 -r dd6d21dc99c1 src/graph_gui.cpp --- a/src/graph_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/graph_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -5,7 +5,6 @@ #include "stdafx.h" #include "openttd.h" #include "table/strings.h" -#include "strings.h" #include "table/sprites.h" #include "functions.h" #include "gui.h" @@ -17,6 +16,7 @@ #include "date.h" #include "helpers.hpp" #include "cargotype.h" +#include "strings_func.h" /* Bitmasks of player and cargo indices that shouldn't be drawn. */ static uint _legend_excluded_players; diff -r 31b7784db761 -r dd6d21dc99c1 src/group_cmd.cpp --- a/src/group_cmd.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/group_cmd.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -17,8 +17,8 @@ #include "aircraft.h" #include "string.h" #include "vehicle_gui.h" -#include "strings.h" #include "misc/autoptr.hpp" +#include "strings_func.h" /** * Update the num engines of a groupID. Decrease the old one and increase the new one diff -r 31b7784db761 -r dd6d21dc99c1 src/group_gui.cpp --- a/src/group_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/group_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -21,8 +21,8 @@ #include "group.h" #include "helpers.hpp" #include "viewport.h" -#include "strings.h" #include "debug.h" +#include "strings_func.h" struct Sorting { diff -r 31b7784db761 -r dd6d21dc99c1 src/industry_cmd.cpp --- a/src/industry_cmd.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/industry_cmd.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -9,7 +9,6 @@ #include "industry_map.h" #include "station_map.h" #include "table/strings.h" -#include "strings.h" #include "table/sprites.h" #include "map.h" #include "train.h" @@ -40,6 +39,7 @@ #include "autoslope.h" #include "transparency.h" #include "water.h" +#include "strings_func.h" void ShowIndustryViewWindow(int industry); void BuildOilRig(TileIndex tile); diff -r 31b7784db761 -r dd6d21dc99c1 src/industry_gui.cpp --- a/src/industry_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/industry_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -6,7 +6,6 @@ #include "openttd.h" #include "debug.h" #include "functions.h" -#include "strings.h" #include "table/strings.h" #include "table/sprites.h" #include "map.h" @@ -26,6 +25,7 @@ #include "newgrf_industries.h" #include "newgrf_text.h" #include "date.h" +#include "strings_func.h" bool _ignore_restrictions; diff -r 31b7784db761 -r dd6d21dc99c1 src/intro_gui.cpp --- a/src/intro_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/intro_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -5,7 +5,6 @@ #include "stdafx.h" #include "openttd.h" #include "table/strings.h" -#include "strings.h" #include "table/sprites.h" #include "functions.h" #include "gui.h" @@ -20,6 +19,7 @@ #include "genworld.h" #include "network/network_gui.h" #include "newgrf.h" +#include "strings_func.h" static const Widget _select_game_widgets[] = { { WWT_CAPTION, RESIZE_NONE, 13, 0, 335, 0, 13, STR_0307_OPENTTD, STR_NULL}, diff -r 31b7784db761 -r dd6d21dc99c1 src/main_gui.cpp --- a/src/main_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/main_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -9,7 +9,6 @@ #include "functions.h" #include "spritecache.h" #include "station.h" -#include "strings.h" #include "table/sprites.h" #include "table/strings.h" #include "map.h" @@ -51,6 +50,7 @@ #include "network/network_gui.h" #include "industry.h" #include "transparency.h" +#include "strings_func.h" static int _rename_id = 1; static int _rename_what = -1; diff -r 31b7784db761 -r dd6d21dc99c1 src/misc_cmd.cpp --- a/src/misc_cmd.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/misc_cmd.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -18,7 +18,7 @@ #include "variables.h" #include "livery.h" #include "player_face.h" -#include "strings.h" +#include "strings_func.h" /** Change the player's face. * @param tile unused diff -r 31b7784db761 -r dd6d21dc99c1 src/misc_gui.cpp --- a/src/misc_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/misc_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -11,10 +11,8 @@ #include "newgrf.h" #include "newgrf_text.h" #include "saveload.h" -#include "strings.h" #include "table/sprites.h" #include "table/strings.h" -#include "strings.h" #include "table/tree_land.h" #include "map.h" #include "tile_map.h" @@ -39,8 +37,7 @@ #include "date.h" #include "cargotype.h" #include "player_face.h" -#include "fileio.h" - +#include "strings_func.h" #include "fileio.h" #include "fios.h" /* Variables to display file lists */ diff -r 31b7784db761 -r dd6d21dc99c1 src/music_gui.cpp --- a/src/music_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/music_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -6,7 +6,6 @@ #include "openttd.h" #include "table/strings.h" #include "table/sprites.h" -#include "strings.h" #include "functions.h" #include "fileio.h" #include "gfx.h" @@ -15,6 +14,7 @@ #include "music.h" #include "music/music_driver.hpp" #include "window_gui.h" +#include "strings_func.h" static byte _music_wnd_cursong; static bool _song_is_active; diff -r 31b7784db761 -r dd6d21dc99c1 src/network/network.cpp --- a/src/network/network.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/network/network.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -11,7 +11,7 @@ #include "../debug.h" #include "../functions.h" #include "../string.h" -#include "../strings.h" +#include "../strings_func.h" #include "../map.h" #include "../command.h" #include "../variables.h" diff -r 31b7784db761 -r dd6d21dc99c1 src/network/network_client.cpp --- a/src/network/network_client.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/network/network_client.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -6,7 +6,6 @@ #include "../debug.h" #include "../string.h" #include "../openttd.h" -#include "../strings.h" #include "network_data.h" #include "core/tcp.h" #include "../date.h" @@ -23,6 +22,7 @@ #include "../helpers.hpp" #include "../fileio.h" #include "../md5.h" +#include "../strings_func.h" // This file handles all the client-commands diff -r 31b7784db761 -r dd6d21dc99c1 src/network/network_gui.cpp --- a/src/network/network_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/network/network_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -4,7 +4,7 @@ #include "../stdafx.h" #include "../openttd.h" #include "../string.h" -#include "../strings.h" +#include "../strings_func.h" #include "../table/sprites.h" #include "network.h" #include "../date.h" diff -r 31b7784db761 -r dd6d21dc99c1 src/network/network_server.cpp --- a/src/network/network_server.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/network/network_server.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -6,7 +6,7 @@ #include "../openttd.h" // XXX StringID #include "../debug.h" #include "../string.h" -#include "../strings.h" +#include "../strings_func.h" #include "network_data.h" #include "core/tcp.h" #include "../train.h" diff -r 31b7784db761 -r dd6d21dc99c1 src/newgrf.cpp --- a/src/newgrf.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/newgrf.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -18,7 +18,6 @@ #include "newgrf.h" #include "variables.h" #include "string.h" -#include "strings.h" #include "table/strings.h" #include "bridge.h" #include "town.h" @@ -49,6 +48,7 @@ #include "gfxinit.h" #include "fios.h" #include "rail.h" +#include "strings_func.h" /* TTDPatch extended GRF format codec * (c) Petr Baudis 2004 (GPL'd) diff -r 31b7784db761 -r dd6d21dc99c1 src/newgrf_gui.cpp --- a/src/newgrf_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/newgrf_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -14,8 +14,8 @@ #include "table/sprites.h" #include "newgrf.h" #include "newgrf_config.h" -#include "strings.h" #include "helpers.hpp" +#include "strings_func.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 diff -r 31b7784db761 -r dd6d21dc99c1 src/newgrf_house.cpp --- a/src/newgrf_house.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/newgrf_house.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -14,7 +14,6 @@ #include "town_map.h" #include "sound.h" #include "sprite.h" -#include "strings.h" #include "table/strings.h" #include "table/sprites.h" #include "table/town_land.h" diff -r 31b7784db761 -r dd6d21dc99c1 src/newgrf_text.cpp --- a/src/newgrf_text.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/newgrf_text.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -13,7 +13,6 @@ #include "debug.h" #include "openttd.h" #include "string.h" -#include "strings.h" #include "variables.h" #include "table/strings.h" #include "newgrf.h" @@ -21,6 +20,7 @@ #include "table/control_codes.h" #include "helpers.hpp" #include "date.h" +#include "strings_func.h" #define GRFTAB 28 #define TABSIZE 11 diff -r 31b7784db761 -r dd6d21dc99c1 src/news_gui.cpp --- a/src/news_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/news_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -4,7 +4,6 @@ #include "stdafx.h" #include "openttd.h" #include "functions.h" -#include "strings.h" #include "table/sprites.h" #include "table/strings.h" #include "gui.h" @@ -18,6 +17,7 @@ #include "date.h" #include "string.h" #include "transparency.h" +#include "strings_func.h" /** @file news_gui.cpp * diff -r 31b7784db761 -r dd6d21dc99c1 src/openttd.cpp --- a/src/openttd.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/openttd.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -13,12 +13,10 @@ #include "openttd.h" #include "table/strings.h" -#include "strings.h" #include "bridge_map.h" #include "functions.h" #include "mixer.h" #include "spritecache.h" -#include "strings.h" #include "gfx.h" #include "gfxinit.h" #include "gui.h" @@ -67,6 +65,7 @@ #include "sound/sound_driver.hpp" #include "music/music_driver.hpp" #include "video/video_driver.hpp" +#include "strings_func.h" #include "bridge_map.h" #include "clear_map.h" diff -r 31b7784db761 -r dd6d21dc99c1 src/openttd.h --- a/src/openttd.h Fri Dec 21 19:21:21 2007 +0000 +++ b/src/openttd.h Fri Dec 21 19:49:27 2007 +0000 @@ -9,6 +9,7 @@ #endif #include "helpers.hpp" +#include "strings_type.h" struct Oblong { int x, y; @@ -49,8 +50,6 @@ }; typedef uint16 EngineID; typedef uint16 UnitID; -typedef uint16 StringID; -static const StringID INVALID_STRING_ID = 0xFFFF; typedef EngineID *EngineList; ///< engine list type placeholder acceptable for C code (see helpers.cpp) @@ -514,69 +513,6 @@ EXPENSES_OTHER = 12, }; -enum { - MAX_LANG = 64, -}; - -// special string constants -enum SpecialStrings { - - // special strings for town names. the town name is generated dynamically on request. - SPECSTR_TOWNNAME_START = 0x20C0, - SPECSTR_TOWNNAME_ENGLISH = SPECSTR_TOWNNAME_START, - SPECSTR_TOWNNAME_FRENCH, - SPECSTR_TOWNNAME_GERMAN, - SPECSTR_TOWNNAME_AMERICAN, - SPECSTR_TOWNNAME_LATIN, - SPECSTR_TOWNNAME_SILLY, - SPECSTR_TOWNNAME_SWEDISH, - SPECSTR_TOWNNAME_DUTCH, - SPECSTR_TOWNNAME_FINNISH, - SPECSTR_TOWNNAME_POLISH, - SPECSTR_TOWNNAME_SLOVAKISH, - SPECSTR_TOWNNAME_NORWEGIAN, - SPECSTR_TOWNNAME_HUNGARIAN, - SPECSTR_TOWNNAME_AUSTRIAN, - SPECSTR_TOWNNAME_ROMANIAN, - SPECSTR_TOWNNAME_CZECH, - SPECSTR_TOWNNAME_SWISS, - SPECSTR_TOWNNAME_DANISH, - SPECSTR_TOWNNAME_TURKISH, - SPECSTR_TOWNNAME_ITALIAN, - SPECSTR_TOWNNAME_CATALAN, - SPECSTR_TOWNNAME_LAST = SPECSTR_TOWNNAME_CATALAN, - - // special strings for player names on the form "TownName transport". - SPECSTR_PLAYERNAME_START = 0x70EA, - SPECSTR_PLAYERNAME_ENGLISH = SPECSTR_PLAYERNAME_START, - SPECSTR_PLAYERNAME_FRENCH, - SPECSTR_PLAYERNAME_GERMAN, - SPECSTR_PLAYERNAME_AMERICAN, - SPECSTR_PLAYERNAME_LATIN, - SPECSTR_PLAYERNAME_SILLY, - SPECSTR_PLAYERNAME_LAST = SPECSTR_PLAYERNAME_SILLY, - - SPECSTR_ANDCO_NAME = 0x70E6, - SPECSTR_PRESIDENT_NAME = 0x70E7, - SPECSTR_SONGNAME = 0x70E8, - - // reserve MAX_LANG strings for the *.lng files - SPECSTR_LANGUAGE_START = 0x7100, - SPECSTR_LANGUAGE_END = SPECSTR_LANGUAGE_START + MAX_LANG - 1, - - // reserve 32 strings for various screen resolutions - SPECSTR_RESOLUTION_START = SPECSTR_LANGUAGE_END + 1, - SPECSTR_RESOLUTION_END = SPECSTR_RESOLUTION_START + 0x1F, - - // reserve 32 strings for screenshot formats - SPECSTR_SCREENSHOT_START = SPECSTR_RESOLUTION_END + 1, - SPECSTR_SCREENSHOT_END = SPECSTR_SCREENSHOT_START + 0x1F, - - // Used to implement SetDParamStr - STR_SPEC_DYNSTRING = 0xF800, - STR_SPEC_USERSTRING = 0xF808, -}; - typedef void PlaceProc(TileIndex tile); enum { diff -r 31b7784db761 -r dd6d21dc99c1 src/order_cmd.cpp --- a/src/order_cmd.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/order_cmd.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -18,8 +18,8 @@ #include "saveload.h" #include "vehicle_gui.h" #include "cargotype.h" -#include "strings.h" #include "aircraft.h" +#include "strings_func.h" DEFINE_OLD_POOL_GENERIC(Order, Order) diff -r 31b7784db761 -r dd6d21dc99c1 src/order_gui.cpp --- a/src/order_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/order_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -8,7 +8,6 @@ #include "station_map.h" #include "table/sprites.h" #include "table/strings.h" -#include "strings.h" #include "functions.h" #include "map.h" #include "gui.h" @@ -27,6 +26,7 @@ #include "timetable.h" #include "cargotype.h" #include "order.h" +#include "strings_func.h" enum OrderWindowWidgets { ORDER_WIDGET_CLOSEBOX = 0, diff -r 31b7784db761 -r dd6d21dc99c1 src/player_gui.cpp --- a/src/player_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/player_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -6,7 +6,6 @@ #include "openttd.h" #include "table/sprites.h" #include "table/strings.h" -#include "strings.h" #include "functions.h" #include "gui.h" #include "window_gui.h" @@ -28,6 +27,7 @@ #include "network/network_client.h" #include "network/network_gui.h" #include "player_face.h" +#include "strings_func.h" static void DoShowPlayerFinances(PlayerID player, bool show_small, bool show_stickied); static void DoSelectPlayerFace(PlayerID player, bool show_big); diff -r 31b7784db761 -r dd6d21dc99c1 src/players.cpp --- a/src/players.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/players.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -7,7 +7,6 @@ #include "engine.h" #include "functions.h" #include "string.h" -#include "strings.h" #include "table/strings.h" #include "table/sprites.h" #include "map.h" @@ -30,6 +29,7 @@ #include "settings.h" #include "window_func.h" #include "tile_map.h" +#include "strings_func.h" /** * Sets the local player and updates the patch settings that are set on a diff -r 31b7784db761 -r dd6d21dc99c1 src/rail_gui.cpp --- a/src/rail_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/rail_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -6,7 +6,6 @@ #include "openttd.h" #include "table/sprites.h" #include "table/strings.h" -#include "strings.h" #include "functions.h" #include "landscape.h" #include "date.h" @@ -26,6 +25,7 @@ #include "newgrf_callbacks.h" #include "newgrf_station.h" #include "train.h" +#include "strings_func.h" #include "bridge_map.h" #include "rail_map.h" diff -r 31b7784db761 -r dd6d21dc99c1 src/road_cmd.cpp --- a/src/road_cmd.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/road_cmd.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -13,7 +13,6 @@ #include "sprite.h" #include "table/sprites.h" #include "table/strings.h" -#include "strings.h" #include "functions.h" #include "map.h" #include "landscape.h" @@ -35,6 +34,7 @@ #include "transparency.h" #include "tunnelbridge_map.h" #include "window_func.h" +#include "strings_func.h" #define M(x) (1 << (x)) diff -r 31b7784db761 -r dd6d21dc99c1 src/road_gui.cpp --- a/src/road_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/road_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -6,7 +6,6 @@ #include "openttd.h" #include "table/sprites.h" #include "table/strings.h" -#include "strings.h" #include "functions.h" #include "map.h" #include "gui.h" diff -r 31b7784db761 -r dd6d21dc99c1 src/roadveh_cmd.cpp --- a/src/roadveh_cmd.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/roadveh_cmd.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -11,7 +11,6 @@ #include "roadveh.h" #include "station_map.h" #include "table/strings.h" -#include "strings.h" #include "map.h" #include "vehicle.h" #include "timetable.h" @@ -36,6 +35,7 @@ #include "yapf/yapf.h" #include "date.h" #include "cargotype.h" +#include "strings_func.h" #include "tunnelbridge_map.h" diff -r 31b7784db761 -r dd6d21dc99c1 src/roadveh_gui.cpp --- a/src/roadveh_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/roadveh_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -11,13 +11,13 @@ #include "table/strings.h" #include "gui.h" #include "window_gui.h" -#include "strings.h" #include "vehicle.h" #include "viewport.h" #include "command.h" #include "depot.h" #include "vehicle_gui.h" #include "newgrf_engine.h" +#include "strings_func.h" void DrawRoadVehDetails(const Vehicle *v, int x, int y) diff -r 31b7784db761 -r dd6d21dc99c1 src/saveload.cpp --- a/src/saveload.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/saveload.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -26,8 +26,8 @@ #include "network/network.h" #include "variables.h" #include "table/strings.h" -#include "strings.h" #include "window_func.h" +#include "strings_func.h" #include extern const uint16 SAVEGAME_VERSION = 83; diff -r 31b7784db761 -r dd6d21dc99c1 src/screenshot.cpp --- a/src/screenshot.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/screenshot.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -4,7 +4,6 @@ #include "openttd.h" #include "debug.h" #include "functions.h" -#include "strings.h" #include "table/strings.h" #include "gfx.h" #include "fileio.h" @@ -17,6 +16,7 @@ #include "helpers.hpp" #include "blitter/factory.hpp" #include "fileio.h" +#include "strings_func.h" char _screenshot_format_name[8]; uint _num_screenshot_formats; diff -r 31b7784db761 -r dd6d21dc99c1 src/settings.cpp --- a/src/settings.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/settings.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -28,7 +28,6 @@ #include "string.h" #include "variables.h" #include "network/network.h" -#include "strings.h" #include "settings.h" #include "command.h" #include "console.h" @@ -44,6 +43,7 @@ #include "helpers.hpp" #include "news.h" #include "window_func.h" +#include "strings_func.h" #ifdef WITH_FREETYPE #include "gfx.h" #include "fontcache.h" diff -r 31b7784db761 -r dd6d21dc99c1 src/settings_gui.cpp --- a/src/settings_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/settings_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -7,7 +7,6 @@ #include "currency.h" #include "functions.h" #include "string.h" -#include "strings.h" // XXX GetCurrentCurrencyRate() #include "table/sprites.h" #include "table/strings.h" #include "gui.h" @@ -26,6 +25,7 @@ #include "date.h" #include "helpers.hpp" #include "newgrf_townname.h" +#include "strings_func.h" static uint32 _difficulty_click_a; static uint32 _difficulty_click_b; diff -r 31b7784db761 -r dd6d21dc99c1 src/ship_cmd.cpp --- a/src/ship_cmd.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/ship_cmd.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -6,7 +6,6 @@ #include "openttd.h" #include "ship.h" #include "table/strings.h" -#include "strings.h" #include "functions.h" #include "landscape.h" #include "map.h" @@ -33,6 +32,7 @@ #include "date.h" #include "spritecache.h" #include "misc/autoptr.hpp" +#include "strings_func.h" static const uint16 _ship_sprites[] = {0x0E5D, 0x0E55, 0x0E65, 0x0E6D}; diff -r 31b7784db761 -r dd6d21dc99c1 src/ship_gui.cpp --- a/src/ship_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/ship_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -8,7 +8,6 @@ #include "functions.h" #include "ship.h" #include "table/strings.h" -#include "strings.h" #include "table/sprites.h" #include "gui.h" #include "window_gui.h" @@ -18,6 +17,7 @@ #include "depot.h" #include "vehicle_gui.h" #include "newgrf_engine.h" +#include "strings_func.h" void DrawShipImage(const Vehicle *v, int x, int y, VehicleID selection) { diff -r 31b7784db761 -r dd6d21dc99c1 src/signs.cpp --- a/src/signs.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/signs.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -5,7 +5,6 @@ #include "stdafx.h" #include "openttd.h" #include "table/strings.h" -#include "strings.h" #include "functions.h" #include "landscape.h" #include "player.h" @@ -15,6 +14,7 @@ #include "variables.h" #include "string.h" #include "misc/autoptr.hpp" +#include "strings_func.h" SignID _new_sign_id; uint _total_signs; diff -r 31b7784db761 -r dd6d21dc99c1 src/signs_gui.cpp --- a/src/signs_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/signs_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -13,11 +13,11 @@ #include "gfx.h" #include "player.h" #include "signs.h" -#include "strings.h" #include "debug.h" #include "variables.h" #include "helpers.hpp" #include "command.h" +#include "strings_func.h" static const Sign **_sign_sort; static uint _num_sign_sort; diff -r 31b7784db761 -r dd6d21dc99c1 src/smallmap_gui.cpp --- a/src/smallmap_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/smallmap_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -11,7 +11,6 @@ #include "industry.h" #include "station_map.h" #include "table/strings.h" -#include "strings.h" #include "table/sprites.h" #include "landscape.h" #include "map.h" @@ -28,6 +27,7 @@ #include "variables.h" #include "blitter/factory.hpp" #include "tunnelbridge_map.h" +#include "strings_func.h" static const Widget _smallmap_widgets[] = { diff -r 31b7784db761 -r dd6d21dc99c1 src/station_cmd.cpp --- a/src/station_cmd.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/station_cmd.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -41,11 +41,11 @@ #include "road_type.h" #include "road_internal.h" /* For drawing catenary/checking road removal */ #include "cargotype.h" -#include "strings.h" #include "autoslope.h" #include "transparency.h" #include "water.h" #include "station_gui.h" +#include "strings_func.h" DEFINE_OLD_POOL_GENERIC(Station, Station) DEFINE_OLD_POOL_GENERIC(RoadStop, RoadStop) diff -r 31b7784db761 -r dd6d21dc99c1 src/station_gui.cpp --- a/src/station_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/station_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -6,7 +6,6 @@ #include "openttd.h" #include "debug.h" #include "functions.h" -#include "strings.h" #include "table/strings.h" #include "gui.h" #include "window_gui.h" @@ -26,6 +25,7 @@ #include "cargotype.h" #include "station_gui.h" #include "station.h" +#include "strings_func.h" typedef int CDECL StationSortListingTypeFunction(const void*, const void*); diff -r 31b7784db761 -r dd6d21dc99c1 src/strgen/strgen.cpp --- a/src/strgen/strgen.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/strgen/strgen.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -1,7 +1,6 @@ /* $Id$ */ #include "../stdafx.h" -#include "../macros.h" #include "../string.h" #include "../table/control_codes.h" #include "../helpers.hpp" diff -r 31b7784db761 -r dd6d21dc99c1 src/strings.cpp --- a/src/strings.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/strings.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -7,7 +7,6 @@ #include "currency.h" #include "functions.h" #include "string.h" -#include "strings.h" #include "table/strings.h" #include "namegen.h" #include "station.h" @@ -35,6 +34,7 @@ #include "spritecache.h" #include "fontcache.h" #include "gui.h" +#include "strings_func.h" /* for opendir/readdir/closedir */ # include "fios.h" diff -r 31b7784db761 -r dd6d21dc99c1 src/strings.h --- a/src/strings.h Fri Dec 21 19:21:21 2007 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ -/* $Id$ */ - -/** @file strings.h */ - -#ifndef STRINGS_H -#define STRINGS_H - -char *InlineString(char *buf, StringID string); -char *GetString(char *buffr, StringID string, const char *last); - -extern char _userstring[128]; - -void InjectDParam(int amount); - -static inline void SetDParamX(uint64 *s, uint n, uint64 v) -{ - s[n] = v; -} - -static inline void SetDParam(uint n, uint64 v) -{ - extern uint64 _decode_parameters[20]; - - assert(n < lengthof(_decode_parameters)); - _decode_parameters[n] = v; -} - -/* Used to bind a C string name to a dparam number. - * NOTE: This has a short lifetime. You can't - * use this string much later or it will be gone. */ -void SetDParamStr(uint n, const char *str); - -/** This function takes a C-string and allocates a temporary string ID. - * The duration of the bound string is valid only until the next call to GetString, - * so be careful. */ -StringID BindCString(const char *str); - -static inline uint64 GetDParamX(const uint64 *s, uint n) -{ - return s[n]; -} - -static inline uint64 GetDParam(uint n) -{ - extern uint64 _decode_parameters[20]; - - assert(n < lengthof(_decode_parameters)); - return _decode_parameters[n]; -} - -static inline void CopyInDParam(int offs, const uint64 *src, int num) -{ - extern uint64 _decode_parameters[20]; - memcpy(_decode_parameters + offs, src, sizeof(uint64) * (num)); -} - -static inline void CopyOutDParam(uint64 *dst, int offs, int num) -{ - extern uint64 _decode_parameters[20]; - memcpy(dst, _decode_parameters + offs, sizeof(uint64) * (num)); -} - - -/** Information about a language */ -struct Language { - char *name; ///< The internal name of the language - char *file; ///< The name of the language as it appears on disk -}; - -/** Used for dynamic language support */ -struct DynamicLanguages { - int num; ///< Number of languages - int curr; ///< Currently selected language index - char curr_file[MAX_PATH]; ///< Currently selected language file name without path (needed for saving the filename of the loaded language). - StringID dropdown[MAX_LANG + 1]; ///< List of languages in the settings gui - Language ent[MAX_LANG]; ///< Information about the languages -}; - -extern DynamicLanguages _dynlang; // defined in strings.cpp - -bool ReadLanguagePack(int index); -void InitializeLanguagePacks(); - -int CDECL StringIDSorter(const void *a, const void *b); - -void CheckForMissingGlyphsInLoadedLanguagePack(); - -#endif /* STRINGS_H */ diff -r 31b7784db761 -r dd6d21dc99c1 src/strings_func.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/strings_func.h Fri Dec 21 19:49:27 2007 +0000 @@ -0,0 +1,74 @@ +/* $Id$ */ + +/** @file strings_func.h Functions related to OTTD's strings. */ + +#ifndef STRINGS_FUNC_H +#define STRINGS_FUNC_H + +#include "strings_type.h" + +char *InlineString(char *buf, StringID string); +char *GetString(char *buffr, StringID string, const char *last); + +extern char _userstring[128]; + +void InjectDParam(int amount); + +static inline void SetDParamX(uint64 *s, uint n, uint64 v) +{ + s[n] = v; +} + +static inline void SetDParam(uint n, uint64 v) +{ + extern uint64 _decode_parameters[20]; + + assert(n < lengthof(_decode_parameters)); + _decode_parameters[n] = v; +} + +/* Used to bind a C string name to a dparam number. + * NOTE: This has a short lifetime. You can't + * use this string much later or it will be gone. */ +void SetDParamStr(uint n, const char *str); + +/** This function takes a C-string and allocates a temporary string ID. + * The duration of the bound string is valid only until the next call to GetString, + * so be careful. */ +StringID BindCString(const char *str); + +static inline uint64 GetDParamX(const uint64 *s, uint n) +{ + return s[n]; +} + +static inline uint64 GetDParam(uint n) +{ + extern uint64 _decode_parameters[20]; + + assert(n < lengthof(_decode_parameters)); + return _decode_parameters[n]; +} + +static inline void CopyInDParam(int offs, const uint64 *src, int num) +{ + extern uint64 _decode_parameters[20]; + memcpy(_decode_parameters + offs, src, sizeof(uint64) * (num)); +} + +static inline void CopyOutDParam(uint64 *dst, int offs, int num) +{ + extern uint64 _decode_parameters[20]; + memcpy(dst, _decode_parameters + offs, sizeof(uint64) * (num)); +} + +extern DynamicLanguages _dynlang; // defined in strings.cpp + +bool ReadLanguagePack(int index); +void InitializeLanguagePacks(); + +int CDECL StringIDSorter(const void *a, const void *b); + +void CheckForMissingGlyphsInLoadedLanguagePack(); + +#endif /* STRINGS_TYPE_H */ diff -r 31b7784db761 -r dd6d21dc99c1 src/strings_type.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/strings_type.h Fri Dec 21 19:49:27 2007 +0000 @@ -0,0 +1,89 @@ +/* $Id$ */ + +/** @file strings_type.h Types related to strings. */ + +#ifndef STRINGS_TYPE_H +#define STRINGS_TYPE_H + +typedef uint16 StringID; +static const StringID INVALID_STRING_ID = 0xFFFF; + +enum { + MAX_LANG = 64, +}; + +/** Information about a language */ +struct Language { + char *name; ///< The internal name of the language + char *file; ///< The name of the language as it appears on disk +}; + +/** Used for dynamic language support */ +struct DynamicLanguages { + int num; ///< Number of languages + int curr; ///< Currently selected language index + char curr_file[MAX_PATH]; ///< Currently selected language file name without path (needed for saving the filename of the loaded language). + StringID dropdown[MAX_LANG + 1]; ///< List of languages in the settings gui + Language ent[MAX_LANG]; ///< Information about the languages +}; + +// special string constants +enum SpecialStrings { + + // special strings for town names. the town name is generated dynamically on request. + SPECSTR_TOWNNAME_START = 0x20C0, + SPECSTR_TOWNNAME_ENGLISH = SPECSTR_TOWNNAME_START, + SPECSTR_TOWNNAME_FRENCH, + SPECSTR_TOWNNAME_GERMAN, + SPECSTR_TOWNNAME_AMERICAN, + SPECSTR_TOWNNAME_LATIN, + SPECSTR_TOWNNAME_SILLY, + SPECSTR_TOWNNAME_SWEDISH, + SPECSTR_TOWNNAME_DUTCH, + SPECSTR_TOWNNAME_FINNISH, + SPECSTR_TOWNNAME_POLISH, + SPECSTR_TOWNNAME_SLOVAKISH, + SPECSTR_TOWNNAME_NORWEGIAN, + SPECSTR_TOWNNAME_HUNGARIAN, + SPECSTR_TOWNNAME_AUSTRIAN, + SPECSTR_TOWNNAME_ROMANIAN, + SPECSTR_TOWNNAME_CZECH, + SPECSTR_TOWNNAME_SWISS, + SPECSTR_TOWNNAME_DANISH, + SPECSTR_TOWNNAME_TURKISH, + SPECSTR_TOWNNAME_ITALIAN, + SPECSTR_TOWNNAME_CATALAN, + SPECSTR_TOWNNAME_LAST = SPECSTR_TOWNNAME_CATALAN, + + // special strings for player names on the form "TownName transport". + SPECSTR_PLAYERNAME_START = 0x70EA, + SPECSTR_PLAYERNAME_ENGLISH = SPECSTR_PLAYERNAME_START, + SPECSTR_PLAYERNAME_FRENCH, + SPECSTR_PLAYERNAME_GERMAN, + SPECSTR_PLAYERNAME_AMERICAN, + SPECSTR_PLAYERNAME_LATIN, + SPECSTR_PLAYERNAME_SILLY, + SPECSTR_PLAYERNAME_LAST = SPECSTR_PLAYERNAME_SILLY, + + SPECSTR_ANDCO_NAME = 0x70E6, + SPECSTR_PRESIDENT_NAME = 0x70E7, + SPECSTR_SONGNAME = 0x70E8, + + // reserve MAX_LANG strings for the *.lng files + SPECSTR_LANGUAGE_START = 0x7100, + SPECSTR_LANGUAGE_END = SPECSTR_LANGUAGE_START + MAX_LANG - 1, + + // reserve 32 strings for various screen resolutions + SPECSTR_RESOLUTION_START = SPECSTR_LANGUAGE_END + 1, + SPECSTR_RESOLUTION_END = SPECSTR_RESOLUTION_START + 0x1F, + + // reserve 32 strings for screenshot formats + SPECSTR_SCREENSHOT_START = SPECSTR_RESOLUTION_END + 1, + SPECSTR_SCREENSHOT_END = SPECSTR_SCREENSHOT_START + 0x1F, + + // Used to implement SetDParamStr + STR_SPEC_DYNSTRING = 0xF800, + STR_SPEC_USERSTRING = 0xF808, +}; + +#endif /* STRINGS_TYPE_H */ diff -r 31b7784db761 -r dd6d21dc99c1 src/subsidy_gui.cpp --- a/src/subsidy_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/subsidy_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -5,7 +5,6 @@ #include "stdafx.h" #include "openttd.h" #include "table/strings.h" -#include "strings.h" #include "functions.h" #include "station.h" #include "industry.h" @@ -17,6 +16,7 @@ #include "date.h" #include "cargotype.h" #include "window_gui.h" +#include "strings_func.h" static void HandleSubsidyClick(int y) { diff -r 31b7784db761 -r dd6d21dc99c1 src/texteff.cpp --- a/src/texteff.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/texteff.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -5,7 +5,6 @@ #include "stdafx.h" #include "openttd.h" #include "functions.h" -#include "strings.h" #include "gfx.h" #include "landscape.h" #include "viewport.h" @@ -20,6 +19,7 @@ #include "texteff.hpp" #include "video/video_driver.hpp" #include "transparency.h" +#include "strings_func.h" enum { MAX_TEXTMESSAGE_LENGTH = 200, diff -r 31b7784db761 -r dd6d21dc99c1 src/timetable_gui.cpp --- a/src/timetable_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/timetable_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -7,7 +7,6 @@ #include "functions.h" #include "variables.h" #include "table/strings.h" -#include "strings.h" #include "command.h" #include "date.h" #include "engine.h" @@ -18,6 +17,7 @@ #include "vehicle.h" #include "cargotype.h" #include "depot.h" +#include "strings_func.h" static int GetOrderFromTimetableWndPt(Window *w, int y, const Vehicle *v) { diff -r 31b7784db761 -r dd6d21dc99c1 src/town_cmd.cpp --- a/src/town_cmd.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/town_cmd.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -6,7 +6,6 @@ #include "openttd.h" #include "functions.h" #include "debug.h" -#include "strings.h" #include "road_map.h" #include "road_internal.h" /* Cleaning up road bits */ #include "table/strings.h" @@ -45,6 +44,7 @@ #include "waypoint.h" #include "transparency.h" #include "tunnelbridge_map.h" +#include "strings_func.h" /* Initialize the town-pool */ diff -r 31b7784db761 -r dd6d21dc99c1 src/town_gui.cpp --- a/src/town_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/town_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -6,7 +6,6 @@ #include "openttd.h" #include "debug.h" #include "functions.h" -#include "strings.h" #include "table/sprites.h" #include "table/strings.h" #include "town.h" @@ -20,6 +19,7 @@ #include "network/network.h" #include "variables.h" #include "helpers.hpp" +#include "strings_func.h" enum TownAuthorityWidget { TWA_CLOSEBOX = 0, diff -r 31b7784db761 -r dd6d21dc99c1 src/train_cmd.cpp --- a/src/train_cmd.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/train_cmd.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -11,7 +11,6 @@ #include "gui.h" #include "station_map.h" #include "table/strings.h" -#include "strings.h" #include "map.h" #include "tunnel_map.h" #include "vehicle.h" @@ -42,6 +41,7 @@ #include "group.h" #include "table/sprites.h" #include "tunnelbridge_map.h" +#include "strings_func.h" static bool TrainCheckIfLineEnds(Vehicle *v); diff -r 31b7784db761 -r dd6d21dc99c1 src/train_gui.cpp --- a/src/train_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/train_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -8,7 +8,6 @@ #include "functions.h" #include "table/sprites.h" #include "table/strings.h" -#include "strings.h" #include "gui.h" #include "window_gui.h" #include "vehicle.h" @@ -18,6 +17,7 @@ #include "depot.h" #include "train.h" #include "newgrf_engine.h" +#include "strings_func.h" void CcBuildWagon(bool success, TileIndex tile, uint32 p1, uint32 p2) { diff -r 31b7784db761 -r dd6d21dc99c1 src/tunnelbridge_cmd.cpp --- a/src/tunnelbridge_cmd.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/tunnelbridge_cmd.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -12,7 +12,6 @@ #include "road_map.h" #include "table/sprites.h" #include "table/strings.h" -#include "strings.h" #include "functions.h" #include "map.h" #include "landscape.h" @@ -35,6 +34,7 @@ #include "transparency.h" #include "tunnelbridge_map.h" #include "table/bridge_land.h" +#include "strings_func.h" const Bridge orig_bridge[] = { diff -r 31b7784db761 -r dd6d21dc99c1 src/vehicle.cpp --- a/src/vehicle.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/vehicle.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -42,8 +42,8 @@ #include "helpers.hpp" #include "group.h" #include "economy.h" -#include "strings.h" #include "order.h" +#include "strings_func.h" #define INVALID_COORD (0x7fffffff) #define GEN_HASH(x, y) ((GB((y), 6, 6) << 6) + GB((x), 7, 6)) diff -r 31b7784db761 -r dd6d21dc99c1 src/vehicle_gui.cpp --- a/src/vehicle_gui.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/vehicle_gui.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -8,7 +8,6 @@ #include "functions.h" #include "player.h" #include "station.h" -#include "strings.h" #include "table/sprites.h" #include "table/strings.h" #include "vehicle.h" @@ -34,6 +33,7 @@ #include "cargotype.h" #include "group.h" #include "group_gui.h" +#include "strings_func.h" struct Sorting { Listing aircraft; diff -r 31b7784db761 -r dd6d21dc99c1 src/viewport.cpp --- a/src/viewport.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/viewport.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -8,7 +8,6 @@ #include "functions.h" #include "gui.h" #include "spritecache.h" -#include "strings.h" #include "table/sprites.h" #include "table/strings.h" #include "landscape.h" @@ -26,6 +25,7 @@ #include "vehicle_gui.h" #include "blitter/factory.hpp" #include "transparency.h" +#include "strings_func.h" #define VIEWPORT_DRAW_MEM (65536 * 2) diff -r 31b7784db761 -r dd6d21dc99c1 src/water_cmd.cpp --- a/src/water_cmd.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/water_cmd.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -10,7 +10,6 @@ #include "station_map.h" #include "table/sprites.h" #include "table/strings.h" -#include "strings.h" #include "functions.h" #include "landscape.h" #include "map.h" @@ -31,6 +30,7 @@ #include "newgrf_canal.h" #include "misc/autoptr.hpp" #include "transparency.h" +#include "strings_func.h" /** Array for the shore sprites */ static const SpriteID _water_shore_sprites[] = { diff -r 31b7784db761 -r dd6d21dc99c1 src/waypoint.cpp --- a/src/waypoint.cpp Fri Dec 21 19:21:21 2007 +0000 +++ b/src/waypoint.cpp Fri Dec 21 19:49:27 2007 +0000 @@ -24,8 +24,8 @@ #include "date.h" #include "newgrf.h" #include "string.h" -#include "strings.h" #include "misc/autoptr.hpp" +#include "strings_func.h" enum { MAX_WAYPOINTS_PER_TOWN = 64,