mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-21 00:19:29 +02:00
Better handling of encoding detection for maps and campaigns
Now VCMI will use either preferred language or install language to load maps and campaigns that are part of "core" mod, or, in other words - placed in Maps directory of H3 data (like most of manually downloaded maps and campaigns are) If game data is in English, then game can safely use encoding of player- selected language (such as Chinese) to load maps. After all, both GBK and all Win-125X encoding are superset of ASCII, so English map will always load up correctly. Maps that are part of a mod still use mod language as before - it is up to mod maker to correctly set up mod language.
This commit is contained in:
@ -62,6 +62,12 @@ public:
|
||||
/// returns ID of mod that provides selected file resource
|
||||
TModID findResourceOrigin(const ResourcePath & name) const;
|
||||
|
||||
/// Returns assumed language ID of mod that provides selected file resource
|
||||
std::string findResourceLanguage(const ResourcePath & name) const;
|
||||
|
||||
/// Returns assumed encoding of language of mod that provides selected file resource
|
||||
std::string findResourceEncoding(const ResourcePath & name) const;
|
||||
|
||||
std::string getModLanguage(const TModID & modId) const;
|
||||
|
||||
std::set<TModID> getModDependencies(const TModID & modId) const;
|
||||
|
Reference in New Issue
Block a user