From c313113f6b72524c1bdc41fd30c2bdc4182de3a4 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 7 Feb 2015 18:32:37 -0500 Subject: XEEN: Fix for switching modes and loading auto notes in Quests dialog --- engines/xeen/dialogs_quests.cpp | 10 ++++++++-- engines/xeen/resources.cpp | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/engines/xeen/dialogs_quests.cpp b/engines/xeen/dialogs_quests.cpp index 146415b6c2..284e15781b 100644 --- a/engines/xeen/dialogs_quests.cpp +++ b/engines/xeen/dialogs_quests.cpp @@ -40,7 +40,7 @@ void Quests::execute() { EventsManager &events = *_vm->_events; Party &party = *_vm->_party; Screen &screen = *_vm->_screen; - bool isDarkCc = _vm->_files->_isDarkCc; + Mode oldMode = _vm->_mode; int count = 0; bool headerShown = false; int topRow = 0; @@ -190,12 +190,15 @@ void Quests::execute() { switch (_buttonValue) { case Common::KEYCODE_a: mode = AUTO_NOTES; + topRow = 0; break; case Common::KEYCODE_i: mode = QUEST_ITEMS; + topRow = 0; break; case Common::KEYCODE_q: mode = CURRENT_QUESTS; + topRow = 0; break; case Common::KEYCODE_HOME: topRow = 0; @@ -226,10 +229,13 @@ void Quests::execute() { screen._windows[30].close(); screen._windows[29].close(); } + _vm->_mode = oldMode; } void Quests::addButtons() { _iconSprites.load("quest.icn"); + + addButton(Common::Rect(12, 109, 36, 129), Common::KEYCODE_i, &_iconSprites); addButton(Common::Rect(80, 109, 104, 129), Common::KEYCODE_q, &_iconSprites); addButton(Common::Rect(148, 109, 172, 129), Common::KEYCODE_a, &_iconSprites); @@ -239,7 +245,7 @@ void Quests::addButtons() { } void Quests::loadQuestNotes() { - File f("qnotes.bin"); + File f("qnotes.bin", *_vm->_files->_sideArchives[_vm->getGameID() == GType_Clouds ? 0 : 1]); while (f.pos() < f.size()) _questNotes.push_back(f.readString()); f.close(); diff --git a/engines/xeen/resources.cpp b/engines/xeen/resources.cpp index 5a50e076ca..204e727326 100644 --- a/engines/xeen/resources.cpp +++ b/engines/xeen/resources.cpp @@ -1206,7 +1206,7 @@ const char *const QUEST_ITEM_NAMES[85] = { "Bridle", "Enchanted Bridle", "Treasure Map (Goto E1 x1, y11)", - nullptr, + "", "Fake Map", "Onyx Necklace", "Dragon Egg", -- cgit v1.2.3