OpenTTD Source 20241224-master-gee860a5c8e
|
Helper structure for mapping choice lists. More...
Public Member Functions | |
UnmappedChoiceList (StringControlCode type, int offset) | |
Initialise the mapping. | |
void | Flush (const LanguageMap *lm, std::ostringstream &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< uint8_t, std::stringstream > | strings |
Mapping of NewGRF supplied ID to the different strings in the choice list. | |
Helper structure for mapping choice lists.
Definition at line 108 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 114 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 130 of file newgrf_text.cpp.
References _current_language, GB(), LanguageMap::GetReverseMapping(), LanguagePackHeader::num_cases, LanguagePackHeader::num_genders, LanguageMap::plural_form, and Utf8Encode().
Referenced by TranslateTTDPatchCodes().
int UnmappedChoiceList::offset |
The offset for the plural/gender form.
Definition at line 120 of file newgrf_text.cpp.
std::map<uint8_t, std::stringstream> UnmappedChoiceList::strings |
Mapping of NewGRF supplied ID to the different strings in the choice list.
Definition at line 123 of file newgrf_text.cpp.
Referenced by TranslateTTDPatchCodes().
StringControlCode UnmappedChoiceList::type |
The type of choice list.
Definition at line 119 of file newgrf_text.cpp.