diff options
Diffstat (limited to 'engines/touche')
-rw-r--r-- | engines/touche/opcodes.cpp | 2 | ||||
-rw-r--r-- | engines/touche/resource.cpp | 5 | ||||
-rw-r--r-- | engines/touche/touche.h | 3 |
3 files changed, 6 insertions, 4 deletions
diff --git a/engines/touche/opcodes.cpp b/engines/touche/opcodes.cpp index e545d9d404..2011384348 100644 --- a/engines/touche/opcodes.cpp +++ b/engines/touche/opcodes.cpp @@ -382,7 +382,7 @@ void ToucheEngine::op_endConversation() { debugC(9, kDebugOpcodes, "ToucheEngine::op_endConversation()"); _script.quitFlag = 1; _conversationEnded = true; - _disabledInputCounter = false; + _disabledInputCounter = 0; } void ToucheEngine::op_stopScript() { diff --git a/engines/touche/resource.cpp b/engines/touche/resource.cpp index f047cd8bd7..bd96793259 100644 --- a/engines/touche/resource.cpp +++ b/engines/touche/resource.cpp @@ -115,7 +115,7 @@ void ToucheEngine::res_allocateTables() { } } - _programData = (uint8 *)malloc(61440); + _programData = (uint8 *)malloc(kMaxProgramDataSize); if (!_programData) { error("Unable to allocate memory for program data"); } @@ -240,6 +240,7 @@ void ToucheEngine::res_loadProgram(int num) { debugC(9, kDebugResource, "ToucheEngine::res_loadProgram() num=%d", num); const uint32 offs = res_getDataOffset(kResourceTypeProgram, num, &_programDataSize); _fData.seek(offs); + assert(_programDataSize < kMaxProgramDataSize); _fData.read(_programData, _programDataSize); } @@ -622,7 +623,7 @@ void ToucheEngine::res_loadSpeech(int num) { void ToucheEngine::res_loadSpeechSegment(int num) { debugC(9, kDebugResource, "ToucheEngine::res_loadSpeechSegment() num=%d", num); - if (_talkTextMode != kTalkModeTextOnly) { + if (_talkTextMode != kTalkModeTextOnly && _flagsTable[617] != 0) { Audio::AudioStream *stream = 0; if (_compressedSpeechData < 0) { // uncompressed speech data int i = 0; diff --git a/engines/touche/touche.h b/engines/touche/touche.h index 33f2faa266..546c5286b0 100644 --- a/engines/touche/touche.h +++ b/engines/touche/touche.h @@ -322,7 +322,8 @@ enum { kIconWidth = 58, kIconHeight = 42, kCursorWidth = 58, - kCursorHeight = 42 + kCursorHeight = 42, + kMaxProgramDataSize = 61440 }; class MidiPlayer; |