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
This commit is contained in:
Torbjörn Andersson 2005-06-10 13:56:51 +00:00
parent 7b8c800482
commit 20ba16b09c

View File

@ -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();
}