From 884276e22ecbf1ffa1a820c8b34cc160a67a52ce Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Wed, 12 Mar 2008 00:22:30 +0000 Subject: Fix bug #1911558 - FF: Inventory doesn't scroll to the end. svn-id: r31110 --- engines/agos/agos.cpp | 1 + engines/agos/agos.h | 1 + engines/agos/oracle.cpp | 8 ++++---- engines/agos/verb.cpp | 4 ++++ 4 files changed, 10 insertions(+), 4 deletions(-) (limited to 'engines/agos') diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp index e6b5461717..47a4c7c9aa 100644 --- a/engines/agos/agos.cpp +++ b/engines/agos/agos.cpp @@ -252,6 +252,7 @@ AGOSEngine::AGOSEngine(OSystem *syst) _lastHitArea3 = 0; _hitAreaSubjectItem = 0; _currentBox = 0; + _currentBoxNum = 0; _currentVerbBox = 0; _lastVerbOn = 0; _needHitAreaRecalc = 0; diff --git a/engines/agos/agos.h b/engines/agos/agos.h index 93ccdb8b21..c690bc668d 100644 --- a/engines/agos/agos.h +++ b/engines/agos/agos.h @@ -342,6 +342,7 @@ protected: HitArea *_lastHitArea3; Item *_hitAreaSubjectItem; HitArea *_currentBox, *_currentVerbBox, *_lastVerbOn; + uint16 _currentBoxNum; uint _needHitAreaRecalc; uint _verbHitArea; uint16 _defaultVerb; diff --git a/engines/agos/oracle.cpp b/engines/agos/oracle.cpp index 15b1ddcb4d..a113c8e2ea 100644 --- a/engines/agos/oracle.cpp +++ b/engines/agos/oracle.cpp @@ -115,7 +115,7 @@ void AGOSEngine_Feeble::inventoryUp(WindowBlock *window) { _marks = 0; checkUp(window); animate(4, 9, 21, 0 ,0, 0); - while (_currentBox->id == 0x7FFB && getBitFlag(89)) { + while (_currentBoxNum == 0x7FFB && getBitFlag(89)) { checkUp(window); delay(1); } @@ -156,7 +156,7 @@ void AGOSEngine_Feeble::inventoryDown(WindowBlock *window) { _marks = 0; checkDown(window); animate(4, 9, 23, 0, 0, 0); - while (_currentBox->id == 0x7FFC && getBitFlag(89)) { + while (_currentBoxNum == 0x7FFC && getBitFlag(89)) { checkDown(window); delay(1); } @@ -202,7 +202,7 @@ void AGOSEngine_Feeble::oracleTextUp() { startSubroutineEx(sub); setBitFlag(94, false); } - if (_currentBox->id != 601 || !getBitFlag(89)) + if (_currentBoxNum != 601 || !getBitFlag(89)) break; delay(100); } @@ -236,7 +236,7 @@ void AGOSEngine_Feeble::oracleTextDown() { startSubroutineEx(sub); setBitFlag(93, false); } - if (_currentBox->id != 600 || !getBitFlag(89)) + if (_currentBoxNum != 600 || !getBitFlag(89)) break; delay(100); } diff --git a/engines/agos/verb.cpp b/engines/agos/verb.cpp index 8fc23ee31f..faedabcb32 100644 --- a/engines/agos/verb.cpp +++ b/engines/agos/verb.cpp @@ -672,7 +672,9 @@ void AGOSEngine::boxController(uint x, uint y, uint mode) { } } while (ha++, --count); + _currentBoxNum = 0; _currentBox = best_ha; + if (best_ha == NULL) { clearName(); if (getGameType() == GType_WW && _mouseCursor >= 4) { @@ -682,6 +684,8 @@ void AGOSEngine::boxController(uint x, uint y, uint mode) { return; } + _currentBoxNum = best_ha->id; + if (mode != 0) { if (mode == 3) { if (getGameType() == GType_ELVIRA1 || getGameType() == GType_ELVIRA2) { -- cgit v1.2.3