10#ifndef NEWGRF_TEXT_TYPE_H
11#define NEWGRF_TEXT_TYPE_H
67 int GetMapping(
int newgrf_id,
bool gender)
const;
GRFLanguage
Incomplete enumeration of the (New)GRF languages.
@ Unspecified
No specific language.
@ English
English (English UK).
@ End
End marker of the valid languages.
@ Fallback
Default fallback language.
@ American
American (English US).
StrongType::Typedef< uint32_t, struct GRFStringIDTag, StrongType::Compare, StrongType::Integer > GRFStringID
Type for GRF-internal string IDs.
std::shared_ptr< GRFTextList > GRFTextWrapper
Reference counted wrapper around a GRFText pointer.
std::vector< GRFText > GRFTextList
A GRF text with a list of translations.
static constexpr GRFStringID GRFSTR_MISC_GRF_TEXT
Miscellaneous GRF text range.
static const char32_t NFO_UTF8_IDENTIFIER
This character (thorn) indicates a unicode string to NFO.
Commonly used types for the NewGRF implementation.
uint32_t GrfID
The unique identifier of a NewGRF.
Type (helpers) for making a strong typedef that is a distinct type.
A GRF text with associated language ID.
GRFLanguage langid
The language associated with this GRFText.
std::string text
The actual (translated) text.
Mapping between NewGRF and OpenTTD IDs.
uint8_t newgrf_id
NewGRF's internal ID for a case/gender.
uint8_t openttd_id
OpenTTD's internal ID for a case/gender.
Mapping of language data between a NewGRF and OpenTTD.
std::vector< Mapping > gender_map
Mapping of NewGRF and OpenTTD IDs for genders.
int GetReverseMapping(int openttd_id, bool gender) const
Get the mapping from OpenTTD's internal ID to the NewGRF supplied ID.
int plural_form
The plural form used for this language.
static const LanguageMap * GetLanguageMap(GrfID grfid, GRFLanguage language_id)
Get the language map associated with a given NewGRF and language.
std::vector< Mapping > case_map
Mapping of NewGRF and OpenTTD IDs for cases.
int GetMapping(int newgrf_id, bool gender) const
Get the mapping from the NewGRF supplied ID to OpenTTD's internal ID.
Templated helper to make a type-safe 'typedef' representing a single POD value.