aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNipun Garg2019-07-14 02:54:15 +0530
committerEugene Sandulenko2019-09-03 17:17:20 +0200
commitb36569d201d45e65cabe3fc409a2de97dbaef00e (patch)
treefe1d6a3618d16f411d7986fe0e3e965f9db5c31b
parent469c2245b4080d75e46268d427ab13c39e8a8f36 (diff)
downloadscummvm-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.cpp17
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