Changeset - r22550:5a1c0341c400
[Not reviewed]
master
0 5 0
frosch - 8 years ago 2017-02-26 19:41:14
frosch@openttd.org
(svn r27757) -Change: Make StringID 32bit.
5 files changed with 8 insertions and 8 deletions:
0 comments (0 inline, 0 general)
src/company_base.h
Show inline comments
 
@@ -52,10 +52,10 @@ extern CompanyPool _company_pool;
 
/** Statically loadable part of Company pool item */
 
struct CompanyProperties {
 
	uint32 name_2;                   ///< Parameter of #name_1.
 
	uint16 name_1;                   ///< Name of the company if the user did not change it.
 
	StringID name_1;                 ///< Name of the company if the user did not change it.
 
	char *name;                      ///< Name of the company if the user changed it.
 

	
 
	uint16 president_name_1;         ///< Name of the president if the user did not change it.
 
	StringID president_name_1;       ///< Name of the president if the user did not change it.
 
	uint32 president_name_2;         ///< Parameter of #president_name_1
 
	char *president_name;            ///< Name of the president if the user changed it.
 

	
src/saveload/company_sl.cpp
Show inline comments
 
@@ -244,7 +244,7 @@ static const SaveLoad _company_desc[] = 
 
	    SLE_VAR(CompanyProperties, name_1,          SLE_STRINGID),
 
	SLE_CONDSTR(CompanyProperties, name,            SLE_STR | SLF_ALLOW_CONTROL, 0, 84, SL_MAX_VERSION),
 

	
 
	    SLE_VAR(CompanyProperties, president_name_1, SLE_UINT16),
 
	    SLE_VAR(CompanyProperties, president_name_1, SLE_STRINGID),
 
	    SLE_VAR(CompanyProperties, president_name_2, SLE_UINT32),
 
	SLE_CONDSTR(CompanyProperties, president_name,  SLE_STR | SLF_ALLOW_CONTROL, 0, 84, SL_MAX_VERSION),
 

	
src/saveload/saveload.h
Show inline comments
 
@@ -49,7 +49,7 @@ enum SavegameType {
 
extern FileToSaveLoad _file_to_saveload;
 

	
 
void GenerateDefaultSaveName(char *buf, const char *last);
 
void SetSaveLoadError(uint16 str);
 
void SetSaveLoadError(StringID str);
 
const char *GetSaveLoadErrorString();
 
SaveOrLoadResult SaveOrLoad(const char *filename, SaveLoadOperation fop, DetailedFileType dft, Subdirectory sb, bool threaded = true);
 
void WaitTillSaved();
 
@@ -161,7 +161,7 @@ enum VarTypes {
 
	SLE_INT64        = SLE_FILE_I64 | SLE_VAR_I64,
 
	SLE_UINT64       = SLE_FILE_U64 | SLE_VAR_U64,
 
	SLE_CHAR         = SLE_FILE_I8  | SLE_VAR_CHAR,
 
	SLE_STRINGID     = SLE_FILE_STRINGID | SLE_VAR_U16,
 
	SLE_STRINGID     = SLE_FILE_STRINGID | SLE_VAR_U32,
 
	SLE_STRINGBUF    = SLE_FILE_STRING   | SLE_VAR_STRB,
 
	SLE_STRINGBQUOTE = SLE_FILE_STRING   | SLE_VAR_STRBQ,
 
	SLE_STRING       = SLE_FILE_STRING   | SLE_VAR_STR,
src/script/api/script_types.hpp
Show inline comments
 
@@ -98,7 +98,7 @@ typedef uint8 IndustryType;  ///< The ID
 
typedef OverflowSafeInt64 Money; ///< Money, stored in a 32bit/64bit safe way. For scripts money is always in pounds.
 
typedef uint16 SignID;       ///< The ID of a sign.
 
typedef uint16 StationID;    ///< The ID of a station.
 
typedef uint16 StringID;     ///< The ID of a string.
 
typedef uint32 StringID;     ///< The ID of a string.
 
typedef uint16 SubsidyID;    ///< The ID of a subsidy.
 
typedef uint16 StoryPageID;  ///< The ID of a story page.
 
typedef uint16 StoryPageElementID; ///< The ID of a story page element.
src/strings_type.h
Show inline comments
 
@@ -15,8 +15,8 @@
 
/**
 
 * Numeric value that represents a string, independent of the selected language.
 
 */
 
typedef uint16 StringID;
 
static const StringID INVALID_STRING_ID = 0xFFFF; ///< Constant representing an invalid string
 
typedef uint32 StringID;
 
static const StringID INVALID_STRING_ID = 0xFFFF; ///< Constant representing an invalid string (16bit in case it is used in savegames)
 
static const int MAX_CHAR_LENGTH        = 4;      ///< Max. length of UTF-8 encoded unicode character
 
static const uint MAX_LANG              = 0x7F;   ///< Maximum number of languages supported by the game, and the NewGRF specs
 

	
0 comments (0 inline, 0 general)