aboutsummaryrefslogtreecommitdiff
path: root/engines/hugo
diff options
context:
space:
mode:
authorstrangerke2011-05-25 20:23:02 +0200
committerstrangerke2011-05-25 23:39:10 +0200
commitfe41da83ad8d59062f9188414cf4759d1d42f25a (patch)
treee5f8c8ffcce4cb1492d1d384eea4adb76e354b85 /engines/hugo
parentbe3306a9eb2bff80fc1f9bdc858ac4d759d926e4 (diff)
downloadscummvm-rg350-fe41da83ad8d59062f9188414cf4759d1d42f25a.tar.gz
scummvm-rg350-fe41da83ad8d59062f9188414cf4759d1d42f25a.tar.bz2
scummvm-rg350-fe41da83ad8d59062f9188414cf4759d1d42f25a.zip
HUGO: Add boundaries() to the console. God mode no longer shows boundaries, as in the original
Diffstat (limited to 'engines/hugo')
-rw-r--r--engines/hugo/console.cpp14
-rw-r--r--engines/hugo/console.h1
-rw-r--r--engines/hugo/display.cpp6
-rw-r--r--engines/hugo/hugo.cpp19
-rw-r--r--engines/hugo/hugo.h2
5 files changed, 30 insertions, 12 deletions
diff --git a/engines/hugo/console.cpp b/engines/hugo/console.cpp
index a6acb63852..5c7b5ce412 100644
--- a/engines/hugo/console.cpp
+++ b/engines/hugo/console.cpp
@@ -30,6 +30,7 @@ namespace Hugo {
HugoConsole::HugoConsole(HugoEngine *vm) : GUI::Debugger(), _vm(vm) {
DCmd_Register("listscreens", WRAP_METHOD(HugoConsole, Cmd_listScreens));
DCmd_Register("gotoscreen", WRAP_METHOD(HugoConsole, Cmd_gotoScreen));
+ DCmd_Register("Boundaries", WRAP_METHOD(HugoConsole, Cmd_boundaries));
}
HugoConsole::~HugoConsole() {
@@ -79,4 +80,17 @@ bool HugoConsole::Cmd_listScreens(int argc, const char **argv) {
return true;
}
+/**
+ * This command shows and hides boundaries
+ */
+bool HugoConsole::Cmd_boundaries(int argc, const char **argv) {
+ if (argc != 1) {
+ DebugPrintf("Usage: %s\n", argv[0]);
+ return true;
+ }
+
+ _vm->getGameStatus().showBoundariesFl = !_vm->getGameStatus().showBoundariesFl;
+ return false;
+}
+
} // End of namespace Hugo
diff --git a/engines/hugo/console.h b/engines/hugo/console.h
index 1c715a046e..150bc2e4be 100644
--- a/engines/hugo/console.h
+++ b/engines/hugo/console.h
@@ -38,6 +38,7 @@ private:
HugoEngine *_vm;
bool Cmd_listScreens(int argc, const char **argv);
bool Cmd_gotoScreen(int argc, const char **argv);
+ bool Cmd_boundaries(int argc, const char **argv);
};
} // End of namespace Hugo
diff --git a/engines/hugo/display.cpp b/engines/hugo/display.cpp
index c731b23e59..c716e80d87 100644
--- a/engines/hugo/display.cpp
+++ b/engines/hugo/display.cpp
@@ -644,13 +644,13 @@ bool Screen::isOverlapping(const rect_t *rectA, const rect_t *rectB) const {
}
/**
- * Display active boundaries in God Mode ('PPG')
+ * Display active boundaries (activated in the console)
* Light Red = Exit hotspots
* Light Green = Visible objects
- * White = Fixed objects, parts of background
+ * White = Fix objects, parts of background
*/
void Screen::drawBoundaries() {
- if (!_vm->getGameStatus().godModeFl)
+ if (!_vm->getGameStatus().showBoundariesFl)
return;
_vm->_mouse->drawHotspots();
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index 6a0eaac331..abde0fbd20 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -527,15 +527,16 @@ void HugoEngine::initPlaylist(bool playlist[kMaxTunes]) {
*/
void HugoEngine::initStatus() {
debugC(1, kDebugEngine, "initStatus");
- _status.storyModeFl = false; // Not in story mode
- _status.gameOverFl = false; // Hero not knobbled yet
- _status.lookFl = false; // Toolbar "look" button
- _status.recallFl = false; // Toolbar "recall" button
- _status.newScreenFl = false; // Screen not just loaded
- _status.godModeFl = false; // No special cheats allowed
- _status.doQuitFl = false;
- _status.skipIntroFl = false;
- _status.helpFl = false;
+ _status.storyModeFl = false; // Not in story mode
+ _status.gameOverFl = false; // Hero not knobbled yet
+ _status.lookFl = false; // Toolbar "look" button
+ _status.recallFl = false; // Toolbar "recall" button
+ _status.newScreenFl = false; // Screen not just loaded
+ _status.godModeFl = false; // No special cheats allowed
+ _status.showBoundariesFl = false; // No special cheats allowed
+ _status.doQuitFl = false; // Boundaries hidden by default
+ _status.skipIntroFl = false;
+ _status.helpFl = false;
// Initialize every start of new game
_status.tick = 0; // Tick count
diff --git a/engines/hugo/hugo.h b/engines/hugo/hugo.h
index 61b002a2ee..b5b8d5ea61 100644
--- a/engines/hugo/hugo.h
+++ b/engines/hugo/hugo.h
@@ -177,6 +177,8 @@ struct status_t { // Game status (not saved)
bool recallFl; // Toolbar "recall" button pressed
bool newScreenFl; // New screen just loaded in dib_a
bool godModeFl; // Allow DEBUG features in live version
+ bool showBoundariesFl; // Flag used to show and hide boundaries,
+ // used by the console
bool doQuitFl;
bool skipIntroFl;
bool helpFl;