|
OpenTTD Source 20251116-master-g21329071df
|
Helper structure for mapping choice lists. More...
Public Member Functions | |
| UnmappedChoiceList (StringControlCode type, int offset) | |
| Initialise the mapping. | |
| void | Flush (const LanguageMap *lm, std::string &dest) |
| Flush this choice list into the destination string. | |
Data Fields | |
| StringControlCode | type |
| The type of choice list. | |
| int | offset |
| The offset for the plural/gender form. | |
| std::map< int, std::string > | strings |
| Mapping of NewGRF supplied ID to the different strings in the choice list. | |
Helper structure for mapping choice lists.
Definition at line 111 of file newgrf_text.cpp.
|
inline |
Initialise the mapping.
| type | The type of mapping. |
| offset | The offset to get the plural/gender from. |
Definition at line 117 of file newgrf_text.cpp.
|
inline |
Flush this choice list into the destination string.
| lm | The current language mapping. |
| dest | Target to write to. |
Definition at line 133 of file newgrf_text.cpp.
References _current_language, LanguageMap::GetReverseMapping(), LanguagePackHeader::num_cases, LanguagePackHeader::num_genders, LanguageMap::plural_form, BaseStringBuilder::PutUint16LE(), BaseStringBuilder::PutUint8(), and BaseStringBuilder::PutUtf8().
| int UnmappedChoiceList::offset |
The offset for the plural/gender form.
Definition at line 123 of file newgrf_text.cpp.
| std::map<int, std::string> UnmappedChoiceList::strings |
Mapping of NewGRF supplied ID to the different strings in the choice list.
Definition at line 126 of file newgrf_text.cpp.
| StringControlCode UnmappedChoiceList::type |
The type of choice list.
Definition at line 122 of file newgrf_text.cpp.