aboutsummaryrefslogtreecommitdiff
path: root/scumm/verbs.cpp
diff options
context:
space:
mode:
authorMax Horn2003-07-12 21:28:04 +0000
committerMax Horn2003-07-12 21:28:04 +0000
commit187b715306a7a1912e71a0854992a54115d1f751 (patch)
treedde92d8fa8015c8d2aac03cfa6c5d302d1a603c5 /scumm/verbs.cpp
parentbe261b5d7ce11bfd5705d3c42787293db1315fb8 (diff)
downloadscummvm-rg350-187b715306a7a1912e71a0854992a54115d1f751.tar.gz
scummvm-rg350-187b715306a7a1912e71a0854992a54115d1f751.tar.bz2
scummvm-rg350-187b715306a7a1912e71a0854992a54115d1f751.zip
run script 5 in startScene (room transition script, it seems); don't invoke runInputScript(4) - it is not needed (runInputScript will be called by checkExecVerbs), and causes the buggy 'What is' command behavior); fixed V2 sentence line
svn-id: r8955
Diffstat (limited to 'scumm/verbs.cpp')
-rw-r--r--scumm/verbs.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/scumm/verbs.cpp b/scumm/verbs.cpp
index ea9d361e81..62a0b5a5c0 100644
--- a/scumm/verbs.cpp
+++ b/scumm/verbs.cpp
@@ -273,33 +273,32 @@ void Scumm::checkExecVerbs() {
for (i = 1; i < _maxVerbs; i++, vs++) {
if (vs->verbid && vs->saveid == 0 && vs->curmode == 1) {
if (_mouseButStat == vs->key) {
+ // Trigger verb as if the user clicked it
runInputScript(1, vs->verbid, 1);
return;
}
}
}
+ // Generic keyboard input
runInputScript(4, _mouseButStat, 1);
} else if (_mouseButStat & MBS_MOUSE_MASK) {
VirtScreen *zone = findVirtScreen(_mouse.y);
byte code = _mouseButStat & MBS_LEFT_CLICK ? 1 : 2;
- if (zone->number == 0) {
- over = checkMouseOver(_mouse.x, _mouse.y);
- if (over != 0) {
- runInputScript(1, _verbs[over].verbid, code);
- return;
- }
- runInputScript(2, 0, code);
+ if (_version <= 2 && zone->number == 2 && _mouse.y <= zone->topline + 8) {
+ // Click into V2 sentence line
+ runInputScript(5, 0, 0);
} else if (_version <= 2 && zone->number == 2 && _mouse.y > zone->topline + 32) {
+ // Click into V2 inventory
checkV2Inventory(_mouse.x, _mouse.y);
} else {
over = checkMouseOver(_mouse.x, _mouse.y);
-
- // FIXME For the future: Indy3 and under inv scrolling
- /*
- if (over >= 31 && over <= 36)
- over += _inventoryOffset;
- */
- runInputScript(1, over != 0 ? _verbs[over].verbid : 0, code);
+ if (over != 0) {
+ // Verb was clicked
+ runInputScript(1, _verbs[over].verbid, code);
+ } else {
+ // Scene was clicked
+ runInputScript((zone->number == 0) ? 2 : 1, 0, code);
+ }
}
}
}