[Scummvm-cvs-logs] SF.net SVN: scummvm:[55307] scummvm/trunk/engines/hugo

strangerke at users.sourceforge.net strangerke at users.sourceforge.net
Tue Jan 18 19:26:33 CET 2011


Revision: 55307
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55307&view=rev
Author:   strangerke
Date:     2011-01-18 18:26:33 +0000 (Tue, 18 Jan 2011)

Log Message:
-----------
HUGO: Clean up

- Suppress some obsolete comments
- Get rid of some magic numbers

Modified Paths:
--------------
    scummvm/trunk/engines/hugo/file.cpp
    scummvm/trunk/engines/hugo/hugo.cpp
    scummvm/trunk/engines/hugo/intro_v3w.cpp
    scummvm/trunk/engines/hugo/object.cpp

Modified: scummvm/trunk/engines/hugo/file.cpp
===================================================================
--- scummvm/trunk/engines/hugo/file.cpp	2011-01-18 17:57:27 UTC (rev 55306)
+++ scummvm/trunk/engines/hugo/file.cpp	2011-01-18 18:26:33 UTC (rev 55307)
@@ -521,7 +521,7 @@
 
 	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 @@
 
 	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;

Modified: scummvm/trunk/engines/hugo/hugo.cpp
===================================================================
--- scummvm/trunk/engines/hugo/hugo.cpp	2011-01-18 17:57:27 UTC (rev 55306)
+++ scummvm/trunk/engines/hugo/hugo.cpp	2011-01-18 18:26:33 UTC (rev 55307)
@@ -200,7 +200,7 @@
 	_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 @@
 		_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 @@
 		_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 @@
 		_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 @@
 		_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 @@
 		_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 @@
 	}
 
 	// 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 @@
 	_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);
 
 }

Modified: scummvm/trunk/engines/hugo/intro_v3w.cpp
===================================================================
--- scummvm/trunk/engines/hugo/intro_v3w.cpp	2011-01-18 17:57:27 UTC (rev 55306)
+++ scummvm/trunk/engines/hugo/intro_v3w.cpp	2011-01-18 18:26:33 UTC (rev 55307)
@@ -59,13 +59,10 @@
 	_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
 }
 
 /**

Modified: scummvm/trunk/engines/hugo/object.cpp
===================================================================
--- scummvm/trunk/engines/hugo/object.cpp	2011-01-18 17:57:27 UTC (rev 55306)
+++ scummvm/trunk/engines/hugo/object.cpp	2011-01-18 18:26:33 UTC (rev 55307)
@@ -366,7 +366,6 @@
 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) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list