diff options
author | Paul Gilbert | 2015-06-08 08:31:51 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-06-08 08:31:51 -0400 |
commit | f5a1b626b710c368e79ab27c13cf2be4ccdcb30f (patch) | |
tree | d9c49fe86f3c9d32430f9ca3da512cf9613ce63e /engines/sherlock/objects.cpp | |
parent | ae64cca8f01f4e56873ac6afa58610366ea8238a (diff) | |
download | scummvm-rg350-f5a1b626b710c368e79ab27c13cf2be4ccdcb30f.tar.gz scummvm-rg350-f5a1b626b710c368e79ab27c13cf2be4ccdcb30f.tar.bz2 scummvm-rg350-f5a1b626b710c368e79ab27c13cf2be4ccdcb30f.zip |
SHERLOCK: Move Scalpel map code to ScalpelMap
Diffstat (limited to 'engines/sherlock/objects.cpp')
-rw-r--r-- | engines/sherlock/objects.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/engines/sherlock/objects.cpp b/engines/sherlock/objects.cpp index 1e57d00253..d27cbeda2e 100644 --- a/engines/sherlock/objects.cpp +++ b/engines/sherlock/objects.cpp @@ -25,6 +25,7 @@ #include "sherlock/objects.h" #include "sherlock/people.h" #include "sherlock/scene.h" +#include "sherlock/scalpel/scalpel_map.h" #include "sherlock/scalpel/scalpel_people.h" namespace Sherlock { @@ -1212,7 +1213,6 @@ void Object::setObjTalkSequence(int seq) { } int Object::checkNameForCodes(const Common::String &name, const char *const messages[]) { - Map &map = *_vm->_map; People &people = *_vm->_people; Scene &scene = *_vm->_scene; Screen &screen = *_vm->_screen; @@ -1257,9 +1257,12 @@ int Object::checkNameForCodes(const Common::String &name, const char *const mess if (ch >= '0' && ch <= '9') { scene._goToScene = atoi(name.c_str() + 1); - if (IS_SERRATED_SCALPEL && scene._goToScene < 97 && map[scene._goToScene].x) { - map._overPos.x = (map[scene._goToScene].x - 6) * FIXED_INT_MULTIPLIER; - map._overPos.y = (map[scene._goToScene].y + 9) * FIXED_INT_MULTIPLIER; + if (IS_SERRATED_SCALPEL && scene._goToScene < 97) { + Scalpel::ScalpelMap &map = *(Scalpel::ScalpelMap *)_vm->_map; + if (map[scene._goToScene].x) { + map._overPos.x = (map[scene._goToScene].x - 6) * FIXED_INT_MULTIPLIER; + map._overPos.y = (map[scene._goToScene].y + 9) * FIXED_INT_MULTIPLIER; + } } const char *p; |