|
OpenTTD Source
14.0-beta3
|
Go to the source code of this file.
Data Structures | |
| struct | StringParam |
| struct | LanguageStrings |
| Container for the raw (unencoded) language strings of a language. More... | |
| struct | GameStrings |
| Container for all the game strings. More... | |
Typedefs | |
| using | StringParams = std::vector< StringParam > |
| using | StringParamsList = std::vector< StringParams > |
Functions | |
| const char * | GetGameStringPtr (uint id) |
| Get the string pointer of a particular game string. More... | |
| const StringParams & | GetGameStringParams (uint id) |
| Get the string parameters of a particular game string. More... | |
| const std::string & | GetGameStringName (uint id) |
| Get the name of a particular game string. More... | |
| void | RegisterGameTranslation (class Squirrel *engine) |
| Register the current translation to the Squirrel engine. More... | |
| void | ReconsiderGameScriptLanguage () |
| Reconsider the game script language, so we use the right one. | |
Base functions regarding game texts.
Definition in file game_text.hpp.
| const std::string& GetGameStringName | ( | uint | id | ) |
Get the name of a particular game string.
| id | The ID of the game string. |
Definition at line 345 of file game_text.cpp.
References _current_data, and GameStrings::string_names.
| const StringParams& GetGameStringParams | ( | uint | id | ) |
Get the string parameters of a particular game string.
| id | The ID of the game string. |
Definition at line 331 of file game_text.cpp.
References _current_data, and GameStrings::string_params.
| const char* GetGameStringPtr | ( | uint | id | ) |
Get the string pointer of a particular game string.
| id | The ID of the game string. |
Definition at line 320 of file game_text.cpp.
References _current_data, GameStrings::cur_language, and LanguageStrings::lines.
| void RegisterGameTranslation | ( | Squirrel * | engine | ) |
Register the current translation to the Squirrel engine.
| engine | The engine to update/ |
Definition at line 358 of file game_text.cpp.
References _current_data, Squirrel::GetVM(), LoadTranslations(), ReconsiderGameScriptLanguage(), and GameStrings::string_names.
Referenced by GameInstance::RegisterAPI().