diff options
author | Nipun Garg | 2019-07-14 02:54:15 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:20 +0200 |
commit | b36569d201d45e65cabe3fc409a2de97dbaef00e (patch) | |
tree | fe1d6a3618d16f411d7986fe0e3e965f9db5c31b | |
parent | 469c2245b4080d75e46268d427ab13c39e8a8f36 (diff) | |
download | scummvm-rg350-b36569d201d45e65cabe3fc409a2de97dbaef00e.tar.gz scummvm-rg350-b36569d201d45e65cabe3fc409a2de97dbaef00e.tar.bz2 scummvm-rg350-b36569d201d45e65cabe3fc409a2de97dbaef00e.zip |
HDB: Add code to enable Debugging
-rw-r--r-- | engines/hdb/input.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/engines/hdb/input.cpp b/engines/hdb/input.cpp index 21267f5d3f..4b7ee6afc9 100644 --- a/engines/hdb/input.cpp +++ b/engines/hdb/input.cpp @@ -72,7 +72,22 @@ void Input::setButtons(uint16 b) { } // Debug Mode Cycling - debug(9, "STUB: setButtons: Check and set Debug Mode"); + if ((_buttons & kButtonExit) && g_hdb->getCheatingOn()) { + int debugFlag = g_hdb->getDebug(); + debugFlag++; + if (debugFlag > 2) + debugFlag = 0; + g_hdb->setDebug(debugFlag); + + if (debugFlag == 2) + g_hdb->_ai->clearWaypoints(); + + if (!debugFlag && g_hdb->getGameState() == GAME_PLAY) { + int x, y; + g_hdb->_ai->getPlayerXY(&x, &y); + g_hdb->_map->centerMapXY(x + 16, y + 16); // point to center of player + } + } if (g_hdb->getGameState() == GAME_PLAY) { // Is Player Dead? Click on TRY AGAIN |