aboutsummaryrefslogtreecommitdiff
path: root/engines/saga
diff options
context:
space:
mode:
authorFilippos Karapetis2007-11-11 18:12:55 +0000
committerFilippos Karapetis2007-11-11 18:12:55 +0000
commit6e6a864c17403a99ee866c2330061d6e31506bbe (patch)
tree654b3ac85ea5e7daf46297f720cf8fc50b0304cf /engines/saga
parenta783c45d9e6064bf7d9e884fbf6857f2de1b7fc5 (diff)
downloadscummvm-rg350-6e6a864c17403a99ee866c2330061d6e31506bbe.tar.gz
scummvm-rg350-6e6a864c17403a99ee866c2330061d6e31506bbe.tar.bz2
scummvm-rg350-6e6a864c17403a99ee866c2330061d6e31506bbe.zip
Don't draw objects with negative x/y values. Now, "ghost" objects are no longer created in the top left corner of the screen when picked up/used. The creation of such ghost objects is a script bug which exists in the original interpreter of IHNM as well. Also, removed a relevant workaround for the note in the first screen of Gorrister's chapter, as it's no longer needed
svn-id: r29477
Diffstat (limited to 'engines/saga')
-rw-r--r--engines/saga/actor.cpp7
-rw-r--r--engines/saga/script.cpp13
2 files changed, 7 insertions, 13 deletions
diff --git a/engines/saga/actor.cpp b/engines/saga/actor.cpp
index 774d348446..2dfdedcc37 100644
--- a/engines/saga/actor.cpp
+++ b/engines/saga/actor.cpp
@@ -989,6 +989,13 @@ void Actor::createDrawOrderList() {
if (obj->_sceneNumber != _vm->_scene->currentSceneNumber())
continue;
+ // WORKAROUND for a bug found in the original interpreter of IHNM
+ // If an object's x or y value is negative, don't draw it
+ // Scripts set negative values for an object's x and y when it shouldn't
+ // be drawn anymore (i.e. when it's picked up or used)
+ if (obj->_location.x < 0 || obj->_location.y < 0)
+ continue;
+
if (calcScreenPosition(obj)) {
_drawOrderList.pushBack(obj, compareFunction);
}
diff --git a/engines/saga/script.cpp b/engines/saga/script.cpp
index 642e9dab9b..51e40defd1 100644
--- a/engines/saga/script.cpp
+++ b/engines/saga/script.cpp
@@ -805,19 +805,6 @@ void Script::whichObject(const Point& mousePoint) {
objectId = ID_NOTHING;
newObjectId = ID_NOTHING;
}
-
- // WORKAROUND for a script bug in the original game scripts of IHNM
- // When the note (item 16406) in the first screen of Gorrister's chapter
- // is read, an invisible ghost object is created in the upper left corner
- // of the screen, that the player can interact with. We ignore that invalid
- // object here
- if (_vm->getGameType() == GType_IHNM) {
- if (objectId == 16406 && mousePoint.x < 60 && mousePoint.y < 60) {
- objectId = ID_NOTHING;
- newObjectId = ID_NOTHING;
- newRightButtonVerb = getVerbType(kVerbNone);
- }
- }
} else {
actor = _vm->_actor->getActor(newObjectId);
objectId = newObjectId;