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;
_hitAreaSubjectItem = 0;
_currentBox = 0;
_currentBoxNum = 0;
_currentVerbBox = 0;
_lastVerbOn = 0;
_needHitAreaRecalc = 0;

View File

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

View File

@ -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);
}

View File

@ -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) {