Fix bug #1911558 - FF: Inventory doesn't scroll to the end.

svn-id: r31110
This commit is contained in:
Travis Howell 2008-03-12 00:22:30 +00:00
parent a366add4cf
commit 884276e22e
4 changed files with 10 additions and 4 deletions

View file

@ -252,6 +252,7 @@ AGOSEngine::AGOSEngine(OSystem *syst)
_lastHitArea3 = 0; _lastHitArea3 = 0;
_hitAreaSubjectItem = 0; _hitAreaSubjectItem = 0;
_currentBox = 0; _currentBox = 0;
_currentBoxNum = 0;
_currentVerbBox = 0; _currentVerbBox = 0;
_lastVerbOn = 0; _lastVerbOn = 0;
_needHitAreaRecalc = 0; _needHitAreaRecalc = 0;

View file

@ -342,6 +342,7 @@ protected:
HitArea *_lastHitArea3; HitArea *_lastHitArea3;
Item *_hitAreaSubjectItem; Item *_hitAreaSubjectItem;
HitArea *_currentBox, *_currentVerbBox, *_lastVerbOn; HitArea *_currentBox, *_currentVerbBox, *_lastVerbOn;
uint16 _currentBoxNum;
uint _needHitAreaRecalc; uint _needHitAreaRecalc;
uint _verbHitArea; uint _verbHitArea;
uint16 _defaultVerb; uint16 _defaultVerb;

View file

@ -115,7 +115,7 @@ void AGOSEngine_Feeble::inventoryUp(WindowBlock *window) {
_marks = 0; _marks = 0;
checkUp(window); checkUp(window);
animate(4, 9, 21, 0 ,0, 0); animate(4, 9, 21, 0 ,0, 0);
while (_currentBox->id == 0x7FFB && getBitFlag(89)) { while (_currentBoxNum == 0x7FFB && getBitFlag(89)) {
checkUp(window); checkUp(window);
delay(1); delay(1);
} }
@ -156,7 +156,7 @@ void AGOSEngine_Feeble::inventoryDown(WindowBlock *window) {
_marks = 0; _marks = 0;
checkDown(window); checkDown(window);
animate(4, 9, 23, 0, 0, 0); animate(4, 9, 23, 0, 0, 0);
while (_currentBox->id == 0x7FFC && getBitFlag(89)) { while (_currentBoxNum == 0x7FFC && getBitFlag(89)) {
checkDown(window); checkDown(window);
delay(1); delay(1);
} }
@ -202,7 +202,7 @@ void AGOSEngine_Feeble::oracleTextUp() {
startSubroutineEx(sub); startSubroutineEx(sub);
setBitFlag(94, false); setBitFlag(94, false);
} }
if (_currentBox->id != 601 || !getBitFlag(89)) if (_currentBoxNum != 601 || !getBitFlag(89))
break; break;
delay(100); delay(100);
} }
@ -236,7 +236,7 @@ void AGOSEngine_Feeble::oracleTextDown() {
startSubroutineEx(sub); startSubroutineEx(sub);
setBitFlag(93, false); setBitFlag(93, false);
} }
if (_currentBox->id != 600 || !getBitFlag(89)) if (_currentBoxNum != 600 || !getBitFlag(89))
break; break;
delay(100); delay(100);
} }

View file

@ -672,7 +672,9 @@ void AGOSEngine::boxController(uint x, uint y, uint mode) {
} }
} while (ha++, --count); } while (ha++, --count);
_currentBoxNum = 0;
_currentBox = best_ha; _currentBox = best_ha;
if (best_ha == NULL) { if (best_ha == NULL) {
clearName(); clearName();
if (getGameType() == GType_WW && _mouseCursor >= 4) { if (getGameType() == GType_WW && _mouseCursor >= 4) {
@ -682,6 +684,8 @@ void AGOSEngine::boxController(uint x, uint y, uint mode) {
return; return;
} }
_currentBoxNum = best_ha->id;
if (mode != 0) { if (mode != 0) {
if (mode == 3) { if (mode == 3) {
if (getGameType() == GType_ELVIRA1 || getGameType() == GType_ELVIRA2) { if (getGameType() == GType_ELVIRA1 || getGameType() == GType_ELVIRA2) {