diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/gob/pregob/pregob.cpp | 9 | ||||
-rw-r--r-- | engines/gob/pregob/pregob.h | 3 |
2 files changed, 12 insertions, 0 deletions
diff --git a/engines/gob/pregob/pregob.cpp b/engines/gob/pregob/pregob.cpp index 98b1a2e6b8..582ebc6677 100644 --- a/engines/gob/pregob/pregob.cpp +++ b/engines/gob/pregob/pregob.cpp @@ -34,6 +34,8 @@ #include "gob/pregob/pregob.h" +static char kLanguageSuffix[5] = { 't', 'g', 'a', 'e', 'i' }; + namespace Gob { PreGob::PreGob(GobEngine *vm) : _vm(vm), _fadedOut(false) { @@ -203,6 +205,13 @@ void PreGob::redrawAnim(ANIObject &ani) { drawAnim(ani); } +Common::String PreGob::getLocFile(const Common::String &file) const { + if (_vm->_global->_language >= ARRAYSIZE(kLanguageSuffix)) + return file; + + return file + kLanguageSuffix[_vm->_global->_language]; +} + TXTFile *PreGob::loadTXT(const Common::String &txtFile, TXTFile::Format format) const { Common::SeekableReadStream *txtStream = _vm->_dataIO->getFile(txtFile); if (!txtStream) diff --git a/engines/gob/pregob/pregob.h b/engines/gob/pregob/pregob.h index d087bb0d0c..902a7c437d 100644 --- a/engines/gob/pregob/pregob.h +++ b/engines/gob/pregob/pregob.h @@ -23,6 +23,8 @@ #ifndef GOB_PREGOB_PREGOB_H #define GOB_PREGOB_PREGOB_H +#include "common/str.h" + #include "gob/util.h" #include "gob/pregob/txtfile.h" @@ -79,6 +81,7 @@ protected: void drawAnim(ANIObject &ani); void redrawAnim(ANIObject &ani); + Common::String getLocFile(const Common::String &file) const; TXTFile *loadTXT(const Common::String &txtFile, TXTFile::Format format) const; |