diff options
-rw-r--r-- | engines/sherlock/talk.cpp | 4 | ||||
-rw-r--r-- | engines/sherlock/talk.h | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp index 93285e217c..dd2a2a93ca 100644 --- a/engines/sherlock/talk.cpp +++ b/engines/sherlock/talk.cpp @@ -123,6 +123,8 @@ Talk::Talk(SherlockEngine *vm) : _vm(vm) { _seqCount = 0; _scriptStart = _scriptEnd = nullptr; _endStr = _noTextYet = false; + + _talkHistory.resize(IS_ROSE_TATTOO ? 1500 : 500); } void Talk::talkTo(const Common::String &filename) { @@ -1309,7 +1311,7 @@ void Talk::popStack() { } void Talk::synchronize(Common::Serializer &s) { - for (int idx = 0; idx < MAX_TALK_FILES; ++idx) { + for (uint idx = 0; idx < _talkHistory.size(); ++idx) { TalkHistoryEntry &he = _talkHistory[idx]; for (int flag = 0; flag < 16; ++flag) diff --git a/engines/sherlock/talk.h b/engines/sherlock/talk.h index ef1b42fb7d..ccd09aee66 100644 --- a/engines/sherlock/talk.h +++ b/engines/sherlock/talk.h @@ -35,7 +35,6 @@ namespace Sherlock { #define SPEAKER_REMOVE 0x80 #define MAX_TALK_SEQUENCES 11 -#define MAX_TALK_FILES 500 #define TALK_SEQUENCE_STACK_SIZE 20 enum { @@ -211,7 +210,7 @@ protected: Common::Stack<SequenceEntry> _sequenceStack; Common::Stack<ScriptStackEntry> _scriptStack; Common::Array<Statement> _statements; - TalkHistoryEntry _talkHistory[MAX_TALK_FILES]; + Common::Array<TalkHistoryEntry> _talkHistory; int _speaker; int _talkIndex; int _scriptSelect; |