diff options
-rw-r--r-- | engines/hdb/ai-funcs.cpp | 14 | ||||
-rw-r--r-- | engines/hdb/input.cpp | 22 |
2 files changed, 30 insertions, 6 deletions
diff --git a/engines/hdb/ai-funcs.cpp b/engines/hdb/ai-funcs.cpp index da4efc0d49..721fcbd227 100644 --- a/engines/hdb/ai-funcs.cpp +++ b/engines/hdb/ai-funcs.cpp @@ -2196,9 +2196,13 @@ void AI::movePlayer(uint16 buttons) { if (g_hdb->_window->dialogActive()) { g_hdb->_window->closeDialog(); return; + } else if (g_hdb->_window->dialogChoiceActive()) { + g_hdb->_window->closeDialogChoice(); + return; + } else if (g_hdb->_window->msgBarActive()) { + g_hdb->_window->closeMsg(); + return; } - warning("STUB: movePlayer: Add DialogChoice Check"); - warning("STUB: movePlayer: Add MessageBar Check"); if (cinematicsActive() || _playerLock) return; @@ -2302,7 +2306,11 @@ void AI::movePlayer(uint16 buttons) { if (!cinematicsActive()) return; - warning("STUB: movePlayer: Add Choice Dialog"); + // is a choice dialog active? + if (g_hdb->_window->dialogChoiceActive()) { + if (!cinematicsActive()) + return; + } // In a cinematic? if (_playerLock || _numWaypoints) diff --git a/engines/hdb/input.cpp b/engines/hdb/input.cpp index 8de0cc1e4e..755ad5d14f 100644 --- a/engines/hdb/input.cpp +++ b/engines/hdb/input.cpp @@ -80,7 +80,16 @@ void Input::setButtons(uint16 b) { return; } - warning("STUB: setButtons: Choose from DialogChoice"); + // Choose from DialogChoice + if (g_hdb->_window->dialogChoiceActive()) { + if (_buttons & kButtonUp) + g_hdb->_window->dialogChoiceMoveup(); + else if (_buttons & kButtonDown) + g_hdb->_window->dialogChoiceMovedown(); + else if (_buttons & kButtonB) + g_hdb->_window->closeDialogChoice(); + return; + } // Try to move the player if (!g_hdb->_ai->playerDead()) @@ -131,10 +140,17 @@ void Input::stylusDown(int x, int y) { } // Is a Choice Dialog Active? - warning("STUB: stylusDown: Check Choice Dialog Active"); + if (g_hdb->_window->dialogChoiceActive()) { + if (!g_hdb->_window->checkDialogChoiceClose(x, y)) + return; + if (!g_hdb->_ai->cinematicsActive()) + return; + } // Is MessageBar active? - warning("STUB: stylusDown: Check Message Bar Active"); + if (g_hdb->_window->msgBarActive()) + if (g_hdb->_window->checkMsgClose(x, y)) + return; // In a cinematic? if (g_hdb->_ai->playerLocked()) |