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

strangerke at users.sourceforge.net strangerke at users.sourceforge.net
Fri Sep 17 01:03:03 CEST 2010


Revision: 52755
          http://scummvm.svn.sourceforge.net/scummvm/?rev=52755&view=rev
Author:   strangerke
Date:     2010-09-16 23:03:03 +0000 (Thu, 16 Sep 2010)

Log Message:
-----------
HUGO: Fix H1 DOS initialization

Fix a bug in hugo.dat loading and initialize properly Hugo1 DOS

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

Modified: scummvm/trunk/engines/hugo/file.cpp
===================================================================
--- scummvm/trunk/engines/hugo/file.cpp	2010-09-16 23:00:25 UTC (rev 52754)
+++ scummvm/trunk/engines/hugo/file.cpp	2010-09-16 23:03:03 UTC (rev 52755)
@@ -231,6 +231,8 @@
 	case CYCLE_BACKWARD:
 		objPtr->currImagePtr = seqPtr;
 		break;
+	default:
+		warning("Unexpected cycling: %d", objPtr->cycling);
 	}
 
 	if (!_vm.isPacked())
@@ -791,13 +793,9 @@
 	debugC(1, kDebugFile, "readBackground(%d)", screenIndex);
 
 	char *buf = (char *) malloc(2048 + 1);      // Buffer for file access
-	strcat(strcat(strcpy(buf, _vm._picDir), _vm._screenNames[screenIndex]), BKGEXT);
-	if (!_sceneryArchive1.open(buf)) {
-		warning("File %s not found, trying again with %s.ART", buf, _vm._screenNames[screenIndex]);
-		strcat(strcpy(buf, _vm._screenNames[screenIndex]), ".ART");
-		if (!_sceneryArchive1.open(buf))
-			Utils::Error(FILE_ERR, "%s", buf);
-	}
+	strcat(strcpy(buf, _vm._screenNames[screenIndex]), ".ART");
+	if (!_sceneryArchive1.open(buf))
+		Utils::Error(FILE_ERR, "%s", buf);
 	// Read the image into dummy seq and static dib_a
 	readPCX(_sceneryArchive1, &seq, _vm.screen().getFrontBuffer(), true, _vm._screenNames[screenIndex]);
 

Modified: scummvm/trunk/engines/hugo/hugo.cpp
===================================================================
--- scummvm/trunk/engines/hugo/hugo.cpp	2010-09-16 23:00:25 UTC (rev 52754)
+++ scummvm/trunk/engines/hugo/hugo.cpp	2010-09-16 23:03:03 UTC (rev 52755)
@@ -258,7 +258,10 @@
 }
 
 void HugoEngine::initMachine() {
-	file().readBackground(_numScreens - 1);         // Splash screen
+	if (_gameVariant == 3)
+		readScreenFiles(0);
+	else
+		file().readBackground(_numScreens - 1);         // Splash screen
 	readObjectImages();                             // Read all object images
 	if (_platform == Common::kPlatformWindows)
 		readUIFImages();                            // Read all uif images (only in Win versions)
@@ -1397,6 +1400,7 @@
 			res = (char **)malloc(sizeof(char *) * numTexts);
 			res[0] = pos;
 			in.read(res[0], entryLen);
+			res[0] += DATAALIGNMENT;
 		} else {
 			in.read(pos, entryLen);
 		}
@@ -1467,6 +1471,7 @@
 				res = (char **)malloc(sizeof(char *) * numTexts);
 				res[0] = pos;
 				in.read(res[0], entryLen);
+				res[0] += DATAALIGNMENT;
 			} else {
 				in.read(pos, entryLen);
 			}

Modified: scummvm/trunk/engines/hugo/hugo.h
===================================================================
--- scummvm/trunk/engines/hugo/hugo.h	2010-09-16 23:00:25 UTC (rev 52754)
+++ scummvm/trunk/engines/hugo/hugo.h	2010-09-16 23:03:03 UTC (rev 52755)
@@ -48,7 +48,7 @@
 	kGameTypeHugo3
 };
 
-enum HugoebugChannels {
+enum HugoDebugChannels {
 	kDebugSchedule   = 1 <<  0,
 	kDebugEngine     = 1 <<  1,
 	kDebugDisplay    = 1 <<  2,


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