Skip to content

Commit

Permalink
HOPKINS: Fix PCX loading when no present in CAT file.
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke committed Nov 17, 2012
1 parent 98a3f96 commit cdbba33
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion engines/hopkins/files.cpp
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions engines/hopkins/graphics.cpp
Expand Up @@ -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());
Expand Down Expand Up @@ -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();

Expand Down

0 comments on commit cdbba33

Please sign in to comment.