aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb
diff options
context:
space:
mode:
authorNipun Garg2019-06-29 05:56:05 +0530
committerEugene Sandulenko2019-09-03 17:17:04 +0200
commitf0ab92faa14d45bea2f0c6e1c8d5ac6e4c6e5c5c (patch)
treea6c30c64c63a0a08e5f654258978c876fbd88221 /engines/hdb
parent6891f478a6c03449d02461da455f05d7963b851e (diff)
downloadscummvm-rg350-f0ab92faa14d45bea2f0c6e1c8d5ac6e4c6e5c5c.tar.gz
scummvm-rg350-f0ab92faa14d45bea2f0c6e1c8d5ac6e4c6e5c5c.tar.bz2
scummvm-rg350-f0ab92faa14d45bea2f0c6e1c8d5ac6e4c6e5c5c.zip
HDB: Update setButtons()
Diffstat (limited to 'engines/hdb')
-rw-r--r--engines/hdb/input.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/engines/hdb/input.cpp b/engines/hdb/input.cpp
index 5c18b75149..0fb4e303bb 100644
--- a/engines/hdb/input.cpp
+++ b/engines/hdb/input.cpp
@@ -46,7 +46,45 @@ bool Input::init() {
}
void Input::setButtons(uint16 b) {
+ static int changeState = 0;
+ static int drawDlg = 0;
+ static int quit = 0;
+ static int debugOn = 0;
+
_buttons = b;
+ if (!b)
+ return;
+
+ // Change Game State
+ if ((_buttons & kButtonA) && !changeState && (g_hdb->getGameState() != GAME_MENU)) {
+ if (g_hdb->_ai->cinematicsActive() && g_hdb->_ai->cineAbortable()) {
+ g_hdb->_ai->cineAbort();
+ warning("STUB: setButtons: Play SND_POP");
+ return;
+ }
+
+ if (g_hdb->getGameState() == GAME_TITLE)
+ warning("STUB: setButtons: changeToMenu() required");
+ warning("STUB: setButtons: Play SND_MENU_BACKOUT");
+ g_hdb->changeGameState();
+ }
+
+ // Debug Mode Cycling
+ warning("STUB: setButtons: Check and set Debug Mode");
+
+ if (g_hdb->getGameState() == GAME_PLAY) {
+ // Is Player Dead? Click on TRY AGAIN
+ if (g_hdb->_ai->playerDead()) {
+ warning("STUB: TRY AGAIN is onscreen");
+ return;
+ }
+
+ warning("STUB: setButtons: Choose from DialogChoice");
+
+ // Try to move the player
+ if (!g_hdb->_ai->playerDead())
+ g_hdb->_ai->movePlayer(_buttons);
+ }
}
uint16 Input::getButtons() {