aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2012-11-17 23:09:16 +0100
committerStrangerke2012-11-17 23:09:52 +0100
commitcdbba33e38c341619222b93b3200776a1026304b (patch)
treee4c372413f38a0baad1f8a9b23477d87756c39bf
parent98a3f96ce01e7bcbcfd180af333b482f9f33d652 (diff)
downloadscummvm-rg350-cdbba33e38c341619222b93b3200776a1026304b.tar.gz
scummvm-rg350-cdbba33e38c341619222b93b3200776a1026304b.tar.bz2
scummvm-rg350-cdbba33e38c341619222b93b3200776a1026304b.zip
HOPKINS: Fix PCX loading when no present in CAT file.
-rw-r--r--engines/hopkins/files.cpp2
-rw-r--r--engines/hopkins/graphics.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/engines/hopkins/files.cpp b/engines/hopkins/files.cpp
index bc523af254..13e54bb288 100644
--- a/engines/hopkins/files.cpp
+++ b/engines/hopkins/files.cpp
@@ -298,7 +298,7 @@ byte *FileManager::RECHERCHE_CAT(const Common::String &file, int a2) {
if (name == "FINIS") {
_vm->_globals.dos_free2(ptr);
- return false;
+ return g_PTRNUL;
}
offsetVal += 23;
diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp
index 10d9e996da..4f0450453b 100644
--- a/engines/hopkins/graphics.cpp
+++ b/engines/hopkins/graphics.cpp
@@ -212,7 +212,7 @@ void GraphicsManager::CHARGE_ECRAN(const Common::String &file) {
_vm->_fileManager.DMESS1();
flag = true;
- if (_vm->_fileManager.RECHERCHE_CAT(file, 6)) {
+ if (_vm->_fileManager.RECHERCHE_CAT(file, 6) == g_PTRNUL) {
_vm->_fileManager.CONSTRUIT_FICHIER(_vm->_globals.HOPIMAGE, file);
if (!f.open(_vm->_globals.NFICHIER))
error("CHARGE_ECRAN - %s", file.c_str());
@@ -371,7 +371,7 @@ void GraphicsManager::A_PCX640_480(byte *surface, const Common::String &file, by
// Decode the PCX
if (!pcxDecoder.loadStream(f))
- error("Error decoding PCX");
+ error("Error decoding PCX %s", file.c_str());
const Graphics::Surface *s = pcxDecoder.getSurface();