From b9a11ddb0b69910418d0ccc8cf303a2e2a181f3a Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 13 Feb 2010 17:46:44 +0000 Subject: SCI: Move language related code from EngineState to SciEngine svn-id: r48052 --- engines/sci/sci.h | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'engines/sci/sci.h') diff --git a/engines/sci/sci.h b/engines/sci/sci.h index 2138b131cd..088b4312bf 100644 --- a/engines/sci/sci.h +++ b/engines/sci/sci.h @@ -100,8 +100,6 @@ enum kDebugLevels { kDebugLevelOnStartup = 1 << 23 }; -extern const char *versionNames[]; - /** SCI versions */ enum SciVersion { SCI_VERSION_NONE, @@ -124,6 +122,19 @@ enum MoveCountType { kIncrementMoveCount }; +/** Supported languages */ +enum kLanguage { + K_LANG_NONE = 0, + K_LANG_ENGLISH = 1, + K_LANG_FRENCH = 33, + K_LANG_SPANISH = 34, + K_LANG_ITALIAN = 39, + K_LANG_GERMAN = 49, + K_LANG_JAPANESE = 81, + K_LANG_PORTUGUESE = 351 +}; + + class SciEngine : public Engine { friend class Console; public: @@ -165,6 +176,22 @@ public: /** Remove the 'TARGET-' prefix of the given filename, if present. */ Common::String unwrapFilename(const Common::String &name) const; +public: + + /** + * Processes a multilanguage string based on the current language settings and + * returns a string that is ready to be displayed. + * @param str the multilanguage string + * @param sep optional seperator between main language and subtitle language, + * if NULL is passed no subtitle will be added to the returned string + * @return processed string + */ + Common::String strSplit(const char *str, const char *sep = "\r----------\r"); + + kLanguage getSciLanguage(); + + Common::String getSciLanguageString(const char *str, kLanguage lang) const; + public: GfxAnimate *_gfxAnimate; // Animate for 16-bit gfx GfxCache *_gfxCache; -- cgit v1.2.3