aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock
diff options
context:
space:
mode:
authorPaul Gilbert2015-06-06 12:03:54 -0400
committerPaul Gilbert2015-06-06 12:03:54 -0400
commit57017e4bc121765c7cd51c6fab4d1210aeace193 (patch)
tree8a920113fb0b7398351381262be86b5b69def191 /engines/sherlock
parente48d6aecae1c442b9a9f7afd4def8ff04e28dde3 (diff)
downloadscummvm-rg350-57017e4bc121765c7cd51c6fab4d1210aeace193.tar.gz
scummvm-rg350-57017e4bc121765c7cd51c6fab4d1210aeace193.tar.bz2
scummvm-rg350-57017e4bc121765c7cd51c6fab4d1210aeace193.zip
SHERLOCK: Increase size of RT _talkHistory
Diffstat (limited to 'engines/sherlock')
-rw-r--r--engines/sherlock/talk.cpp4
-rw-r--r--engines/sherlock/talk.h3
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;