diff options
author | Filippos Karapetis | 2007-10-27 11:42:17 +0000 |
---|---|---|
committer | Filippos Karapetis | 2007-10-27 11:42:17 +0000 |
commit | b225f01d14f87f8bb2f10209fdc82811a9c2ea96 (patch) | |
tree | d03b1af5d95576f23ecf0021ea3946f80bd39736 | |
parent | 22c4aa0602afd9ea792773770fd919aeea0112ce (diff) | |
download | scummvm-rg350-b225f01d14f87f8bb2f10209fdc82811a9c2ea96.tar.gz scummvm-rg350-b225f01d14f87f8bb2f10209fdc82811a9c2ea96.tar.bz2 scummvm-rg350-b225f01d14f87f8bb2f10209fdc82811a9c2ea96.zip |
Added a workaround for an incorrect hitzone in IHNM, (Gorrister's chapter). Now, the graffiti to the left in the toilet screen can be examined correctly. Also, performed some clean-up
svn-id: r29264
-rw-r--r-- | engines/saga/actor_walk.cpp | 19 | ||||
-rw-r--r-- | engines/saga/script.cpp | 12 |
2 files changed, 28 insertions, 3 deletions
diff --git a/engines/saga/actor_walk.cpp b/engines/saga/actor_walk.cpp index 5ddcae7ae6..1e8dd07293 100644 --- a/engines/saga/actor_walk.cpp +++ b/engines/saga/actor_walk.cpp @@ -749,6 +749,18 @@ void Actor::handleActions(int msec, bool setup) { hitZone = _vm->_scene->_actionMap->getHitZone(hitZoneIndex); } + // WORKAROUND for an incorrect hitzone which exists in IHNM + // In Gorrister's chapter, in the toilet screen, the hitzone of the exit is + // placed over the place where Gorrister sits to examine the graffiti on the wall + // to the left, which makes him exit the screen when the graffiti is examined. + // We effectively change the left side of the hitzone here so that it starts from + // pixel 301 onwards. The same workaround is applied in Script::whichObject + if (_vm->getGameType() == GType_IHNM) { + if (_vm->_scene->currentChapterNumber() == 1 && _vm->_scene->currentSceneNumber() == 22) + if (hitPoint.x <= 300) + hitZone = NULL; + } + if (hitZone != actor->_lastZone) { if (actor->_lastZone) stepZoneAction(actor, actor->_lastZone, true, false); @@ -757,9 +769,10 @@ void Actor::handleActions(int msec, bool setup) { // (room 51) for hitzone 24577 (the door with the copy protection) to avoid the glitch. This glitch // happens because the copy protection is supposed to kick in at this point, but it's bypassed // (with permission from Wyrmkeep Entertainment) - if (hitZone && - !(_vm->getGameType() == GType_ITE && _vm->_scene->currentSceneNumber() == 51 && hitZone->getHitZoneId() == 24577)) - stepZoneAction(actor, hitZone, false, false); + if (!(_vm->getGameType() == GType_ITE && _vm->_scene->currentSceneNumber() == 51 && hitZone->getHitZoneId() == 24577)) { + if (hitZone) + stepZoneAction(actor, hitZone, false, false); + } } } } diff --git a/engines/saga/script.cpp b/engines/saga/script.cpp index cd10522dfc..ecd3c8a82f 100644 --- a/engines/saga/script.cpp +++ b/engines/saga/script.cpp @@ -827,6 +827,18 @@ void Script::whichObject(const Point& mousePoint) { hitZoneIndex = _vm->_scene->_objectMap->hitTest(pickPoint); + // WORKAROUND for an incorrect hitzone which exists in IHNM + // In Gorrister's chapter, in the toilet screen, the hitzone of the exit is + // placed over the place where Gorrister sits to examine the graffiti on the wall + // to the left, which makes him exit the screen when the graffiti is examined. + // We effectively change the left side of the hitzone here so that it starts from + // pixel 301 onwards. The same workaround is applied in Actor::handleActions + if (_vm->getGameType() == GType_IHNM) { + if (_vm->_scene->currentChapterNumber() == 1 && _vm->_scene->currentSceneNumber() == 22) + if (hitZoneIndex == 8 && pickPoint.x <= 300) + hitZoneIndex = -1; + } + if ((hitZoneIndex != -1)) { hitZone = _vm->_scene->_objectMap->getHitZone(hitZoneIndex); objectId = hitZone->getHitZoneId(); |