aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Bouclet2017-07-01 16:16:38 +0200
committerEugene Sandulenko2017-07-03 08:50:10 +0200
commit64c1a1d2b28f5fa0520d5824d595a3194a79ec3f (patch)
tree6d04006707747c471fdef3044cbe670f116eb2a3
parent88d594538da2271af99a588bea1baea7a0001831 (diff)
downloadscummvm-rg350-64c1a1d2b28f5fa0520d5824d595a3194a79ec3f.tar.gz
scummvm-rg350-64c1a1d2b28f5fa0520d5824d595a3194a79ec3f.tar.bz2
scummvm-rg350-64c1a1d2b28f5fa0520d5824d595a3194a79ec3f.zip
MOHAWK: Switch enabling the debug rectangles to a console var
-rw-r--r--engines/mohawk/console.cpp1
-rw-r--r--engines/mohawk/riven.cpp7
-rw-r--r--engines/mohawk/riven.h6
3 files changed, 4 insertions, 10 deletions
diff --git a/engines/mohawk/console.cpp b/engines/mohawk/console.cpp
index 37c5661078..91be370672 100644
--- a/engines/mohawk/console.cpp
+++ b/engines/mohawk/console.cpp
@@ -394,6 +394,7 @@ RivenConsole::RivenConsole(MohawkEngine_Riven *vm) : GUI::Debugger(), _vm(vm) {
registerCmd("getRMAP", WRAP_METHOD(RivenConsole, Cmd_GetRMAP));
registerCmd("combos", WRAP_METHOD(RivenConsole, Cmd_Combos));
registerCmd("sliderState", WRAP_METHOD(RivenConsole, Cmd_SliderState));
+ registerVar("show_hotspots", &_vm->_showHotspots);
}
RivenConsole::~RivenConsole() {
diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp
index 7a8119f762..f7a29ab8c2 100644
--- a/engines/mohawk/riven.cpp
+++ b/engines/mohawk/riven.cpp
@@ -232,13 +232,6 @@ void MohawkEngine_Riven::doFrame() {
case Common::KEYCODE_SPACE:
pauseGame();
break;
- case Common::KEYCODE_F4:
- _showHotspots = !_showHotspots;
- if (_showHotspots) {
- _card->drawHotspotRects();
- } else
- refreshCard();
- break;
case Common::KEYCODE_F5:
runDialog(*_optionsDialog);
if (_optionsDialog->getLoadSlot() >= 0)
diff --git a/engines/mohawk/riven.h b/engines/mohawk/riven.h
index f74d1c706b..817d4c6358 100644
--- a/engines/mohawk/riven.h
+++ b/engines/mohawk/riven.h
@@ -91,6 +91,9 @@ public:
RivenScriptManager *_scriptMan;
RivenInventory *_inventory;
+ // Display debug rectangles around the hotspots
+ bool _showHotspots;
+
GUI::Debugger *getDebugger();
bool canLoadGameStateCurrently();
@@ -112,9 +115,6 @@ private:
RivenCard *_card;
RivenStack *_stack;
- // Hotspot related functions and variables
- bool _showHotspots;
-
// Variables
void initVars();