From 391cf9d1444446ce62f90e09e71954686ea50a92 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Thu, 7 May 2009 12:05:44 +0000 Subject: Correct incorrect byte in corrupt 72.out file, included with some PC versions of PN. svn-id: r40369 --- engines/agos/detection_tables.h | 26 +------------------------- engines/agos/res.cpp | 10 ++++++++-- 2 files changed, 9 insertions(+), 27 deletions(-) (limited to 'engines') diff --git a/engines/agos/detection_tables.h b/engines/agos/detection_tables.h index 505261b40e..19b070a379 100644 --- a/engines/agos/detection_tables.h +++ b/engines/agos/detection_tables.h @@ -92,14 +92,13 @@ static const AGOSGameDescription gameDescriptions[] = { GF_OLD_BUNDLE | GF_CRUNCHED | GF_PLANAR }, - // Personal Nightmare 1.1c - EGA English DOS Floppy (Packed) + // Personal Nightmare 1.1c - EGA English DOS Floppy { { "pn", "Floppy", { - { "01.out", GAME_VGAFILE, "3a2a4c3e07dfbc4b309deade0af37baf", -1}, { "icon.out", GAME_ICONFILE, "40d8347c3154bfa8b642d6860a4b9481", -1}, { "night.dbm", GAME_BASEFILE, "177311ae059243f6a2740e950585d786", -1}, { "night.txt", GAME_TEXTFILE, "861fc1fa0864eef585f5865dee52e325", -1}, @@ -115,29 +114,6 @@ static const AGOSGameDescription gameDescriptions[] = { GF_OLD_BUNDLE | GF_CRUNCHED | GF_EGA | GF_PLANAR }, - // Personal Nightmare 1.1c - EGA English DOS Floppy (Unpacked) - { - { - "pn", - "Floppy", - - { - { "01.out", GAME_VGAFILE, "7f3e2a7a3aad016ad1bf540fcbe031ca", -1}, - { "icon.out", GAME_ICONFILE, "40d8347c3154bfa8b642d6860a4b9481", -1}, - { "night.dbm", GAME_BASEFILE, "177311ae059243f6a2740e950585d786", -1}, - { "night.txt", GAME_TEXTFILE, "861fc1fa0864eef585f5865dee52e325", -1}, - { NULL, 0, NULL, 0} - }, - Common::EN_ANY, - Common::kPlatformPC, - ADGF_NO_FLAGS - }, - - GType_PN, - GID_PN, - GF_OLD_BUNDLE | GF_EGA | GF_PLANAR - }, - // Elvira 1 - English Amiga Floppy Demo { { diff --git a/engines/agos/res.cpp b/engines/agos/res.cpp index 4c8340794a..f6cac8c36a 100644 --- a/engines/agos/res.cpp +++ b/engines/agos/res.cpp @@ -897,8 +897,14 @@ void AGOSEngine::loadVGAVideoFile(uint16 id, uint8 type, bool useError) { byte *dataOut = 0; int dataOutSize = 0; - for (uint i = 0; i < srcSize / 4; ++i) - data.push(in.readUint32BE()); + for (uint i = 0; i < srcSize / 4; ++i) { + uint32 dataVal = in.readUint32BE(); + // Correct incorrect byte, in corrupt 72.out file, included in some PC versions. + if (dataVal == 168042714) + data.push(168050906); + else + data.push(dataVal); + } decompressPN(data, dataOut, dataOutSize); dst = allocBlock (dataOutSize + extraBuffer); -- cgit v1.2.3