From cdbba33e38c341619222b93b3200776a1026304b Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sat, 17 Nov 2012 23:09:16 +0100 Subject: HOPKINS: Fix PCX loading when no present in CAT file. --- engines/hopkins/files.cpp | 2 +- engines/hopkins/graphics.cpp | 4 ++-- 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(); -- cgit v1.2.3