mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r11777) -Codechange: split the string header and make do not include it when it's not necessary.
This commit is contained in:
parent
38115acf5a
commit
a3ccdcea36
|
@ -4,8 +4,8 @@
|
|||
#define BLITTER_FACTORY_HPP
|
||||
|
||||
#include "base.hpp"
|
||||
#include "../string.h"
|
||||
#include "../debug.h"
|
||||
#include "../string_func.h"
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include "window_gui.h"
|
||||
#include "player.h"
|
||||
#include "variables.h"
|
||||
#include "string.h"
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include "console.h"
|
||||
|
@ -19,6 +18,7 @@
|
|||
#include "network/network_server.h"
|
||||
#include "core/alloc_func.hpp"
|
||||
#include "window_func.h"
|
||||
#include "string_func.h"
|
||||
|
||||
#define ICON_BUFFER 79
|
||||
#define ICON_HISTORY_SIZE 20
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include "engine.h"
|
||||
#include "landscape.h"
|
||||
#include "saveload.h"
|
||||
#include "string.h"
|
||||
#include "variables.h"
|
||||
#include "network/network_data.h"
|
||||
#include "network/network_client.h"
|
||||
|
@ -30,6 +29,7 @@
|
|||
#include "map_func.h"
|
||||
#include "date_func.h"
|
||||
#include "vehicle_func.h"
|
||||
#include "string_func.h"
|
||||
|
||||
// ** scriptfile handling ** //
|
||||
static FILE *_script_file;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "openttd.h"
|
||||
#include "console.h"
|
||||
#include "debug.h"
|
||||
#include "string.h"
|
||||
#include "string_func.h"
|
||||
#include "network/core/core.h"
|
||||
|
||||
#if defined(ENABLE_NETWORK)
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include "openttd.h"
|
||||
#include "debug.h"
|
||||
#include "driver.h"
|
||||
#include "string.h"
|
||||
|
||||
#include "sound/sound_driver.hpp"
|
||||
#include "music/music_driver.hpp"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include "debug.h"
|
||||
#include "core/enum_type.hpp"
|
||||
#include "string.h"
|
||||
#include "string_func.h"
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#include "newgrf_cargo.h"
|
||||
#include "table/engines.h"
|
||||
#include "group.h"
|
||||
#include "string.h"
|
||||
#include "misc/autoptr.hpp"
|
||||
#include "strings_func.h"
|
||||
#include "viewport.h"
|
||||
|
@ -26,6 +25,7 @@
|
|||
#include "date_func.h"
|
||||
#include "autoreplace_base.h"
|
||||
#include "autoreplace_gui.h"
|
||||
#include "string_func.h"
|
||||
|
||||
EngineInfo _engine_info[TOTAL_NUM_ENGINES];
|
||||
RailVehicleInfo _rail_vehicle_info[NUM_TRAIN_ENGINES];
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
#include "stdafx.h"
|
||||
#include "openttd.h"
|
||||
#include "fileio.h"
|
||||
#include "string.h"
|
||||
#include "variables.h"
|
||||
#include "debug.h"
|
||||
#include "fios.h"
|
||||
#include "core/alloc_func.hpp"
|
||||
#include "core/math_func.hpp"
|
||||
#include "string_func.h"
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#else
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
#include "stdafx.h"
|
||||
#include "openttd.h"
|
||||
#include "string.h"
|
||||
#include "variables.h"
|
||||
#include "heightmap.h"
|
||||
#include "table/strings.h"
|
||||
|
@ -14,6 +13,7 @@
|
|||
#include "fileio.h"
|
||||
#include "core/alloc_func.hpp"
|
||||
#include "functions.h"
|
||||
#include "string_func.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "table/sprites.h"
|
||||
#include "table/control_codes.h"
|
||||
#include "spritecache.h"
|
||||
#include "string.h"
|
||||
#include "fontcache.h"
|
||||
#include "spriteloader/spriteloader.hpp"
|
||||
#include "blitter/factory.hpp"
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include "player.h"
|
||||
#include "command_func.h"
|
||||
#include "variables.h"
|
||||
#include "string.h"
|
||||
#include "settings_func.h"
|
||||
#include "debug.h"
|
||||
#include "genworld.h"
|
||||
|
@ -26,6 +25,7 @@
|
|||
#include "date_func.h"
|
||||
#include "sound_func.h"
|
||||
#include "fios.h"
|
||||
#include "string_func.h"
|
||||
|
||||
/**
|
||||
* In what 'mode' the GenerateLandscapeWindowProc is.
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include "openttd.h"
|
||||
#include "gfx_func.h"
|
||||
#include "spritecache.h"
|
||||
#include "string.h"
|
||||
#include "table/palettes.h"
|
||||
#include "table/sprites.h"
|
||||
#include "variables.h"
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include "table/sprites.h"
|
||||
#include "fileio.h"
|
||||
#include "fios.h"
|
||||
#include "string.h"
|
||||
#include "newgrf.h"
|
||||
#include "md5.h"
|
||||
#include "variables.h"
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#include "group.h"
|
||||
#include "train.h"
|
||||
#include "aircraft.h"
|
||||
#include "string.h"
|
||||
#include "vehicle_gui.h"
|
||||
#include "misc/autoptr.hpp"
|
||||
#include "strings_func.h"
|
||||
|
@ -22,6 +21,7 @@
|
|||
#include "vehicle_func.h"
|
||||
#include "autoreplace_base.h"
|
||||
#include "autoreplace_func.h"
|
||||
#include "string_func.h"
|
||||
|
||||
/**
|
||||
* Update the num engines of a groupID. Decrease the old one and increase the new one
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "window_func.h"
|
||||
#include "vehicle_func.h"
|
||||
#include "autoreplace_gui.h"
|
||||
#include "string_func.h"
|
||||
|
||||
|
||||
struct Sorting {
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "train.h"
|
||||
#include "roadveh.h"
|
||||
#include "bridge_map.h"
|
||||
#include "string.h"
|
||||
#include "screenshot.h"
|
||||
#include "genworld.h"
|
||||
#include "vehicle_gui.h"
|
||||
|
@ -49,6 +48,7 @@
|
|||
#include "transparency.h"
|
||||
#include "strings_func.h"
|
||||
#include "zoom_func.h"
|
||||
#include "string_func.h"
|
||||
|
||||
static int _rename_id = 1;
|
||||
static int _rename_what = -1;
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "landscape.h"
|
||||
#include "news.h"
|
||||
#include "player.h"
|
||||
#include "string.h"
|
||||
#include "table/strings.h"
|
||||
#include "table/sprites.h"
|
||||
#include "saveload.h"
|
||||
|
@ -27,6 +26,7 @@
|
|||
#include "date_func.h"
|
||||
#include "vehicle_func.h"
|
||||
#include "texteff.hpp"
|
||||
#include "string_func.h"
|
||||
|
||||
char _name_array[512][32];
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "stdafx.h"
|
||||
#include "openttd.h"
|
||||
#include "string.h"
|
||||
#include "table/strings.h"
|
||||
#include "command_func.h"
|
||||
#include "economy_func.h"
|
||||
|
@ -20,6 +19,7 @@
|
|||
#include "gfx_func.h"
|
||||
#include "functions.h"
|
||||
#include "vehicle_func.h"
|
||||
#include "string_func.h"
|
||||
|
||||
/** Change the player's face.
|
||||
* @param tile unused
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include "player.h"
|
||||
#include "town.h"
|
||||
#include "network/network.h"
|
||||
#include "string.h"
|
||||
#include "variables.h"
|
||||
#include "train.h"
|
||||
#include "tgp.h"
|
||||
|
@ -39,6 +38,7 @@
|
|||
#include "window_func.h"
|
||||
#include "date_func.h"
|
||||
#include "sound_func.h"
|
||||
#include "string_func.h"
|
||||
|
||||
/* Variables to display file lists */
|
||||
FiosItem *_fios_list;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
#include "../stdafx.h"
|
||||
#include "../openttd.h"
|
||||
#include "../sound_func.h"
|
||||
#include "../string.h"
|
||||
#include "../variables.h"
|
||||
#include "../debug.h"
|
||||
#include "extmidi.h"
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#include "../stdafx.h"
|
||||
#include "../openttd.h"
|
||||
#include "../sound.h"
|
||||
#include "../string.h"
|
||||
#include "../variables.h"
|
||||
#include "../debug.h"
|
||||
#include "libtimidity.h"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "debug.h"
|
||||
#include "namegen.h"
|
||||
#include "table/namegen.h"
|
||||
#include "string.h"
|
||||
#include "string_func.h"
|
||||
|
||||
static inline uint32 SeedChance(int shift_by, int max, uint32 seed)
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#ifdef ENABLE_NETWORK
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "../../string.h"
|
||||
#include "../../string_func.h"
|
||||
|
||||
#include "packet.h"
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@ extern const char _openttd_revision[];
|
|||
|
||||
#include "../openttd.h"
|
||||
#include "../debug.h"
|
||||
#include "../string.h"
|
||||
#include "../strings_func.h"
|
||||
#include "../map_func.h"
|
||||
#include "../command_func.h"
|
||||
|
@ -32,6 +31,7 @@ extern const char _openttd_revision[];
|
|||
#include "../texteff.hpp"
|
||||
#include "../core/random_func.hpp"
|
||||
#include "../window_func.h"
|
||||
#include "../string_func.h"
|
||||
#ifdef DEBUG_DUMP_COMMANDS
|
||||
#include "../core/alloc_func.hpp"
|
||||
#endif
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "../stdafx.h"
|
||||
#include "../debug.h"
|
||||
#include "../string.h"
|
||||
#include "../openttd.h"
|
||||
#include "network_data.h"
|
||||
#include "core/tcp.h"
|
||||
|
@ -22,6 +21,7 @@
|
|||
#include "../md5.h"
|
||||
#include "../strings_func.h"
|
||||
#include "../window_func.h"
|
||||
#include "../string_func.h"
|
||||
|
||||
// This file handles all the client-commands
|
||||
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
#include "../stdafx.h"
|
||||
#include "../debug.h"
|
||||
#include "network_data.h"
|
||||
#include "../string.h"
|
||||
#include "network_client.h"
|
||||
#include "../command_func.h"
|
||||
#include "../callback_table.h"
|
||||
#include "../core/alloc_func.hpp"
|
||||
#include "../string_func.h"
|
||||
|
||||
// Add a command to the local command queue
|
||||
void NetworkAddCommandQueue(NetworkTCPSocketHandler *cs, CommandPacket *cp)
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#ifdef ENABLE_NETWORK
|
||||
#include "../stdafx.h"
|
||||
#include "../openttd.h"
|
||||
#include "../string.h"
|
||||
#include "../strings_func.h"
|
||||
#include "../table/sprites.h"
|
||||
#include "network.h"
|
||||
|
@ -21,12 +20,12 @@
|
|||
#include "../variables.h"
|
||||
#include "network_server.h"
|
||||
#include "network_udp.h"
|
||||
#include "../string.h"
|
||||
#include "../town.h"
|
||||
#include "../newgrf.h"
|
||||
#include "../functions.h"
|
||||
#include "../window_func.h"
|
||||
#include "../core/alloc_func.hpp"
|
||||
#include "../string_func.h"
|
||||
|
||||
#define BGC 5
|
||||
#define BTC 15
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include "../stdafx.h"
|
||||
#include "../openttd.h" // XXX StringID
|
||||
#include "../debug.h"
|
||||
#include "../string.h"
|
||||
#include "../strings_func.h"
|
||||
#include "network_data.h"
|
||||
#include "core/tcp.h"
|
||||
|
@ -23,6 +22,7 @@
|
|||
#include "../genworld.h"
|
||||
#include "../core/alloc_func.hpp"
|
||||
#include "../fileio.h"
|
||||
#include "../string_func.h"
|
||||
|
||||
// This file handles all the server-commands
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
#include "../stdafx.h"
|
||||
#include "../debug.h"
|
||||
#include "../string.h"
|
||||
#include "network_data.h"
|
||||
#include "../date_func.h"
|
||||
#include "../map_func.h"
|
||||
|
@ -20,6 +19,7 @@
|
|||
#include "../variables.h"
|
||||
#include "../newgrf_config.h"
|
||||
#include "../core/endian_func.hpp"
|
||||
#include "../string_func.h"
|
||||
|
||||
#include "core/udp.h"
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include "sprite.h"
|
||||
#include "newgrf.h"
|
||||
#include "variables.h"
|
||||
#include "string.h"
|
||||
#include "table/strings.h"
|
||||
#include "bridge.h"
|
||||
#include "town.h"
|
||||
|
@ -46,6 +45,7 @@
|
|||
#include "date_func.h"
|
||||
#include "vehicle_func.h"
|
||||
#include "sound_func.h"
|
||||
#include "string_func.h"
|
||||
|
||||
/* TTDPatch extended GRF format codec
|
||||
* (c) Petr Baudis 2004 (GPL'd)
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
#include "openttd.h"
|
||||
#include "debug.h"
|
||||
#include "variables.h"
|
||||
#include "string.h"
|
||||
#include "saveload.h"
|
||||
#include "md5.h"
|
||||
#include "network/network_data.h"
|
||||
#include "newgrf.h"
|
||||
#include "newgrf_config.h"
|
||||
#include "core/alloc_func.hpp"
|
||||
#include "string_func.h"
|
||||
|
||||
#include "fileio.h"
|
||||
#include "fios.h"
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "strings_func.h"
|
||||
#include "window_func.h"
|
||||
#include "core/alloc_func.hpp"
|
||||
#include "string_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
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include "stdafx.h"
|
||||
#include "debug.h"
|
||||
#include "openttd.h"
|
||||
#include "string.h"
|
||||
#include "variables.h"
|
||||
#include "table/strings.h"
|
||||
#include "newgrf.h"
|
||||
|
@ -21,6 +20,7 @@
|
|||
#include "strings_func.h"
|
||||
#include "core/alloc_func.hpp"
|
||||
#include "newgrf_storage.h"
|
||||
#include "string_func.h"
|
||||
|
||||
#define GRFTAB 28
|
||||
#define TABSIZE 11
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
#include "openttd.h"
|
||||
#include "table/strings.h"
|
||||
#include "newgrf_townname.h"
|
||||
#include "string.h"
|
||||
#include "core/alloc_func.hpp"
|
||||
#include "string_func.h"
|
||||
|
||||
static GRFTownName *_grf_townnames = NULL;
|
||||
|
||||
|
|
|
@ -10,13 +10,13 @@
|
|||
#include "viewport.h"
|
||||
#include "news.h"
|
||||
#include "variables.h"
|
||||
#include "string.h"
|
||||
#include "transparency.h"
|
||||
#include "strings_func.h"
|
||||
#include "window_func.h"
|
||||
#include "date_func.h"
|
||||
#include "vehicle_base.h"
|
||||
#include "sound_func.h"
|
||||
#include "string_func.h"
|
||||
|
||||
/** @file news_gui.cpp
|
||||
*
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "stdafx.h"
|
||||
#define VARDEF
|
||||
#include "string.h"
|
||||
#include "debug.h"
|
||||
#include "driver.h"
|
||||
#include "saveload.h"
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "functions.h"
|
||||
#include "window_func.h"
|
||||
#include "settings_type.h"
|
||||
#include "string_func.h"
|
||||
|
||||
DEFINE_OLD_POOL_GENERIC(Order, Order)
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include "stdafx.h"
|
||||
#include "openttd.h"
|
||||
#include "variables.h"
|
||||
#include "string.h"
|
||||
#include "table/strings.h"
|
||||
#include "gui.h"
|
||||
#include "fileio.h"
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "functions.h"
|
||||
#include "window_func.h"
|
||||
#include "date_func.h"
|
||||
#include "string_func.h"
|
||||
|
||||
static void DoShowPlayerFinances(PlayerID player, bool show_small, bool show_stickied);
|
||||
static void DoSelectPlayerFace(PlayerID player, bool show_big);
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include "stdafx.h"
|
||||
#include "openttd.h"
|
||||
#include "engine.h"
|
||||
#include "string.h"
|
||||
#include "table/strings.h"
|
||||
#include "table/sprites.h"
|
||||
#include "player.h"
|
||||
|
@ -30,6 +29,7 @@
|
|||
#include "sound_func.h"
|
||||
#include "autoreplace_func.h"
|
||||
#include "autoreplace_gui.h"
|
||||
#include "string_func.h"
|
||||
|
||||
/**
|
||||
* Sets the local player and updates the patch settings that are set on a
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "newgrf_engine.h"
|
||||
#include "strings_func.h"
|
||||
#include "vehicle_func.h"
|
||||
#include "string_func.h"
|
||||
|
||||
|
||||
void DrawRoadVehDetails(const Vehicle *v, int x, int y)
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include "player.h"
|
||||
#include "screenshot.h"
|
||||
#include "variables.h"
|
||||
#include "string.h"
|
||||
#include "blitter/factory.hpp"
|
||||
#include "fileio.h"
|
||||
#include "strings_func.h"
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include "openttd.h"
|
||||
#include "currency.h"
|
||||
#include "screenshot.h"
|
||||
#include "string.h"
|
||||
#include "variables.h"
|
||||
#include "network/network.h"
|
||||
#include "settings_internal.h"
|
||||
|
@ -48,6 +47,7 @@
|
|||
#endif
|
||||
#include "spritecache.h"
|
||||
#include "transparency.h"
|
||||
#include "string_func.h"
|
||||
|
||||
GameOptions _opt;
|
||||
GameOptions _opt_newgame;
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include "stdafx.h"
|
||||
#include "openttd.h"
|
||||
#include "currency.h"
|
||||
#include "string.h"
|
||||
#include "table/sprites.h"
|
||||
#include "table/strings.h"
|
||||
#include "gui.h"
|
||||
|
@ -25,6 +24,7 @@
|
|||
#include "window_func.h"
|
||||
#include "vehicle_base.h"
|
||||
#include "core/alloc_func.hpp"
|
||||
#include "string_func.h"
|
||||
|
||||
static uint32 _difficulty_click_a;
|
||||
static uint32 _difficulty_click_b;
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include "saveload.h"
|
||||
#include "command_func.h"
|
||||
#include "variables.h"
|
||||
#include "string.h"
|
||||
#include "misc/autoptr.hpp"
|
||||
#include "strings_func.h"
|
||||
#include "viewport.h"
|
||||
|
@ -19,6 +18,7 @@
|
|||
#include "functions.h"
|
||||
#include "window_func.h"
|
||||
#include "map_func.h"
|
||||
#include "string_func.h"
|
||||
|
||||
SignID _new_sign_id;
|
||||
uint _total_signs;
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include "stdafx.h"
|
||||
#include "openttd.h"
|
||||
#include "variables.h"
|
||||
#include "string.h"
|
||||
#include "debug.h"
|
||||
#include "spritecache.h"
|
||||
#include "table/sprites.h"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "stdafx.h"
|
||||
#include "openttd.h"
|
||||
#include "string.h"
|
||||
#include "aircraft.h"
|
||||
#include "bridge_map.h"
|
||||
#include "cmd_helper.h"
|
||||
|
@ -45,6 +44,7 @@
|
|||
#include "window_func.h"
|
||||
#include "date_func.h"
|
||||
#include "vehicle_func.h"
|
||||
#include "string_func.h"
|
||||
|
||||
DEFINE_OLD_POOL_GENERIC(Station, Station)
|
||||
DEFINE_OLD_POOL_GENERIC(RoadStop, RoadStop)
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id$ */
|
||||
|
||||
#include "../stdafx.h"
|
||||
#include "../string.h"
|
||||
#include "../table/control_codes.h"
|
||||
#include "../core/alloc_func.hpp"
|
||||
#include "../core/endian_func.hpp"
|
||||
#include "../string_func.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
|
||||
#include "stdafx.h"
|
||||
#include "openttd.h"
|
||||
#include "string.h"
|
||||
#include "table/control_codes.h"
|
||||
#include "debug.h"
|
||||
#include "core/alloc_func.hpp"
|
||||
#include "string_func.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <ctype.h> // required for tolower()
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
/* $Id$ */
|
||||
|
||||
/** @file string.h */
|
||||
/** @file string.h Functions related to low-level strings. */
|
||||
|
||||
#ifndef STRING_H
|
||||
#define STRING_H
|
||||
#ifndef STRING_FUNC_H
|
||||
#define STRING_FUNC_H
|
||||
|
||||
#include "core/bitmath_func.hpp"
|
||||
#include "string_type.h"
|
||||
|
||||
/**
|
||||
* usage ttd_strlcpy(dst, src, lengthof(dst));
|
||||
|
@ -36,15 +37,6 @@ void str_validate(char *str);
|
|||
/** Scans the string for colour codes and strips them */
|
||||
void str_strip_colours(char *str);
|
||||
|
||||
/**
|
||||
* Valid filter types for IsValidChar.
|
||||
*/
|
||||
enum CharSetFilter {
|
||||
CS_ALPHANUMERAL, ///< Both numeric and alphabetic and spaces and stuff
|
||||
CS_NUMERAL, ///< Only numeric ones
|
||||
CS_ALPHA, ///< Only alphabetic values
|
||||
};
|
||||
|
||||
/** Convert the given string to lowercase, only works with ASCII! */
|
||||
void strtolower(char *str);
|
||||
|
||||
|
@ -63,8 +55,6 @@ static inline int ttd_strnlen(const char *str, int maxlen)
|
|||
/** Convert the md5sum number to a 'hexadecimal' string, return next pos in buffer */
|
||||
char *md5sumToString(char *buf, const char *last, const uint8 md5sum[16]);
|
||||
|
||||
typedef uint32 WChar;
|
||||
|
||||
/**
|
||||
* Only allow certain keys. You can define the filter to be used. This makes
|
||||
* sure no invalid keys can get into an editbox, like BELL.
|
||||
|
@ -166,5 +156,4 @@ static inline bool IsWhitespace(WChar c)
|
|||
;
|
||||
}
|
||||
|
||||
|
||||
#endif /* STRING_H */
|
||||
#endif /* STRING_FUNC_H */
|
|
@ -0,0 +1,19 @@
|
|||
/* $Id$ */
|
||||
|
||||
/** @file string_type.h Types for strings. */
|
||||
|
||||
#ifndef STRING_TYPE_H
|
||||
#define STRING_TYPE_H
|
||||
|
||||
/**
|
||||
* Valid filter types for IsValidChar.
|
||||
*/
|
||||
enum CharSetFilter {
|
||||
CS_ALPHANUMERAL, ///< Both numeric and alphabetic and spaces and stuff
|
||||
CS_NUMERAL, ///< Only numeric ones
|
||||
CS_ALPHA, ///< Only alphabetic values
|
||||
};
|
||||
|
||||
typedef uint32 WChar;
|
||||
|
||||
#endif /* STRING_TYPE_H */
|
|
@ -5,7 +5,6 @@
|
|||
#include "stdafx.h"
|
||||
#include "openttd.h"
|
||||
#include "currency.h"
|
||||
#include "string.h"
|
||||
#include "table/strings.h"
|
||||
#include "namegen.h"
|
||||
#include "station.h"
|
||||
|
@ -34,6 +33,7 @@
|
|||
#include "core/endian_func.hpp"
|
||||
#include "date_func.h"
|
||||
#include "vehicle_base.h"
|
||||
#include "string_func.h"
|
||||
|
||||
/* for opendir/readdir/closedir */
|
||||
# include "fios.h"
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
#ifndef TEXTBUF_GUI_H
|
||||
#define TEXTBUF_GUI_H
|
||||
|
||||
#include "string.h"
|
||||
#include "window_type.h"
|
||||
#include "string_type.h"
|
||||
|
||||
struct Textbuf {
|
||||
char *buf; ///< buffer in which text is saved
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include "viewport.h"
|
||||
#include "saveload.h"
|
||||
#include "console.h"
|
||||
#include "string.h"
|
||||
#include "variables.h"
|
||||
#include "table/sprites.h"
|
||||
#include "blitter/factory.hpp"
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
#include "gui.h"
|
||||
#include "window_gui.h"
|
||||
#include "textbuf_gui.h"
|
||||
#include "string.h"
|
||||
#include "cargotype.h"
|
||||
#include "depot.h"
|
||||
#include "strings_func.h"
|
||||
#include "vehicle_base.h"
|
||||
#include "string_func.h"
|
||||
|
||||
static int GetOrderFromTimetableWndPt(Window *w, int y, const Vehicle *v)
|
||||
{
|
||||
|
|
|
@ -40,8 +40,8 @@
|
|||
#include "transparency.h"
|
||||
#include "tunnelbridge_map.h"
|
||||
#include "strings_func.h"
|
||||
#include "string.h"
|
||||
#include "window_func.h"
|
||||
#include "string_func.h"
|
||||
|
||||
|
||||
/* Initialize the town-pool */
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "stdafx.h"
|
||||
#include "openttd.h"
|
||||
#include "string.h"
|
||||
#include "table/strings.h"
|
||||
#include "variables.h"
|
||||
#include "textbuf_gui.h"
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
#include "variables.h"
|
||||
#include "autoreplace_func.h"
|
||||
#include "autoreplace_gui.h"
|
||||
#include "string_func.h"
|
||||
|
||||
#define INVALID_COORD (0x7fffffff)
|
||||
#define GEN_HASH(x, y) ((GB((y), 6, 6) << 6) + GB((x), 7, 6))
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "vehicle_func.h"
|
||||
#include "autoreplace_gui.h"
|
||||
#include "core/alloc_func.hpp"
|
||||
#include "string_func.h"
|
||||
|
||||
struct Sorting {
|
||||
Listing aircraft;
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include "table/strings.h"
|
||||
#include "yapf/yapf.h"
|
||||
#include "newgrf.h"
|
||||
#include "string.h"
|
||||
#include "misc/autoptr.hpp"
|
||||
#include "strings_func.h"
|
||||
#include "viewport.h"
|
||||
|
@ -29,6 +28,7 @@
|
|||
#include "date_func.h"
|
||||
#include "vehicle_func.h"
|
||||
#include "vehicle_base.h"
|
||||
#include "string_func.h"
|
||||
|
||||
enum {
|
||||
MAX_WAYPOINTS_PER_TOWN = 64,
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include "openttd.h"
|
||||
#include "debug.h"
|
||||
#include "saveload.h"
|
||||
#include "string.h"
|
||||
#include "gfx_func.h"
|
||||
#include "textbuf_gui.h"
|
||||
#include "fileio.h"
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#ifndef WINDOW_GUI_H
|
||||
#define WINDOW_GUI_H
|
||||
|
||||
#include "string.h"
|
||||
#include "order.h"
|
||||
#include "rail_type.h"
|
||||
#include "road_type.h"
|
||||
|
|
Loading…
Reference in New Issue