aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/input.cpp
diff options
context:
space:
mode:
authorKirben2014-03-02 22:19:32 +1100
committerKirben2014-03-02 22:19:32 +1100
commit83b32010b3d6506d745a606486daf78796ce19e1 (patch)
tree303e48cec01f2449bcff3f2c957bf9f38936997a /engines/agos/input.cpp
parent418de45d9cebfbabb05edd09ca5206d95d693867 (diff)
downloadscummvm-rg350-83b32010b3d6506d745a606486daf78796ce19e1.tar.gz
scummvm-rg350-83b32010b3d6506d745a606486daf78796ce19e1.tar.bz2
scummvm-rg350-83b32010b3d6506d745a606486daf78796ce19e1.zip
AGOS: Add initial support for mouse wheel.
Diffstat (limited to 'engines/agos/input.cpp')
-rw-r--r--engines/agos/input.cpp87
1 files changed, 87 insertions, 0 deletions
diff --git a/engines/agos/input.cpp b/engines/agos/input.cpp
index 32a57be855..b8e17676ad 100644
--- a/engines/agos/input.cpp
+++ b/engines/agos/input.cpp
@@ -416,6 +416,93 @@ void AGOSEngine::hitarea_stuff_helper_2() {
_runScriptReturn1 = false;
}
+#ifdef ENABLE_AGOS2
+void AGOSEngine_Feeble::handleMouseWheelUp() {
+ // TODO
+}
+
+void AGOSEngine_Feeble::handleMouseWheelDown() {
+ // TODO
+}
+#endif
+
+void AGOSEngine_Simon1::handleMouseWheelUp() {
+ HitArea *ha = findBox(206);
+ if (ha != NULL && (ha->flags & kBFBoxInUse)) {
+ if (_saveLoadRowCurPos != 1) {
+ if (_saveLoadRowCurPos < 7)
+ _saveLoadRowCurPos = 1;
+ else
+ _saveLoadRowCurPos -= 1;
+
+ _saveLoadEdit = false;
+ listSaveGames();
+ }
+ } else {
+ AGOSEngine::handleMouseWheelUp();
+ }
+}
+
+void AGOSEngine_Simon1::handleMouseWheelDown() {
+ HitArea *ha = findBox(207);
+ if (ha != NULL && (ha->flags & kBFBoxInUse)) {
+ if (_saveDialogFlag) {
+ _saveLoadRowCurPos += 1;
+ if (_saveLoadRowCurPos >= _numSaveGameRows)
+ _saveLoadRowCurPos = _numSaveGameRows;
+
+ _saveLoadEdit = false;
+ listSaveGames();
+ }
+ } else {
+ AGOSEngine::handleMouseWheelDown();
+ }
+}
+
+void AGOSEngine_Elvira2::handleMouseWheelUp() {
+ HitArea *ha = findBox(224);
+ if (ha != NULL && (ha->flags & kBFBoxInUse)) {
+ _saveGameNameLen = 0;
+
+ if (_saveLoadRowCurPos < 3)
+ _saveLoadRowCurPos = 1;
+ else
+ _saveLoadRowCurPos -= 3;
+
+ listSaveGames();
+ } else {
+ AGOSEngine::handleMouseWheelUp();
+ }
+}
+
+void AGOSEngine_Elvira2::handleMouseWheelDown() {
+ HitArea *ha = findBox(224);
+ if (ha != NULL && (ha->flags & kBFBoxInUse)) {
+ _saveGameNameLen = 0;
+ _saveLoadRowCurPos += 3;
+ if (_saveLoadRowCurPos >= _numSaveGameRows)
+ _saveLoadRowCurPos = 1;
+
+ listSaveGames();
+ } else {
+ AGOSEngine::handleMouseWheelDown();
+ }
+}
+
+void AGOSEngine::handleMouseWheelUp() {
+ HitArea *ha = findBox(0x7FFB);
+ if (ha != NULL && (ha->flags & kBFBoxInUse)) {
+ inventoryUp(ha->window);
+ }
+}
+
+void AGOSEngine::handleMouseWheelDown() {
+ HitArea *ha = findBox(0x7FFC);
+ if (ha != NULL && (ha->flags & kBFBoxInUse)) {
+ inventoryDown(ha->window);
+ }
+}
+
void AGOSEngine::permitInput() {
if (_mortalFlag)
return;