diff options
author | Filippos Karapetis | 2015-06-07 20:51:16 +0300 |
---|---|---|
committer | Filippos Karapetis | 2015-06-07 20:51:45 +0300 |
commit | dc43979a9c73e7f93733d050716b8afd02a1741c (patch) | |
tree | 3dd525c18a4fb28aaf41a47554889eb3c1126cfb /engines/sherlock/scalpel/scalpel_talk.cpp | |
parent | 0f8f40c11185edd361bedf443f79b64328be6088 (diff) | |
download | scummvm-rg350-dc43979a9c73e7f93733d050716b8afd02a1741c.tar.gz scummvm-rg350-dc43979a9c73e7f93733d050716b8afd02a1741c.tar.bz2 scummvm-rg350-dc43979a9c73e7f93733d050716b8afd02a1741c.zip |
SHERLOCK: Split cmdGotoScene and add the Rose Tattoo implementation
This also adds some code missing from the Serrated Scalpel implementation
Diffstat (limited to 'engines/sherlock/scalpel/scalpel_talk.cpp')
-rw-r--r-- | engines/sherlock/scalpel/scalpel_talk.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/engines/sherlock/scalpel/scalpel_talk.cpp b/engines/sherlock/scalpel/scalpel_talk.cpp index b3ac27c137..2d9db77552 100644 --- a/engines/sherlock/scalpel/scalpel_talk.cpp +++ b/engines/sherlock/scalpel/scalpel_talk.cpp @@ -287,6 +287,40 @@ OpcodeReturn ScalpelTalk::cmdSwitchSpeaker(const byte *&str) { return RET_SUCCESS; } +OpcodeReturn ScalpelTalk::cmdGotoScene(const byte *&str) { + Map &map = *_vm->_map; + People &people = *_vm->_people; + Scene &scene = *_vm->_scene; + scene._goToScene = str[1] - 1; + + if (scene._goToScene != 100) { + // Not going to the map overview + map._oldCharPoint = scene._goToScene; + map._overPos.x = map[scene._goToScene].x * 100 - 600; + map._overPos.y = map[scene._goToScene].y * 100 + 900; + + // Run a canimation? + if (str[2] > 100) { + people._hSavedFacing = str[2]; + people._hSavedPos = Point32(160, 100); + } else { + people._hSavedFacing = str[2] - 1; + int32 posX = (str[3] - 1) * 256 + str[4] - 1; + int32 posY = str[5] - 1; + people._hSavedPos = Point32(posX, posY); + } + } // if (scene._goToScene != 100) + + str += 6; + + _scriptMoreFlag = (scene._goToScene == 100) ? 2 : 1; + _scriptSaveIndex = str - _scriptStart; + _endStr = true; + _wait = 0; + + return RET_SUCCESS; +} + OpcodeReturn ScalpelTalk::cmdAssignPortraitLocation(const byte *&str) { People &people = *_vm->_people; |