Skip to content

Commit

Permalink
AGOS: Add mouse wheel support for The Feeble Files.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirben committed Mar 4, 2014
1 parent 4377039 commit ec0f420
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions engines/agos/input.cpp
Expand Up @@ -418,11 +418,33 @@ void AGOSEngine::hitarea_stuff_helper_2() {

#ifdef ENABLE_AGOS2
void AGOSEngine_Feeble::handleMouseWheelUp() {

This comment has been minimized.

Copy link
@eriktorbjorn

eriktorbjorn Mar 4, 2014

Member

This function will also be called in the "Puzzle Pack" games, since they inherit from the Feeble Files engine. Is the getBitFlag() check enough to ensure that it won't do anything unexpected in those games?

// TODO
if (!(getBitFlag(99)))
return;

if (_mouse.x >= 128 && _mouse.x <= 515 && _mouse.y >= 102 && _mouse.y <= 206) {
oracleTextDown();
} else if (_mouse.x >= 172 && _mouse.x <= 469 && _mouse.y >= 287 && _mouse.y <= 382) {
HitArea *ha = findBox(0x7FFB);
if (ha != NULL && (ha->flags & kBFBoxInUse)) {
if (!isSpriteLoaded(21, 9))
inventoryUp(ha->window);

This comment has been minimized.

Copy link
@eriktorbjorn

eriktorbjorn Mar 4, 2014

Member

Inventory scrolling in The Feeble Files seems a bit temperamental. Sometimes when I try it, I end up with both scroll buttons in their depressed state and apparently no way of exiting the Oracle. I haven't been able to figure out how to trigger that, unfortunately. (It's also quite slow, but I don't understand the inventory handling well enough to see if that could be easily fixed.)

}
}
}

void AGOSEngine_Feeble::handleMouseWheelDown() {
// TODO
if (!(getBitFlag(99)))
return;

if (_mouse.x >= 128 && _mouse.x <= 515 && _mouse.y >= 102 && _mouse.y <= 206) {
oracleTextUp();
} else if (_mouse.x >= 172 && _mouse.x <= 469 && _mouse.y >= 287 && _mouse.y <= 382) {
HitArea *ha = findBox(0x7FFC);
if (ha != NULL && (ha->flags & kBFBoxInUse)) {
if (!isSpriteLoaded(23, 9))
inventoryDown(ha->window);
}
}
}
#endif

Expand Down

1 comment on commit ec0f420

@Kirben
Copy link
Contributor

@Kirben Kirben commented on ec0f420 Mar 4, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, it looks like bitFlag 99 is never set in any of the Puzzle Pack games. But I was add an extra check, just to be safe.

Please sign in to comment.