diff options
author | Paul Gilbert | 2017-12-29 22:26:13 -0500 |
---|---|---|
committer | Paul Gilbert | 2017-12-29 22:26:13 -0500 |
commit | 2fac15ad29eff1b44ae433868448ede8d627e76b (patch) | |
tree | baccda8d819c4d0a66a81d7f84d38685df29e80e | |
parent | e5ab69614823578eefdd4cb9efa6bc4d9b9e1ffb (diff) | |
download | scummvm-rg350-2fac15ad29eff1b44ae433868448ede8d627e76b.tar.gz scummvm-rg350-2fac15ad29eff1b44ae433868448ede8d627e76b.tar.bz2 scummvm-rg350-2fac15ad29eff1b44ae433868448ede8d627e76b.zip |
XEEN: Fix showing Dark Side awards in the awards dialog
-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 |