aboutsummaryrefslogtreecommitdiff
path: root/saga/script.cpp
diff options
context:
space:
mode:
authorAndrew Kurushin2005-03-18 17:11:37 +0000
committerAndrew Kurushin2005-03-18 17:11:37 +0000
commit3025db0d07c9bfa9f8cda8ff49847287230f166d (patch)
treebc9d21940950460dce0f3bfaf35c311fd3c30430 /saga/script.cpp
parentb4ed62e1ad7ed6f3d4d68b8e34a9263229d14dad (diff)
downloadscummvm-rg350-3025db0d07c9bfa9f8cda8ff49847287230f166d.tar.gz
scummvm-rg350-3025db0d07c9bfa9f8cda8ff49847287230f166d.tar.bz2
scummvm-rg350-3025db0d07c9bfa9f8cda8ff49847287230f166d.zip
- changescene on fair for tents
- some memory deallocation fixup todo: fix follower stuckiness in tents svn-id: r17180
Diffstat (limited to 'saga/script.cpp')
-rw-r--r--saga/script.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/saga/script.cpp b/saga/script.cpp
index a3f841cdc1..7f65c8c696 100644
--- a/saga/script.cpp
+++ b/saga/script.cpp
@@ -677,10 +677,10 @@ void Script::whichObject(const Point& mousePoint) {
int newRightButtonVerb;
uint16 newObjectId;
ActorData *actor;
+ Point pickPoint;
Location pickLocation;
int hitZoneIndex;
const HitZone * hitZone;
- Point tempPoint;
objectId = ID_NOTHING;
objectFlags = 0;
@@ -719,17 +719,16 @@ void Script::whichObject(const Point& mousePoint) {
}
if (newObjectId == ID_NOTHING) {
+
+ pickPoint = mousePoint;
+
if (_vm->_scene->getFlags() & kSceneFlagISO) {
- tempPoint = mousePoint;
- tempPoint.y -= _vm->_actor->_protagonist->location.z;
- _vm->_isoMap->screenPointToTileCoords(tempPoint, pickLocation);
- } else {
- pickLocation.x = mousePoint.x;
- pickLocation.y = mousePoint.y;
- pickLocation.z = 0;
+ pickPoint.y -= _vm->_actor->_protagonist->location.z;
+ _vm->_isoMap->screenPointToTileCoords(pickPoint, pickLocation);
+ pickLocation.toScreenPointUV(pickPoint);
}
- hitZoneIndex = _vm->_scene->_objectMap->hitTest(mousePoint);
+ hitZoneIndex = _vm->_scene->_objectMap->hitTest(pickPoint);
if ((hitZoneIndex != -1)) {
hitZone = _vm->_scene->_objectMap->getHitZone(hitZoneIndex);