aboutsummaryrefslogtreecommitdiff
path: root/saga
diff options
context:
space:
mode:
authorTorbjörn Andersson2005-06-10 13:56:51 +0000
committerTorbjörn Andersson2005-06-10 13:56:51 +0000
commit20ba16b09cc696f4b244f76e6b9fdc7322c16a71 (patch)
treecdada4ca20f2352cd1bc7b9c1d3326a4dc6e29c5 /saga
parent7b8c8004820cfda61042f442293d79ab96617bc8 (diff)
downloadscummvm-rg350-20ba16b09cc696f4b244f76e6b9fdc7322c16a71.tar.gz
scummvm-rg350-20ba16b09cc696f4b244f76e6b9fdc7322c16a71.tar.bz2
scummvm-rg350-20ba16b09cc696f4b244f76e6b9fdc7322c16a71.zip
When setting a new verb, clear the "pointer object", i.e. the variable that
keeps track of whatever object the pointer is hovering over. This way, the pointer object will be updated but with the new verb applied to it. I was getting tired of having to move the cursor off and on the object whenever I changed verb. This isn't exactly how the original engine did it, but it appears to work. svn-id: r18373
Diffstat (limited to 'saga')
-rw-r--r--saga/script.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/saga/script.cpp b/saga/script.cpp
index e085144de3..cba0233239 100644
--- a/saga/script.cpp
+++ b/saga/script.cpp
@@ -69,8 +69,7 @@ Script::Script(SagaEngine *vm) : _vm(vm){
_stickyVerb = kVerbWalkTo;
_leftButtonVerb = kVerbNone;
_rightButtonVerb = kVerbNone;
- _pointerObject = 0;
-
+ _pointerObject = ID_NOTHING;
_staticSize = 0;
_commonBufferSize = COMMON_BUFFER_SIZE;
@@ -419,6 +418,11 @@ void Script::setVerb(int verb) {
_firstObjectSet = false;
_secondObjectNeeded = false;
+ // The pointer object will be updated again immediately. This way the
+ // new verb will be applied to it. It's not exactly how the original
+ // engine did it, but it appears to work.
+ _pointerObject = ID_NOTHING;
+
setLeftButtonVerb( verb );
showVerb();
}