From cc23b25cdecc63c41f67f56983ccacabe5709a97 Mon Sep 17 00:00:00 2001 From: James Brown Date: Sat, 12 Jul 2003 10:19:18 +0000 Subject: Fix fix for 769896 svn-id: r8938 --- scumm/verbs.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'scumm') diff --git a/scumm/verbs.cpp b/scumm/verbs.cpp index 9f31bd33f9..a0aa86cf40 100644 --- a/scumm/verbs.cpp +++ b/scumm/verbs.cpp @@ -27,6 +27,8 @@ #include "scumm.h" #include "verbs.h" +int egoVar; // TODO: Put this in V2 class? + enum { kInventoryUpArrow = 4, kInventoryDownArrow = 5, @@ -150,7 +152,6 @@ void Scumm::checkV2MouseOver(ScummVM::Point pos) { void Scumm::checkV2Inventory(int x, int y) { int object = 0; - static int egoVar; y -= virtscr[2].topline; @@ -208,6 +209,11 @@ void Scumm::redrawV2Inventory() { _string[1].charset = 1; + if (_scummVars[VAR_EGO] != egoVar) { + egoVar = _scummVars[VAR_EGO]; + _inventoryOffset = 0; + } + max_inv = getInventoryCount(_scummVars[VAR_EGO]) - _inventoryOffset; if (max_inv > 4) max_inv = 4; -- cgit v1.2.3