47 std::vector<Aurora::Language> &
UNUSED(languages))
const {
53 std::vector<Aurora::Language> &
UNUSED(languagesText),
54 std::vector<Aurora::Language> &
UNUSED(languagesVoice))
const {
63 std::vector<Aurora::Language> &languagesVoice)
const {
92 bool show =
ConfigMan.getBool(
"showfps",
false);
99 }
else if (!show &&
_fps) {
107 return std::find(langs.begin(), langs.end(), lang) != langs.end();
119 status(
"Substituting %s for %s",
120 LangMan.getLanguageName(lang).c_str(),
131 status(
"Substituting %s for %s",
143 status(
"Substituting %s for %s",
156 if (!find || langs.empty())
160 warning(
"Failed to parse \"%s\" into a language", conf.
c_str());
162 status(
"Available languages:");
163 for (std::vector<Aurora::Language>::const_iterator l = langs.begin(); l != langs.end(); ++l)
166 lang = langs.front();
167 status(
"Using the first available language (%s)%s",
168 LangMan.getLanguageName(lang).c_str(), specifier.
c_str());
179 if (!find || langs.empty())
184 warning(
"This game version does not come with %s language files%s",
185 LangMan.getLanguageName(oldLang).c_str(), specifier.
c_str());
187 status(
"Available languages:");
188 for (std::vector<Aurora::Language>::const_iterator l = langs.begin(); l != langs.end(); ++l)
191 lang = langs.front();
192 status(
"Using the first available language (%s)%s",
193 LangMan.getLanguageName(lang).c_str(), specifier.
c_str());
201 std::vector<Aurora::Language> langs;
212 if (confLangText.
empty())
213 confLangText = confLang;
214 if (confLangVoice.
empty())
215 confLangVoice = confLang;
221 if (langText != langVoice) {
222 if (confLangText.
empty())
223 langText = langVoice;
224 if (confLangVoice.
empty())
225 langVoice = langText;
227 if (langText != langVoice) {
228 warning(
"Game does not support different languages for voice and text");
230 langText = langs.front();
231 status(
"Using the first available language (%s)",
LangMan.getLanguageName(langText).c_str());
235 confLang = confLangText;
255 std::vector<Aurora::Language> langsText, langsVoice;
259 if (langsText.empty() || langsVoice.empty())
266 if (confLangText.
empty())
267 confLangText = confLang;
268 if (confLangVoice.
empty())
269 confLangVoice = confLang;
287 languageText = langText;
288 languageVoice = langVoice;
virtual bool getLanguage(Aurora::Language &language) const
Return the game's current language.
Aurora::Platform _platform
Generic engine interface.
A class holding an UTF-8 string.
void reset(PointerType o=0)
Resets the pointer with the new value.
The global config manager.
bool evaluateLanguage(bool find, Aurora::Language &language) const
const char * c_str() const
Return the (utf8 encoded) string data.
static bool resolveLangUnavailable(const std::vector< Aurora::Language > &langs, Aurora::Language &lang, const Common::UString &specifier, bool find)
#define ConfigMan
Shortcut for accessing the config manager.
Utility templates and functions.
const char * kSystemFontMono
Identifier used for the monospaced system font.
An autonomous FPS display.
bool empty() const
Is the string empty?
virtual void run()=0
Run the game.
Generic Aurora engines (debug) console.
void warning(const char *s,...)
static bool resolveLangInvalid(const std::vector< Aurora::Language > &langs, Aurora::Language &lang, const Common::UString &conf, const Common::UString &specifier, bool find)
void start(Aurora::GameID game, const Common::UString &target, Aurora::Platform platform)
virtual bool changeLanguage()
Change the game's current language.
static void fiddleLangChinese(const std::vector< Aurora::Language > &langs, Aurora::Language &lang)
#define LangMan
Shortcut for accessing the language manager.
void showFPS()
Evaluate the FPS display setting and show/hide the FPS display.
Pseudo value that means either traditional or simplified Chinese.
void status(const char *s,...)
A text object displaying the current FPS.
Common::ScopedPtr< Graphics::Aurora::FPS > _fps
virtual bool detectLanguages(Aurora::GameID game, const Common::UString &target, Aurora::Platform platform, std::vector< Aurora::Language > &languages) const
Detect which languages this game instance supports.
static bool hasLanguage(const std::vector< Aurora::Language > &langs, Aurora::Language lang)
#define FontMan
Shortcut for accessing the font manager.