Changeset - r22550:5a1c0341c400
[Not reviewed]
master
0 5 0
frosch - 7 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
 
@@ -49,16 +49,16 @@ typedef Pool<Company, CompanyID, 1, MAX_
 
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.
 

	
 
	CompanyManagerFace face;         ///< Face description of the president.
 

	
 
	Money money;                     ///< Money owned by the company.
src/saveload/company_sl.cpp
Show inline comments
 
@@ -241,13 +241,13 @@ void AfterLoadCompanyStats()
 
/* Save/load of companies */
 
static const SaveLoad _company_desc[] = {
 
	    SLE_VAR(CompanyProperties, name_2,          SLE_UINT32),
 
	    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),
 

	
 
	    SLE_VAR(CompanyProperties, face,            SLE_UINT32),
 

	
 
	/* money was changed to a 64 bit field in savegame version 1. */
src/saveload/saveload.h
Show inline comments
 
@@ -46,13 +46,13 @@ enum SavegameType {
 
	SGT_INVALID = 0xFF, ///< broken savegame (used internally)
 
};
 

	
 
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();
 
void ProcessAsyncSaveFinish();
 
void DoExitSave();
 

	
 
@@ -158,13 +158,13 @@ enum VarTypes {
 
	SLE_UINT16       = SLE_FILE_U16 | SLE_VAR_U16,
 
	SLE_INT32        = SLE_FILE_I32 | SLE_VAR_I32,
 
	SLE_UINT32       = SLE_FILE_U32 | SLE_VAR_U32,
 
	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,
 
	SLE_STRINGQUOTE  = SLE_FILE_STRING   | SLE_VAR_STRQ,
 
	SLE_NAME         = SLE_FILE_STRINGID | SLE_VAR_NAME,
 

	
src/script/api/script_types.hpp
Show inline comments
 
@@ -95,13 +95,13 @@ typedef uint16 GoalID;       ///< The ID
 
typedef uint16 GroupID;      ///< The ID of a group.
 
typedef uint16 IndustryID;   ///< The ID of an industry.
 
typedef uint8 IndustryType;  ///< The ID of an industry-type.
 
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.
 
typedef uint32 TileIndex;    ///< The ID of a tile (just named differently).
 
typedef uint16 TownID;       ///< The ID of a town.
 
typedef uint32 VehicleID;    ///< The ID of a vehicle.
src/strings_type.h
Show inline comments
 
@@ -12,14 +12,14 @@
 
#ifndef STRINGS_TYPE_H
 
#define STRINGS_TYPE_H
 

	
 
/**
 
 * 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
 

	
 
/** Directions a text can go to */
 
enum TextDirection {
 
	TD_LTR, ///< Text is written left-to-right by default
0 comments (0 inline, 0 general)