diff options
-rw-r--r-- | engines/sherlock/journal.cpp | 10 | ||||
-rw-r--r-- | engines/sherlock/journal.h | 1 | ||||
-rw-r--r-- | engines/sherlock/talk.h | 2 |
3 files changed, 6 insertions, 7 deletions
diff --git a/engines/sherlock/journal.cpp b/engines/sherlock/journal.cpp index a9252d111a..2a7aeb4f2d 100644 --- a/engines/sherlock/journal.cpp +++ b/engines/sherlock/journal.cpp @@ -56,7 +56,6 @@ Journal::Journal(SherlockEngine *vm): _vm(vm) { _sub = 0; _up = _down = false; _page = 1; - _converseNum = -1; // Load the journal directory and location names loadJournalLocations(); @@ -151,11 +150,11 @@ void Journal::loadJournalFile(bool alreadyLoaded) { // If not flagged as alrady loaded, load the conversation into script variables if (!alreadyLoaded) { // See if the file to be used is already loaded - if (journalEntry._converseNum != _converseNum) { + if (journalEntry._converseNum != talk._converseNum) { // Nope. Free any previously loaded talk talk.freeTalkVars(); - // Find the person being talked to + // Find the person being referred to talk._talkTo = -1; for (int idx = 0; idx < MAX_PEOPLE; ++idx) { Common::String portrait = PORTRAITS[idx]; @@ -167,7 +166,7 @@ void Journal::loadJournalFile(bool alreadyLoaded) { } } - // Load the talk file + // Load their talk file talk.loadTalkFile(dirFilename); } } @@ -559,6 +558,7 @@ void Journal::doArrows() { bool Journal::drawJournal(int direction, int howFar) { Events &events = *_vm->_events; Screen &screen = *_vm->_screen; + Talk &talk = *_vm->_talk; int yp = 37; int startPage = _page; bool endJournal = false; @@ -571,7 +571,7 @@ bool Journal::drawJournal(int direction, int howFar) { const char *matchP; int width; - _converseNum = -1; + talk._converseNum = -1; _down = true; do { diff --git a/engines/sherlock/journal.h b/engines/sherlock/journal.h index ac4391b8f3..be5c4d77c3 100644 --- a/engines/sherlock/journal.h +++ b/engines/sherlock/journal.h @@ -55,7 +55,6 @@ private: int _sub; bool _up, _down; int _page; - int _converseNum; Common::String _find; void loadJournalLocations(); diff --git a/engines/sherlock/talk.h b/engines/sherlock/talk.h index 16cab493f0..d81586228f 100644 --- a/engines/sherlock/talk.h +++ b/engines/sherlock/talk.h @@ -137,7 +137,6 @@ private: int _speaker; int _talkIndex; int _scriptSelect; - int _converseNum; int _talkStealth; int _talkToFlag; int _scriptSaveIndex; @@ -160,6 +159,7 @@ public: int _scriptMoreFlag; Common::String _scriptName; bool _moreTalkUp, _moreTalkDown; + int _converseNum; public: Talk(SherlockEngine *vm); void setSequences(const byte *talkSequences, const byte *stillSequences, |