aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNipun Garg2019-07-02 03:41:34 +0530
committerEugene Sandulenko2019-09-03 17:17:07 +0200
commitb9fbfa163914701016f6f396668ba3efcbd8b2d1 (patch)
treea2f35f93a9aa0ccabc039725aa9d51aac5cc0edc
parentad0ce9a43f280f01cda0ec1290270fb119fcb76f (diff)
downloadscummvm-rg350-b9fbfa163914701016f6f396668ba3efcbd8b2d1.tar.gz
scummvm-rg350-b9fbfa163914701016f6f396668ba3efcbd8b2d1.tar.bz2
scummvm-rg350-b9fbfa163914701016f6f396668ba3efcbd8b2d1.zip
HDB: Unstub DialogChoice and MessageBar checks
-rw-r--r--engines/hdb/ai-funcs.cpp14
-rw-r--r--engines/hdb/input.cpp22
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())