diff options
author | Paul Gilbert | 2015-04-11 17:50:07 -0500 |
---|---|---|
committer | Paul Gilbert | 2015-04-11 17:50:07 -0500 |
commit | 0f0321eb43fa321319805db8264601d0f2646282 (patch) | |
tree | 365cf53440626774c7f453e2e7282b4bae8475f2 /engines | |
parent | 0d4d8e878cfba4ea9c32dc46e4923886df95395c (diff) | |
download | scummvm-rg350-0f0321eb43fa321319805db8264601d0f2646282.tar.gz scummvm-rg350-0f0321eb43fa321319805db8264601d0f2646282.tar.bz2 scummvm-rg350-0f0321eb43fa321319805db8264601d0f2646282.zip |
SHERLOCK: Fix startup initialization
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sherlock/talk.cpp | 9 | ||||
-rw-r--r-- | engines/sherlock/user_interface.cpp | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp index c97f2a0646..ec3f67bd84 100644 --- a/engines/sherlock/talk.cpp +++ b/engines/sherlock/talk.cpp @@ -134,7 +134,7 @@ Talk::Talk(SherlockEngine *vm): _vm(vm) { _talkStealth = 0; _talkToFlag = -1; _moreTalkDown = _moreTalkUp = false; - _scriptMoreFlag = 1; + _scriptMoreFlag = false; _scriptSaveIndex = -1; _scriptCurrentIndex = -1; } @@ -683,7 +683,7 @@ void Talk::drawInterface() { int strWidth = screen.stringWidth(PRESS_KEY_TO_CONTINUE); screen.makeButton(Common::Rect(46, CONTROLS_Y, 273, CONTROLS_Y + 10), 160 - strWidth, PRESS_KEY_TO_CONTINUE); - screen.gPrint(Common::Point(160 - strWidth / 2, CONTROLS_Y), COMMAND_FOREGROUND, false, "P"); + screen.gPrint(Common::Point(160 - strWidth / 2, CONTROLS_Y), COMMAND_FOREGROUND, "P"); } } @@ -880,6 +880,9 @@ void Talk::clearSequences() { void Talk::pullSequence() { Scene &scene = *_vm->_scene; + if (_scriptStack.empty()) + return; + SequenceEntry seq = _scriptStack.pop(); if (seq._objNum != -1) { Object &obj = scene._bgShapes[seq._objNum]; @@ -1518,6 +1521,8 @@ void Talk::doScript(const Common::String &script) { int width = 0, idx = 0; do { width += screen.charWidth(str[idx]); + ++idx; + ++charCount; } while (width < 298 && str[idx] && str[idx] != '{' && str[idx] < 128); if (str[idx] || width >= 298) { diff --git a/engines/sherlock/user_interface.cpp b/engines/sherlock/user_interface.cpp index 88265f6a19..2b808a085a 100644 --- a/engines/sherlock/user_interface.cpp +++ b/engines/sherlock/user_interface.cpp @@ -86,6 +86,8 @@ UserInterface::UserInterface(SherlockEngine *vm) : _vm(vm) { _find = 0; _oldUse = 0; _endKeyActive = true; + _lookScriptFlag = false; + _infoFlag = false; } UserInterface::~UserInterface() { |