aboutsummaryrefslogtreecommitdiff
path: root/scumm/script_v2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scumm/script_v2.cpp')
-rw-r--r--scumm/script_v2.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp
index 810f136ca9..8ea7006a18 100644
--- a/scumm/script_v2.cpp
+++ b/scumm/script_v2.cpp
@@ -1225,10 +1225,16 @@ void ScummEngine_v2::o2_actorFromPos() {
}
void ScummEngine_v2::o2_findObject() {
+ int obj;
getResultPos();
int x = getVarOrDirectByte(PARAM_1) * 8;
int y = getVarOrDirectByte(PARAM_2) * 2;
- setResult(findObject(x, y));
+ obj = findObject(x, y);
+ if (obj == 0 && (_platform == Common::kPlatformNES) && (_userState & 0x40)) {
+ if (_mouseOverBoxV2 >= 0 && _mouseOverBoxV2 < 4)
+ obj = findInventory(VAR(VAR_EGO), _mouseOverBoxV2 + _inventoryOffset + 1);
+ }
+ setResult(obj);
}
void ScummEngine_v2::o2_getActorX() {
@@ -1585,6 +1591,10 @@ void ScummEngine_v2::resetSentence() {
VAR(VAR_SENTENCE_PREPOSITION) = 0;
}
+void ScummEngine_v2::runInventoryScript(int i) {
+ redrawV2Inventory();
+}
+
#undef PARAM_1
#undef PARAM_2
#undef PARAM_3