aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2018-05-06 20:28:10 -0400
committerPaul Gilbert2018-05-06 20:28:10 -0400
commit97ad823aa449d6fc38bdda57ff474e9e9da7e2df (patch)
tree886e5e66abc982c6ff5f0006074bb67ab534b584
parentcb6b39ed77705b719d4f98e65b2254a0bbb1ffef (diff)
downloadscummvm-rg350-97ad823aa449d6fc38bdda57ff474e9e9da7e2df.tar.gz
scummvm-rg350-97ad823aa449d6fc38bdda57ff474e9e9da7e2df.tar.bz2
scummvm-rg350-97ad823aa449d6fc38bdda57ff474e9e9da7e2df.zip
XEEN: Further fixes to display of Auto Notes
-rw-r--r--engines/xeen/dialogs/dialogs_quests.cpp25
1 files changed, 20 insertions, 5 deletions
diff --git a/engines/xeen/dialogs/dialogs_quests.cpp b/engines/xeen/dialogs/dialogs_quests.cpp
index b27bdb60ef..94834c1c02 100644
--- a/engines/xeen/dialogs/dialogs_quests.cpp
+++ b/engines/xeen/dialogs/dialogs_quests.cpp
@@ -157,14 +157,29 @@ void Quests::execute() {
break;
case AUTO_NOTES: {
- int max = _vm->getGameID() == GType_Swords ? 49 : MAX_DIALOG_LINES;
- for (int idx = 0; idx < count; ++idx)
+ int max, offset;
+ switch (_vm->getGameID()) {
+ case GType_Swords:
+ max = 49;
+ offset = 51;
+ break;
+ case GType_Clouds:
+ max = MAX_DIALOG_LINES;
+ offset = 31;
+ break;
+ default:
+ max = MAX_DIALOG_LINES;
+ offset = 56;
+ break;
+ }
+
+ for (int idx = 0; idx < max; ++idx)
lines[idx] = "";
count = 0;
headerShown = false;
for (int idx = 0; idx < max; ++idx) {
- if (party._worldFlags[idx]) {
+ if (party._worldFlags[idx + (_vm->getGameID() != GType_Swords ? 1 : 0)]) {
if (!count && !headerShown && (_vm->getGameID() == GType_Swords || idx < 72)) {
lines[count++] = title1;
}
@@ -173,7 +188,7 @@ void Quests::execute() {
headerShown = true;
}
- lines[count++] = _questNotes[idx + (_vm->getGameID() == GType_Swords ? 51 : 56)];
+ lines[count++] = _questNotes[idx + offset];
}
}
@@ -262,7 +277,7 @@ void Quests::addButtons() {
}
void Quests::loadQuestNotes() {
- File f("qnotes.bin");
+ File f("qnotes.bin", 1);
while (f.pos() < f.size())
_questNotes.push_back(f.readString());
f.close();