diff options
| -rw-r--r-- | engines/hugo/file.cpp | 12 | ||||
| -rw-r--r-- | engines/hugo/hugo.cpp | 7 | ||||
| -rw-r--r-- | engines/hugo/hugo.h | 2 | 
3 files changed, 12 insertions, 9 deletions
| diff --git a/engines/hugo/file.cpp b/engines/hugo/file.cpp index 8e0c817e76..3219ec44b9 100644 --- a/engines/hugo/file.cpp +++ b/engines/hugo/file.cpp @@ -231,6 +231,8 @@ void FileManager::readImage(int objNum, object_t *objPtr) {  	case CYCLE_BACKWARD:  		objPtr->currImagePtr = seqPtr;  		break; +	default: +		warning("Unexpected cycling: %d", objPtr->cycling);  	}  	if (!_vm.isPacked()) @@ -791,13 +793,9 @@ void FileManager_v1d::readBackground(int screenIndex) {  	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]); diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp index 8dc1ada4d5..80ae532cf9 100644 --- a/engines/hugo/hugo.cpp +++ b/engines/hugo/hugo.cpp @@ -258,7 +258,10 @@ Common::Error HugoEngine::run() {  }  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 @@ char **HugoEngine::loadTextsVariante(Common::File &in, uint16 *arraySize) {  			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 @@ char ***HugoEngine::loadTextsArray(Common::File &in) {  				res = (char **)malloc(sizeof(char *) * numTexts);  				res[0] = pos;  				in.read(res[0], entryLen); +				res[0] += DATAALIGNMENT;  			} else {  				in.read(pos, entryLen);  			} diff --git a/engines/hugo/hugo.h b/engines/hugo/hugo.h index 5128d4e093..e59c4dfdf5 100644 --- a/engines/hugo/hugo.h +++ b/engines/hugo/hugo.h @@ -48,7 +48,7 @@ enum GameType {  	kGameTypeHugo3  }; -enum HugoebugChannels { +enum HugoDebugChannels {  	kDebugSchedule   = 1 <<  0,  	kDebugEngine     = 1 <<  1,  	kDebugDisplay    = 1 <<  2, | 
