aboutsummaryrefslogtreecommitdiff
path: root/engines/hugo
diff options
context:
space:
mode:
authorMatthew Hoops2011-05-31 14:16:29 -0400
committerMatthew Hoops2011-05-31 14:16:29 -0400
commitaa49b38c5a8032586cb94fc4ca07149eecabe64a (patch)
treeea5c7617f8c482c8cf4141b728b3ccff5a7f84c7 /engines/hugo
parentd3ea9ab2a9334747eb445c1b45aa30cb17ffdf1b (diff)
parentc86a6c466fabe31fbf36363aa8d0ac8ea6001b9f (diff)
downloadscummvm-rg350-aa49b38c5a8032586cb94fc4ca07149eecabe64a.tar.gz
scummvm-rg350-aa49b38c5a8032586cb94fc4ca07149eecabe64a.tar.bz2
scummvm-rg350-aa49b38c5a8032586cb94fc4ca07149eecabe64a.zip
Merge remote branch 'upstream/master' into t7g-ios
Conflicts: engines/groovie/script.cpp
Diffstat (limited to 'engines/hugo')
-rw-r--r--engines/hugo/console.cpp121
-rw-r--r--engines/hugo/console.h9
-rw-r--r--engines/hugo/detection.cpp5
-rw-r--r--engines/hugo/dialogs.cpp3
-rw-r--r--engines/hugo/dialogs.h3
-rw-r--r--engines/hugo/display.cpp9
-rw-r--r--engines/hugo/display.h3
-rw-r--r--engines/hugo/file.cpp3
-rw-r--r--engines/hugo/file.h3
-rw-r--r--engines/hugo/file_v1d.cpp3
-rw-r--r--engines/hugo/file_v1w.cpp3
-rw-r--r--engines/hugo/file_v2d.cpp3
-rw-r--r--engines/hugo/file_v2w.cpp3
-rw-r--r--engines/hugo/file_v3d.cpp3
-rw-r--r--engines/hugo/game.h3
-rw-r--r--engines/hugo/hugo.cpp28
-rw-r--r--engines/hugo/hugo.h5
-rw-r--r--engines/hugo/intro.cpp3
-rw-r--r--engines/hugo/intro.h3
-rw-r--r--engines/hugo/inventory.cpp3
-rw-r--r--engines/hugo/inventory.h3
-rw-r--r--engines/hugo/mouse.cpp3
-rw-r--r--engines/hugo/mouse.h3
-rw-r--r--engines/hugo/object.cpp3
-rw-r--r--engines/hugo/object.h3
-rw-r--r--engines/hugo/object_v1d.cpp5
-rw-r--r--engines/hugo/object_v1w.cpp5
-rw-r--r--engines/hugo/object_v2d.cpp5
-rw-r--r--engines/hugo/object_v3d.cpp3
-rw-r--r--engines/hugo/parser.cpp3
-rw-r--r--engines/hugo/parser.h8
-rw-r--r--engines/hugo/parser_v1d.cpp3
-rw-r--r--engines/hugo/parser_v1w.cpp3
-rw-r--r--engines/hugo/parser_v2d.cpp3
-rw-r--r--engines/hugo/parser_v3d.cpp3
-rw-r--r--engines/hugo/route.cpp3
-rw-r--r--engines/hugo/route.h3
-rw-r--r--engines/hugo/schedule.cpp29
-rw-r--r--engines/hugo/schedule.h19
-rw-r--r--engines/hugo/sound.cpp3
-rw-r--r--engines/hugo/sound.h3
-rw-r--r--engines/hugo/text.cpp3
-rw-r--r--engines/hugo/text.h3
-rw-r--r--engines/hugo/util.cpp3
-rw-r--r--engines/hugo/util.h3
45 files changed, 169 insertions, 178 deletions
diff --git a/engines/hugo/console.cpp b/engines/hugo/console.cpp
index 3ff37ccbc7..0a67b5cd0a 100644
--- a/engines/hugo/console.cpp
+++ b/engines/hugo/console.cpp
@@ -18,20 +18,135 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "hugo/console.h"
#include "hugo/hugo.h"
+#include "hugo/object.h"
+#include "hugo/parser.h"
+#include "hugo/schedule.h"
+#include "hugo/text.h"
namespace Hugo {
HugoConsole::HugoConsole(HugoEngine *vm) : GUI::Debugger(), _vm(vm) {
+ DCmd_Register("listscreens", WRAP_METHOD(HugoConsole, Cmd_listScreens));
+ DCmd_Register("listobjects", WRAP_METHOD(HugoConsole, Cmd_listObjects));
+ DCmd_Register("getobject", WRAP_METHOD(HugoConsole, Cmd_getObject));
+ DCmd_Register("getallobjects", WRAP_METHOD(HugoConsole, Cmd_getAllObjects));
+ DCmd_Register("gotoscreen", WRAP_METHOD(HugoConsole, Cmd_gotoScreen));
+ DCmd_Register("Boundaries", WRAP_METHOD(HugoConsole, Cmd_boundaries));
}
HugoConsole::~HugoConsole() {
}
+static int strToInt(const char *s) {
+ if (!*s)
+ // No string at all
+ return 0;
+ else if (toupper(s[strlen(s) - 1]) != 'H')
+ // Standard decimal string
+ return atoi(s);
+
+ // Hexadecimal string
+ uint tmp = 0;
+ int read = sscanf(s, "%xh", &tmp);
+ if (read < 1)
+ error("strToInt failed on string \"%s\"", s);
+ return (int)tmp;
+}
+
+/**
+ * This command loads up the specified screen number
+ */
+bool HugoConsole::Cmd_gotoScreen(int argc, const char **argv) {
+ if ((argc != 2) || (strToInt(argv[1]) > _vm->_numScreens)){
+ DebugPrintf("Usage: %s <screen number>\n", argv[0]);
+ return true;
+ }
+
+ _vm->_scheduler->newScreen(strToInt(argv[1]));
+ return false;
+}
+
+/**
+ * This command lists all the screens available
+ */
+bool HugoConsole::Cmd_listScreens(int argc, const char **argv) {
+ if (argc != 1) {
+ DebugPrintf("Usage: %s\n", argv[0]);
+ return true;
+ }
+
+ DebugPrintf("Available screens for this game are:\n");
+ for (int i = 0; i < _vm->_numScreens; i++)
+ DebugPrintf("%2d - %s\n", i, _vm->_text->getScreenNames(i));
+ return true;
+}
+
+/**
+ * This command lists all the objects available
+ */
+bool HugoConsole::Cmd_listObjects(int argc, const char **argv) {
+ if (argc != 1) {
+ DebugPrintf("Usage: %s\n", argv[0]);
+ return true;
+ }
+
+ DebugPrintf("Available objects for this game are:\n");
+ for (int i = 0; i < _vm->_object->_numObj; i++) {
+ if (_vm->_object->_objects[i].genericCmd & TAKE)
+ DebugPrintf("%2d - %s\n", i, _vm->_text->getNoun(_vm->_object->_objects[i].nounIndex, 2));
+ }
+ return true;
+}
+
+/**
+ * This command puts an object in the inventory
+ */
+bool HugoConsole::Cmd_getObject(int argc, const char **argv) {
+ if ((argc != 2) || (strToInt(argv[1]) > _vm->_object->_numObj)) {
+ DebugPrintf("Usage: %s <object number>\n", argv[0]);
+ return true;
+ }
+
+ if (_vm->_object->_objects[strToInt(argv[1])].genericCmd & TAKE)
+ _vm->_parser->takeObject(&_vm->_object->_objects[strToInt(argv[1])]);
+ else
+ DebugPrintf("Object not available\n");
+
+ return true;
+}
+
+/**
+ * This command puts all the available objects in the inventory
+ */
+bool HugoConsole::Cmd_getAllObjects(int argc, const char **argv) {
+ if (argc != 1) {
+ DebugPrintf("Usage: %s\n", argv[0]);
+ return true;
+ }
+
+ for (int i = 0; i < _vm->_object->_numObj; i++) {
+ if (_vm->_object->_objects[i].genericCmd & TAKE)
+ _vm->_parser->takeObject(&_vm->_object->_objects[i]);
+ }
+
+ return false;
+}
+
+/**
+ * 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 240b108ab6..16317e83d5 100644
--- a/engines/hugo/console.h
+++ b/engines/hugo/console.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef HUGO_CONSOLE_H
@@ -39,6 +36,12 @@ public:
private:
HugoEngine *_vm;
+ bool Cmd_listScreens(int argc, const char **argv);
+ bool Cmd_listObjects(int argc, const char **argv);
+ bool Cmd_getObject(int argc, const char **argv);
+ bool Cmd_getAllObjects(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/detection.cpp b/engines/hugo/detection.cpp
index 95302c9235..25b8b16084 100644
--- a/engines/hugo/detection.cpp
+++ b/engines/hugo/detection.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "engines/advancedDetector.h"
@@ -164,7 +161,7 @@ public:
HugoMetaEngine() : AdvancedMetaEngine(detectionParams) {}
const char *getName() const {
- return "Hugo Engine";
+ return "Hugo";
}
const char *getOriginalCopyright() const {
diff --git a/engines/hugo/dialogs.cpp b/engines/hugo/dialogs.cpp
index f0dc84eae8..6c816141f7 100644
--- a/engines/hugo/dialogs.cpp
+++ b/engines/hugo/dialogs.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/substream.h"
diff --git a/engines/hugo/dialogs.h b/engines/hugo/dialogs.h
index 56dbd41f81..4e710ff2f8 100644
--- a/engines/hugo/dialogs.h
+++ b/engines/hugo/dialogs.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef HUGO_DIALOGS_H
diff --git a/engines/hugo/display.cpp b/engines/hugo/display.cpp
index af4d094ceb..c716e80d87 100644
--- a/engines/hugo/display.cpp
+++ b/engines/hugo/display.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -647,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/display.h b/engines/hugo/display.h
index 91e1752df0..38c63e9fe5 100644
--- a/engines/hugo/display.h
+++ b/engines/hugo/display.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/file.cpp b/engines/hugo/file.cpp
index ba4e420111..cde6e108ea 100644
--- a/engines/hugo/file.cpp
+++ b/engines/hugo/file.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/file.h b/engines/hugo/file.h
index 0e131348f9..3792c01ab4 100644
--- a/engines/hugo/file.h
+++ b/engines/hugo/file.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/file_v1d.cpp b/engines/hugo/file_v1d.cpp
index 021969f306..9ebd9d284c 100644
--- a/engines/hugo/file_v1d.cpp
+++ b/engines/hugo/file_v1d.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/file_v1w.cpp b/engines/hugo/file_v1w.cpp
index 4f327b3095..eb2226f18a 100644
--- a/engines/hugo/file_v1w.cpp
+++ b/engines/hugo/file_v1w.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/file_v2d.cpp b/engines/hugo/file_v2d.cpp
index 0ad89e987e..2a663edcfa 100644
--- a/engines/hugo/file_v2d.cpp
+++ b/engines/hugo/file_v2d.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/file_v2w.cpp b/engines/hugo/file_v2w.cpp
index 245d4d017e..1384f02df6 100644
--- a/engines/hugo/file_v2w.cpp
+++ b/engines/hugo/file_v2w.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/file_v3d.cpp b/engines/hugo/file_v3d.cpp
index 6370fffa4d..7ac0ffc48a 100644
--- a/engines/hugo/file_v3d.cpp
+++ b/engines/hugo/file_v3d.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/game.h b/engines/hugo/game.h
index 08e8deb001..5db57789dc 100644
--- a/engines/hugo/game.h
+++ b/engines/hugo/game.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index a872a97bae..a08dbc094b 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -18,16 +18,12 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
#include "common/random.h"
#include "common/error.h"
#include "common/events.h"
-#include "common/EventRecorder.h"
#include "common/debug-channels.h"
#include "common/config-manager.h"
#include "common/textconsole.h"
@@ -531,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; // Boundaries hidden by default
+ _status.doQuitFl = false;
+ _status.skipIntroFl = false;
+ _status.helpFl = false;
// Initialize every start of new game
_status.tick = 0; // Tick count
@@ -597,10 +594,9 @@ void HugoEngine::initialize() {
_scheduler->initEventQueue(); // Init scheduler stuff
_screen->initDisplay(); // Create Dibs and palette
_file->openDatabaseFiles(); // Open database files
- calcMaxScore(); // Initialise maxscore
+ calcMaxScore(); // Initialize maxscore
- _rnd = new Common::RandomSource();
- g_eventRec.registerRandomSource(*_rnd, "hugo");
+ _rnd = new Common::RandomSource("hugo");
_rnd->setSeed(42); // Kick random number generator
switch (_gameVariant) {
diff --git a/engines/hugo/hugo.h b/engines/hugo/hugo.h
index b2d241f241..b5b8d5ea61 100644
--- a/engines/hugo/hugo.h
+++ b/engines/hugo/hugo.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef HUGO_H
@@ -180,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;
diff --git a/engines/hugo/intro.cpp b/engines/hugo/intro.cpp
index c31d76abd0..c66c0ef624 100644
--- a/engines/hugo/intro.cpp
+++ b/engines/hugo/intro.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/intro.h b/engines/hugo/intro.h
index 772d98e244..1bb039216a 100644
--- a/engines/hugo/intro.h
+++ b/engines/hugo/intro.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/inventory.cpp b/engines/hugo/inventory.cpp
index 45893f6965..410c4e715c 100644
--- a/engines/hugo/inventory.cpp
+++ b/engines/hugo/inventory.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/inventory.h b/engines/hugo/inventory.h
index ec102f3cce..de9e4cd1f0 100644
--- a/engines/hugo/inventory.h
+++ b/engines/hugo/inventory.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/mouse.cpp b/engines/hugo/mouse.cpp
index c02908e579..d2d5b59dae 100644
--- a/engines/hugo/mouse.cpp
+++ b/engines/hugo/mouse.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/mouse.h b/engines/hugo/mouse.h
index ae1974b726..35f9e4e87e 100644
--- a/engines/hugo/mouse.h
+++ b/engines/hugo/mouse.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/object.cpp b/engines/hugo/object.cpp
index acf9f6e50c..e888a1d998 100644
--- a/engines/hugo/object.cpp
+++ b/engines/hugo/object.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/object.h b/engines/hugo/object.h
index 41ea776840..c0933729eb 100644
--- a/engines/hugo/object.h
+++ b/engines/hugo/object.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/object_v1d.cpp b/engines/hugo/object_v1d.cpp
index 95bedf4fa2..ecdbb3b4c6 100644
--- a/engines/hugo/object_v1d.cpp
+++ b/engines/hugo/object_v1d.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -61,7 +58,7 @@ ObjectHandler_v1d::~ObjectHandler_v1d() {
void ObjectHandler_v1d::updateImages() {
debugC(5, kDebugObject, "updateImages");
- // Initialise the index array to visible objects in current screen
+ // Initialize the index array to visible objects in current screen
int num_objs = 0;
byte objindex[kMaxObjNumb]; // Array of indeces to objects
diff --git a/engines/hugo/object_v1w.cpp b/engines/hugo/object_v1w.cpp
index 54becd8234..11c09176e5 100644
--- a/engines/hugo/object_v1w.cpp
+++ b/engines/hugo/object_v1w.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -61,7 +58,7 @@ ObjectHandler_v1w::~ObjectHandler_v1w() {
void ObjectHandler_v1w::updateImages() {
debugC(5, kDebugObject, "updateImages");
- // Initialise the index array to visible objects in current screen
+ // Initialize the index array to visible objects in current screen
int num_objs = 0;
byte objindex[kMaxObjNumb]; // Array of indeces to objects
diff --git a/engines/hugo/object_v2d.cpp b/engines/hugo/object_v2d.cpp
index 7c47bf4f92..c9e5104972 100644
--- a/engines/hugo/object_v2d.cpp
+++ b/engines/hugo/object_v2d.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -61,7 +58,7 @@ ObjectHandler_v2d::~ObjectHandler_v2d() {
void ObjectHandler_v2d::updateImages() {
debugC(5, kDebugObject, "updateImages");
- // Initialise the index array to visible objects in current screen
+ // Initialize the index array to visible objects in current screen
int num_objs = 0;
byte objindex[kMaxObjNumb]; // Array of indeces to objects
diff --git a/engines/hugo/object_v3d.cpp b/engines/hugo/object_v3d.cpp
index 3ff6c56ad3..07bd5e0c7f 100644
--- a/engines/hugo/object_v3d.cpp
+++ b/engines/hugo/object_v3d.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/parser.cpp b/engines/hugo/parser.cpp
index 29a1d5efa3..4a53d67377 100644
--- a/engines/hugo/parser.cpp
+++ b/engines/hugo/parser.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/parser.h b/engines/hugo/parser.h
index b00b8d5c43..faa6dc2303 100644
--- a/engines/hugo/parser.h
+++ b/engines/hugo/parser.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -100,6 +97,7 @@ public:
virtual void lineHandler() = 0;
virtual void showInventory() const = 0;
+ virtual void takeObject(object_t *obj) = 0;
protected:
HugoEngine *_vm;
@@ -138,10 +136,10 @@ public:
virtual void lineHandler();
virtual void showInventory() const;
+ virtual void takeObject(object_t *obj);
protected:
- virtual void dropObject(object_t *obj);
- virtual void takeObject(object_t *obj);
+ virtual void dropObject(object_t *obj);
const char *findNextNoun(const char *noun) const;
bool isBackgroundWord_v1(const char *noun, const char *verb, objectList_t obj) const;
diff --git a/engines/hugo/parser_v1d.cpp b/engines/hugo/parser_v1d.cpp
index b2e515fd42..ccd428311b 100644
--- a/engines/hugo/parser_v1d.cpp
+++ b/engines/hugo/parser_v1d.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/parser_v1w.cpp b/engines/hugo/parser_v1w.cpp
index a39063357b..b1657c3bf4 100644
--- a/engines/hugo/parser_v1w.cpp
+++ b/engines/hugo/parser_v1w.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/parser_v2d.cpp b/engines/hugo/parser_v2d.cpp
index 6233f11c29..0095c4d726 100644
--- a/engines/hugo/parser_v2d.cpp
+++ b/engines/hugo/parser_v2d.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/parser_v3d.cpp b/engines/hugo/parser_v3d.cpp
index 8c4946c534..b45e9186b3 100644
--- a/engines/hugo/parser_v3d.cpp
+++ b/engines/hugo/parser_v3d.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/route.cpp b/engines/hugo/route.cpp
index 68b659cd3f..af8ec3427d 100644
--- a/engines/hugo/route.cpp
+++ b/engines/hugo/route.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/route.h b/engines/hugo/route.h
index 83a36f27ef..a95dd2151b 100644
--- a/engines/hugo/route.h
+++ b/engines/hugo/route.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/schedule.cpp b/engines/hugo/schedule.cpp
index 0e91124a7e..a099bec21c 100644
--- a/engines/hugo/schedule.cpp
+++ b/engines/hugo/schedule.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -64,7 +61,7 @@ void Scheduler::initCypher() {
}
/**
- * Initialise the timer event queue
+ * Initialize the timer event queue
*/
void Scheduler::initEventQueue() {
debugC(1, kDebugSchedule, "initEventQueue");
@@ -162,7 +159,7 @@ void Scheduler::processBonus(const int bonusIndex) {
* 2. Set the new screen (in the hero object and any carried objects)
* 3. Read in the screen files for the new screen
* 4. Schedule action list for new screen
- * 5. Initialise prompt line and status line
+ * 5. Initialize prompt line and status line
*/
void Scheduler::newScreen(const int screenIndex) {
debugC(1, kDebugSchedule, "newScreen(%d)", screenIndex);
@@ -196,7 +193,7 @@ void Scheduler::newScreen(const int screenIndex) {
// 4. Schedule action list for this screen
_vm->_scheduler->screenActions(screenIndex);
- // 5. Initialise prompt line and status line
+ // 5. Initialize prompt line and status line
_vm->_screen->initNewScreenDisplay();
}
@@ -204,7 +201,7 @@ void Scheduler::newScreen(const int screenIndex) {
* Transition to a new screen as follows:
* 1. Set the new screen (in the hero object and any carried objects)
* 2. Read in the screen files for the new screen
- * 3. Initialise prompt line and status line
+ * 3. Initialize prompt line and status line
*/
void Scheduler::restoreScreen(const int screenIndex) {
debugC(1, kDebugSchedule, "restoreScreen(%d)", screenIndex);
@@ -215,7 +212,7 @@ void Scheduler::restoreScreen(const int screenIndex) {
// 2. Read in new screen files
_vm->readScreenFiles(screenIndex);
- // 3. Initialise prompt line and status line
+ // 3. Initialize prompt line and status line
_vm->_screen->initNewScreenDisplay();
}
@@ -1138,7 +1135,7 @@ void Scheduler::restoreEvents(Common::ReadStream *f) {
void Scheduler::insertAction(act *action) {
debugC(1, kDebugSchedule, "insertAction() - Action type A%d", action->a0.actType);
- // First, get and initialise the event structure
+ // First, get and initialize the event structure
event_t *curEvent = getQueue();
curEvent->action = action;
switch (action->a0.actType) { // Assign whether local or global
@@ -1211,7 +1208,7 @@ event_t *Scheduler::doAction(event_t *curEvent) {
_vm->_object->_objects[action->a1.objIndex].cycleNumb = action->a1.cycleNumb;
_vm->_object->_objects[action->a1.objIndex].cycling = action->a1.cycle;
break;
- case INIT_OBJXY: // act2: Initialise an object
+ case INIT_OBJXY: // act2: Initialize an object
_vm->_object->_objects[action->a2.objIndex].x = action->a2.x; // Coordinates
_vm->_object->_objects[action->a2.objIndex].y = action->a2.y;
break;
@@ -1221,13 +1218,13 @@ event_t *Scheduler::doAction(event_t *curEvent) {
case BKGD_COLOR: // act4: Set new background color
_vm->_screen->setBackgroundColor(action->a4.newBackgroundColor);
break;
- case INIT_OBJVXY: // act5: Initialise an object velocity
+ case INIT_OBJVXY: // act5: Initialize an object velocity
_vm->_object->setVelocity(action->a5.objIndex, action->a5.vx, action->a5.vy);
break;
- case INIT_CARRY: // act6: Initialise an object
+ case INIT_CARRY: // act6: Initialize an object
_vm->_object->setCarry(action->a6.objIndex, action->a6.carriedFl); // carried status
break;
- case INIT_HF_COORD: // act7: Initialise an object to hero's "feet" coords
+ case INIT_HF_COORD: // act7: Initialize an object to hero's "feet" coords
_vm->_object->_objects[action->a7.objIndex].x = _vm->_hero->x - 1;
_vm->_object->_objects[action->a7.objIndex].y = _vm->_hero->y + _vm->_hero->currImagePtr->y2 - 1;
_vm->_object->_objects[action->a7.objIndex].screenIndex = *_vm->_screen_p; // Don't forget screen!
@@ -1235,10 +1232,10 @@ event_t *Scheduler::doAction(event_t *curEvent) {
case NEW_SCREEN: // act8: Start new screen
newScreen(action->a8.screenIndex);
break;
- case INIT_OBJSTATE: // act9: Initialise an object state
+ case INIT_OBJSTATE: // act9: Initialize an object state
_vm->_object->_objects[action->a9.objIndex].state = action->a9.newState;
break;
- case INIT_PATH: // act10: Initialise an object path and velocity
+ case INIT_PATH: // act10: Initialize an object path and velocity
_vm->_object->setPath(action->a10.objIndex, (path_t) action->a10.newPathType, action->a10.vxPath, action->a10.vyPath);
break;
case COND_R: // act11: action lists conditional on object state
@@ -1287,7 +1284,7 @@ event_t *Scheduler::doAction(event_t *curEvent) {
// any objects are to be made invisible!
gameStatus.gameOverFl = true;
break;
- case INIT_HH_COORD: // act22: Initialise an object to hero's actual coords
+ case INIT_HH_COORD: // act22: Initialize an object to hero's actual coords
_vm->_object->_objects[action->a22.objIndex].x = _vm->_hero->x;
_vm->_object->_objects[action->a22.objIndex].y = _vm->_hero->y;
_vm->_object->_objects[action->a22.objIndex].screenIndex = *_vm->_screen_p;// Don't forget screen!
diff --git a/engines/hugo/schedule.h b/engines/hugo/schedule.h
index a066fc63c4..e3107809cf 100644
--- a/engines/hugo/schedule.h
+++ b/engines/hugo/schedule.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -76,7 +73,7 @@ enum action_t { // Parameters:
INIT_MAZE, // 30 - Start special maze hotspot processing
EXIT_MAZE, // 31 - Exit special maze processing
INIT_PRIORITY, // 32 - Initialize fbg field
- INIT_SCREEN, // 33 - Initialise screen field of object
+ INIT_SCREEN, // 33 - Initialize screen field of object
AGSCHEDULE, // 34 - Global schedule - lasts over new screen
REMAPPAL, // 35 - Remappe palette - palette index, color
COND_NOUN, // 36 - Conditional on noun appearing in line
@@ -109,7 +106,7 @@ struct act1 { // Type 1 - Start an object
cycle_t cycle; // Direction to start cycling
};
-struct act2 { // Type 2 - Initialise an object coords
+struct act2 { // Type 2 - Initialize an object coords
action_t actType; // The type of action
int timer; // Time to set off the action
int objIndex; // The object number
@@ -132,21 +129,21 @@ struct act4 { // Type 4 - Set new backgrou
long newBackgroundColor; // New color
};
-struct act5 { // Type 5 - Initialise an object velocity
+struct act5 { // Type 5 - Initialize an object velocity
action_t actType; // The type of action
int timer; // Time to set off the action
int objIndex; // The object number
int vx, vy; // velocity
};
-struct act6 { // Type 6 - Initialise an object carrying
+struct act6 { // Type 6 - Initialize an object carrying
action_t actType; // The type of action
int timer; // Time to set off the action
int objIndex; // The object number
bool carriedFl; // carrying
};
-struct act7 { // Type 7 - Initialise an object to hero's coords
+struct act7 { // Type 7 - Initialize an object to hero's coords
action_t actType; // The type of action
int timer; // Time to set off the action
int objIndex; // The object number
@@ -158,14 +155,14 @@ struct act8 { // Type 8 - switch to new sc
int screenIndex; // The new screen number
};
-struct act9 { // Type 9 - Initialise an object state
+struct act9 { // Type 9 - Initialize an object state
action_t actType; // The type of action
int timer; // Time to set off the action
int objIndex; // The object number
byte newState; // New state
};
-struct act10 { // Type 10 - Initialise an object path type
+struct act10 { // Type 10 - Initialize an object path type
action_t actType; // The type of action
int timer; // Time to set off the action
int objIndex; // The object number
@@ -254,7 +251,7 @@ struct act21 { // Type 21 - Gameover. Disa
int timer; // Time to set off the action
};
-struct act22 { // Type 22 - Initialise an object to hero's coords
+struct act22 { // Type 22 - Initialize an object to hero's coords
action_t actType; // The type of action
int timer; // Time to set off the action
int objIndex; // The object number
diff --git a/engines/hugo/sound.cpp b/engines/hugo/sound.cpp
index d657eb96a6..9473536a47 100644
--- a/engines/hugo/sound.cpp
+++ b/engines/hugo/sound.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/sound.h b/engines/hugo/sound.h
index d5f51704aa..33dba9f2a8 100644
--- a/engines/hugo/sound.h
+++ b/engines/hugo/sound.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/text.cpp b/engines/hugo/text.cpp
index d2dcbe1405..f8b02bdf68 100644
--- a/engines/hugo/text.cpp
+++ b/engines/hugo/text.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
diff --git a/engines/hugo/text.h b/engines/hugo/text.h
index 0854bf3f6e..0ba8de9cdf 100644
--- a/engines/hugo/text.h
+++ b/engines/hugo/text.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TEXT_H
#define TEXT_H
diff --git a/engines/hugo/util.cpp b/engines/hugo/util.cpp
index 6846bc98af..a936a23de1 100644
--- a/engines/hugo/util.cpp
+++ b/engines/hugo/util.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/util.h b/engines/hugo/util.h
index 85fef01a6e..d8634c88e0 100644
--- a/engines/hugo/util.h
+++ b/engines/hugo/util.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*