aboutsummaryrefslogtreecommitdiff
path: root/engines/hugo/file.cpp
diff options
context:
space:
mode:
authorArnaud Boutonné2010-09-16 23:03:03 +0000
committerArnaud Boutonné2010-09-16 23:03:03 +0000
commitc7b38c45101cfcaafc60aaec4a8817c45dffca7c (patch)
tree259981f8ece2b138393a07a3a8726f694b387cbb /engines/hugo/file.cpp
parent16557884b6d694b217877813126859687cc8b59b (diff)
downloadscummvm-rg350-c7b38c45101cfcaafc60aaec4a8817c45dffca7c.tar.gz
scummvm-rg350-c7b38c45101cfcaafc60aaec4a8817c45dffca7c.tar.bz2
scummvm-rg350-c7b38c45101cfcaafc60aaec4a8817c45dffca7c.zip
HUGO: Fix H1 DOS initialization
Fix a bug in hugo.dat loading and initialize properly Hugo1 DOS svn-id: r52755
Diffstat (limited to 'engines/hugo/file.cpp')
-rw-r--r--engines/hugo/file.cpp12
1 files changed, 5 insertions, 7 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]);