Permalink
Browse files

XEEN: Fix showing Dark Side awards in the awards dialog

  • Loading branch information...
dreammaster committed Dec 30, 2017
1 parent e5ab696 commit 2fac15ad29eff1b44ae433868448ede8d627e76b
Showing with 16 additions and 1 deletion.
  1. +8 −0 engines/xeen/dialogs.cpp
  2. +7 −0 engines/xeen/dialogs.h
  3. +1 −1 engines/xeen/dialogs_awards.cpp
View
@@ -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) {
View
@@ -70,6 +70,13 @@ class ButtonContainer : public Cutscenes {
* @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) {}
@@ -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

0 comments on commit 2fac15a

Please sign in to comment.