aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorArnaud Boutonné2011-01-18 18:26:33 +0000
committerArnaud Boutonné2011-01-18 18:26:33 +0000
commit801561e6bc789cbf83704efe612ba6ec704ef326 (patch)
tree35fae70f1258c339be24dbd76609134a6be99aff /engines
parent6e857ec39634f60ec8702bc366d3fa48c6a0637d (diff)
downloadscummvm-rg350-801561e6bc789cbf83704efe612ba6ec704ef326.tar.gz
scummvm-rg350-801561e6bc789cbf83704efe612ba6ec704ef326.tar.bz2
scummvm-rg350-801561e6bc789cbf83704efe612ba6ec704ef326.zip
HUGO: Clean up
- Suppress some obsolete comments - Get rid of some magic numbers svn-id: r55307
Diffstat (limited to 'engines')
-rw-r--r--engines/hugo/file.cpp4
-rw-r--r--engines/hugo/hugo.cpp17
-rw-r--r--engines/hugo/intro_v3w.cpp3
-rw-r--r--engines/hugo/object.cpp1
4 files changed, 11 insertions, 14 deletions
diff --git a/engines/hugo/file.cpp b/engines/hugo/file.cpp
index 31b786c9fe..0f7e2c8f89 100644
--- a/engines/hugo/file.cpp
+++ b/engines/hugo/file.cpp
@@ -521,7 +521,7 @@ void FileManager::printBootText() {
Common::File ofp;
if (!ofp.open(BOOTFILE)) {
- if (_vm->_gameVariant == 3) {
+ if (_vm->_gameVariant == kGameVariantH1Dos) {
//TODO initialize properly _boot structure
warning("printBootText - Skipping as H1 Dos may be a freeware");
return;
@@ -560,7 +560,7 @@ void FileManager::readBootFile() {
Common::File ofp;
if (!ofp.open(BOOTFILE)) {
- if (_vm->_gameVariant == 3) {
+ if (_vm->_gameVariant == kGameVariantH1Dos) {
//TODO initialize properly _boot structure
warning("readBootFile - Skipping as H1 Dos may be a freeware");
return;
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index f3eb3aa46c..8b1ebd78dd 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -200,7 +200,7 @@ Common::Error HugoEngine::run() {
_topMenu = new TopMenu(this);
switch (_gameVariant) {
- case 0: // H1 Win
+ case kGameVariantH1Win: // H1 Win
_file = new FileManager_v1w(this);
_scheduler = new Scheduler_v1w(this);
_intro = new intro_v1w(this);
@@ -209,7 +209,7 @@ Common::Error HugoEngine::run() {
_object = new ObjectHandler_v1w(this);
_normalTPS = 9;
break;
- case 1:
+ case kGameVariantH2Win:
_file = new FileManager_v2w(this);
_scheduler = new Scheduler_v1w(this);
_intro = new intro_v2w(this);
@@ -218,7 +218,7 @@ Common::Error HugoEngine::run() {
_object = new ObjectHandler_v1w(this);
_normalTPS = 9;
break;
- case 2:
+ case kGameVariantH3Win:
_file = new FileManager_v2w(this);
_scheduler = new Scheduler_v1w(this);
_intro = new intro_v3w(this);
@@ -227,7 +227,7 @@ Common::Error HugoEngine::run() {
_object = new ObjectHandler_v1w(this);
_normalTPS = 9;
break;
- case 3: // H1 DOS
+ case kGameVariantH1Dos: // H1 DOS
_file = new FileManager_v1d(this);
_scheduler = new Scheduler_v1d(this);
_intro = new intro_v1d(this);
@@ -236,7 +236,7 @@ Common::Error HugoEngine::run() {
_object = new ObjectHandler_v1d(this);
_normalTPS = 8;
break;
- case 4:
+ case kGameVariantH2Dos:
_file = new FileManager_v2d(this);
_scheduler = new Scheduler_v2d(this);
_intro = new intro_v2d(this);
@@ -245,7 +245,7 @@ Common::Error HugoEngine::run() {
_object = new ObjectHandler_v2d(this);
_normalTPS = 8;
break;
- case 5:
+ case kGameVariantH3Dos:
_file = new FileManager_v3d(this);
_scheduler = new Scheduler_v3d(this);
_intro = new intro_v3d(this);
@@ -670,7 +670,6 @@ bool HugoEngine::loadHugoDat() {
}
// Read _screenActs
- // TODO: For Hugo2 and Hugo3, if not in story mode, increment _screenActs[0][0] (ex: kALcrashStory + 1 == kALcrashNoStory)
for (int varnt = 0; varnt < _numVariant; varnt++) {
numElem = in.readUint16BE();
if (varnt == _gameVariant) {
@@ -1055,7 +1054,9 @@ void HugoEngine::readScreenFiles(int screenNum) {
_file->readOverlay(screenNum, _overlay, OVERLAY); // Overlay file
_file->readOverlay(screenNum, _ovlBase, OVLBASE); // Overlay base file
- if ((screenNum == 0) && (_gameVariant == 5)) // H3 Dos
+ // Suppress a boundary used in H3 DOS in 'Crash' screen, which blocks
+ // pathfinding and is useless.
+ if ((screenNum == 0) && (_gameVariant == kGameVariantH3Dos))
clearScreenBoundary(50, 311, 152);
}
diff --git a/engines/hugo/intro_v3w.cpp b/engines/hugo/intro_v3w.cpp
index 161cf242e5..21e21775d2 100644
--- a/engines/hugo/intro_v3w.cpp
+++ b/engines/hugo/intro_v3w.cpp
@@ -59,13 +59,10 @@ void intro_v3w::introInit() {
_vm->_screen->displayBackground();
g_system->updateScreen();
g_system->delayMillis(3000);
-
-//#if STORY
_vm->_file->readBackground(22); // display screen MAP_3w
_vm->_screen->displayBackground();
introTicks = 0;
_vm->_screen->loadFont(0);
-//#endif
}
/**
diff --git a/engines/hugo/object.cpp b/engines/hugo/object.cpp
index 1e422ca460..7200b1ce05 100644
--- a/engines/hugo/object.cpp
+++ b/engines/hugo/object.cpp
@@ -366,7 +366,6 @@ void ObjectHandler::freeObjectArr() {
void ObjectHandler::loadObjectArr(Common::File &in) {
debugC(6, kDebugObject, "loadObject(&in)");
-// TODO: For Hugo3, if not in story mode, set _objects[2].state to 3
for (int varnt = 0; varnt < _vm->_numVariant; varnt++) {
uint16 numElem = in.readUint16BE();
if (varnt == _vm->_gameVariant) {