diff options
-rw-r--r-- | engines/xeen/dialogs.cpp | 8 | ||||
-rw-r--r-- | engines/xeen/dialogs.h | 7 | ||||
-rw-r--r-- | engines/xeen/dialogs_awards.cpp | 2 |
3 files changed, 16 insertions, 1 deletions
diff --git a/engines/xeen/dialogs.cpp b/engines/xeen/dialogs.cpp index 3062bec908..04d56d72bf 100644 --- a/engines/xeen/dialogs.cpp +++ b/engines/xeen/dialogs.cpp @@ -160,6 +160,14 @@ void ButtonContainer::loadStrings(const Common::String &name) { f.close(); } +void ButtonContainer::loadStrings(const Common::String &name, int ccMode) { + File f(name, ccMode); + _textStrings.clear(); + while (f.pos() < f.size()) + _textStrings.push_back(f.readString()); + f.close(); +} + /*------------------------------------------------------------------------*/ void SettingsBaseDialog::showContents(SpriteResource &title1, bool waitFlag) { diff --git a/engines/xeen/dialogs.h b/engines/xeen/dialogs.h index 92e2d3ba6d..d0bf20108b 100644 --- a/engines/xeen/dialogs.h +++ b/engines/xeen/dialogs.h @@ -70,6 +70,13 @@ protected: * @param name Name of resource containing strings */ void loadStrings(const Common::String &name); + + /** + * Load a set of text strings from the given resource + * @param name Name of resource containing strings + * @param ccMode Optional cc file number to explicitly use + */ + void loadStrings(const Common::String &name, int ccMode); public: ButtonContainer(XeenEngine *vm) : Cutscenes(vm), _buttonValue(0) {} diff --git a/engines/xeen/dialogs_awards.cpp b/engines/xeen/dialogs_awards.cpp index 91421cab16..ab1b79193b 100644 --- a/engines/xeen/dialogs_awards.cpp +++ b/engines/xeen/dialogs_awards.cpp @@ -41,7 +41,7 @@ void Awards::execute(const Character *ch) { Mode oldMode = g_vm->_mode; int topIndex = 0; - loadStrings("award.bin"); + loadStrings("award.bin", 1); addButtons(); // Open the window and draw contents |