From 69b4ae6c6c612a5e130b0efca5a3c4869688f965 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 12 Jun 2015 20:53:56 -0400 Subject: SHERLOCK: RT: Fix loading talk/script statements --- engines/sherlock/talk.cpp | 5 +++-- engines/sherlock/talk.h | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp index b27ff3ac9a..5127d1e93b 100644 --- a/engines/sherlock/talk.cpp +++ b/engines/sherlock/talk.cpp @@ -39,7 +39,7 @@ SequenceEntry::SequenceEntry() { /*----------------------------------------------------------------*/ -void Statement::synchronize(Common::SeekableReadStream &s) { +void Statement::load(Common::SeekableReadStream &s, bool isRoseTattoo) { int length; length = s.readUint16LE(); @@ -73,6 +73,7 @@ void Statement::synchronize(Common::SeekableReadStream &s) { _portraitSide = s.readByte(); _quotient = s.readUint16LE(); + _journal = isRoseTattoo ? s.readByte() : 0; } /*----------------------------------------------------------------*/ @@ -581,7 +582,7 @@ void Talk::loadTalkFile(const Common::String &filename) { _statements.resize(talkStream->readByte()); for (uint idx = 0; idx < _statements.size(); ++idx) - _statements[idx].synchronize(*talkStream); + _statements[idx].load(*talkStream, IS_ROSE_TATTOO); delete talkStream; diff --git a/engines/sherlock/talk.h b/engines/sherlock/talk.h index e47f2d9df4..9c44f8ed83 100644 --- a/engines/sherlock/talk.h +++ b/engines/sherlock/talk.h @@ -144,11 +144,12 @@ struct Statement { int _quotient; int _talkMap; Common::Rect _talkPos; + int _journal; /** * Load the data for a single statement within a talk file */ - void synchronize(Common::SeekableReadStream &s); + void load(Common::SeekableReadStream &s, bool isRoseTattoo); }; struct TalkHistoryEntry { -- cgit v1.2.3