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/tattoo | |
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/tattoo')
-rw-r--r-- | engines/sherlock/tattoo/tattoo_talk.cpp | 36 | ||||
-rw-r--r-- | engines/sherlock/tattoo/tattoo_talk.h | 1 |
2 files changed, 37 insertions, 0 deletions
diff --git a/engines/sherlock/tattoo/tattoo_talk.cpp b/engines/sherlock/tattoo/tattoo_talk.cpp index 9e20ad4237..92e64a87cd 100644 --- a/engines/sherlock/tattoo/tattoo_talk.cpp +++ b/engines/sherlock/tattoo/tattoo_talk.cpp @@ -230,6 +230,42 @@ OpcodeReturn TattooTalk::cmdMouseOnOff(const byte *&str) { return RET_SUCCESS; } +OpcodeReturn TattooTalk::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; + + // 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; + if (posX > 16384) + posX = -1 * (posX - 16384); + int32 posY = (str[5] - 1) * 256 + str[6] - 1; + people._hSavedPos = Point32(posX, posY); + } + + _scriptMoreFlag = 1; + } // if (scene._goToScene != 100) + + str += 7; + if (scene._goToScene != 100) + _scriptSaveIndex = str - _scriptStart; + + _endStr = true; + _wait = 0; + + return RET_SUCCESS; +} + OpcodeReturn TattooTalk::cmdNextSong(const byte *&str) { Sound &sound = *_vm->_sound; diff --git a/engines/sherlock/tattoo/tattoo_talk.h b/engines/sherlock/tattoo/tattoo_talk.h index 0b5e7e4ae7..ab032a7434 100644 --- a/engines/sherlock/tattoo/tattoo_talk.h +++ b/engines/sherlock/tattoo/tattoo_talk.h @@ -39,6 +39,7 @@ class TattooTalk : public Talk { private: OpcodeReturn cmdSwitchSpeaker(const byte *&str); OpcodeReturn cmdMouseOnOff(const byte *&str); + OpcodeReturn cmdGotoScene(const byte *&str); OpcodeReturn cmdNextSong(const byte *&str); OpcodeReturn cmdPassword(const byte *&str); OpcodeReturn cmdPlaySong(const byte *&str); |