diff --git a/common/gui_options.cpp b/common/gui_options.cpp index 5b7d939dc46..32a7cc9c414 100644 --- a/common/gui_options.cpp +++ b/common/gui_options.cpp @@ -79,23 +79,6 @@ bool checkGameGUIOption(const String &option, const String &str) { return false; } -bool checkGameGUIOptionLanguage(Language lang, const String &str) { - if (!str.contains("lang_")) // If no languages are specified - return true; - - if (str.contains(getGameGUIOptionsDescriptionLanguage(lang))) - return true; - - return false; -} - -const String getGameGUIOptionsDescriptionLanguage(Language lang) { - if (lang == UNK_LANG) - return ""; - - return String("lang_") + getLanguageDescription(lang); -} - String parseGameGUIOptions(const String &str) { String res; diff --git a/common/gui_options.h b/common/gui_options.h index 5649f1103db..33ecccad634 100644 --- a/common/gui_options.h +++ b/common/gui_options.h @@ -23,8 +23,6 @@ #ifndef COMMON_GUI_OPTIONS_H #define COMMON_GUI_OPTIONS_H -#include "common/language.h" - #define GUIO_NONE "\000" #define GUIO_NOSUBTITLES "\001" #define GUIO_NOMUSIC "\002" @@ -68,12 +66,11 @@ namespace Common { +class String; bool checkGameGUIOption(const String &option, const String &str); -bool checkGameGUIOptionLanguage(Common::Language lang, const String &str); String parseGameGUIOptions(const String &str); const String getGameGUIOptionsDescription(const String &options); -const String getGameGUIOptionsDescriptionLanguage(Common::Language lang); /** * Updates the GUI options of the current config manager diff --git a/common/language.cpp b/common/language.cpp index 1de01b02075..898adf8d0e5 100644 --- a/common/language.cpp +++ b/common/language.cpp @@ -20,6 +20,7 @@ */ #include "common/language.h" +#include "common/gui_options.h" #include "common/str.h" namespace Common { @@ -104,4 +105,21 @@ const char *getLanguageDescription(Language id) { return 0; } +bool checkGameGUIOptionLanguage(Language lang, const String &str) { + if (!str.contains("lang_")) // If no languages are specified + return true; + + if (str.contains(getGameGUIOptionsDescriptionLanguage(lang))) + return true; + + return false; +} + +const String getGameGUIOptionsDescriptionLanguage(Language lang) { + if (lang == UNK_LANG) + return ""; + + return String("lang_") + getLanguageDescription(lang); +} + } // End of namespace Common diff --git a/common/language.h b/common/language.h index b83f0d34fd6..db552fc9c45 100644 --- a/common/language.h +++ b/common/language.h @@ -75,6 +75,12 @@ extern const char *getLanguageCode(Language id); extern const char *getLanguageLocale(Language id); extern const char *getLanguageDescription(Language id); +// TODO: Document this GUIO related function +const String getGameGUIOptionsDescriptionLanguage(Common::Language lang); + +// TODO: Document this GUIO related function +bool checkGameGUIOptionLanguage(Common::Language lang, const String &str); + } // End of namespace Common #endif