File diff r23538:8df50944b27a → r23539:bce8329ee42d
src/newgrf_text.h
Show inline comments
 
@@ -50,20 +50,20 @@ struct LanguageMap {
 
		byte newgrf_id;  ///< NewGRF's internal ID for a case/gender.
 
		byte openttd_id; ///< OpenTTD's internal ID for a case/gender.
 
	};
 

	
 
	/* We need a vector and can't use SmallMap due to the fact that for "setting" a
 
	 * gender of a string or requesting a case for a substring we want to map from
 
	 * the NewGRF's internal ID to OpenTTD's ID whereas for the choice lists we map
 
	 * the genders/cases/plural OpenTTD IDs to the NewGRF's internal IDs. In this
 
	 * case a NewGRF developer/translator might want a different translation for
 
	 * both cases. Thus we are basically implementing a multi-map. */
 
	std::vector<Mapping> gender_map; ///< Mapping of NewGRF and OpenTTD IDs for genders.
 
	std::vector<Mapping> case_map;   ///< Mapping of NewGRF and OpenTTD IDs for cases.
 
	int plural_form;                    ///< The plural form used for this language.
 
	int plural_form;                 ///< The plural form used for this language.
 

	
 
	int GetMapping(int newgrf_id, bool gender) const;
 
	int GetReverseMapping(int openttd_id, bool gender) const;
 
	static const LanguageMap *GetLanguageMap(uint32 grfid, uint8 language_id);
 
};
 

	
 
#endif /* NEWGRF_TEXT_H */