[Scummvm-cvs-logs] SF.net SVN: scummvm:[40192] scummvm/trunk/engines/agos
Kirben at users.sourceforge.net
Kirben at users.sourceforge.net
Wed Apr 29 07:41:44 CEST 2009
Revision: 40192
http://scummvm.svn.sourceforge.net/scummvm/?rev=40192&view=rev
Author: Kirben
Date: 2009-04-29 05:41:44 +0000 (Wed, 29 Apr 2009)
Log Message:
-----------
Add support for unpacked data files, in the PC version of PN.
Modified Paths:
--------------
scummvm/trunk/engines/agos/detection_tables.h
scummvm/trunk/engines/agos/res.cpp
scummvm/trunk/engines/agos/res_snd.cpp
Modified: scummvm/trunk/engines/agos/detection_tables.h
===================================================================
--- scummvm/trunk/engines/agos/detection_tables.h 2009-04-29 05:30:58 UTC (rev 40191)
+++ scummvm/trunk/engines/agos/detection_tables.h 2009-04-29 05:41:44 UTC (rev 40192)
@@ -92,13 +92,14 @@
GF_OLD_BUNDLE | GF_CRUNCHED | GF_PLANAR
},
- // Personal Nightmare 1.1c - EGA English DOS Floppy
+ // Personal Nightmare 1.1c - EGA English DOS Floppy (Packed)
{
{
"pn",
"Floppy",
{
+ { "01.out", GAME_ICONFILE, "3a2a4c3e07dfbc4b309deade0af37baf", -1},
{ "icon.out", GAME_ICONFILE, "40d8347c3154bfa8b642d6860a4b9481", -1},
{ "night.dbm", GAME_BASEFILE, "177311ae059243f6a2740e950585d786", -1},
{ "night.txt", GAME_TEXTFILE, "861fc1fa0864eef585f5865dee52e325", -1},
@@ -114,6 +115,29 @@
GF_OLD_BUNDLE | GF_CRUNCHED | GF_EGA | GF_PLANAR
},
+ // Personal Nightmare 1.1c - EGA English DOS Floppy (Unpacked)
+ {
+ {
+ "pn",
+ "Floppy",
+
+ {
+ { "01.out", GAME_ICONFILE, "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
{
{
Modified: scummvm/trunk/engines/agos/res.cpp
===================================================================
--- scummvm/trunk/engines/agos/res.cpp 2009-04-29 05:30:58 UTC (rev 40191)
+++ scummvm/trunk/engines/agos/res.cpp 2009-04-29 05:41:44 UTC (rev 40192)
@@ -892,29 +892,27 @@
dst = allocBlock(dstSize + extraBuffer);
if (in.read(dst, dstSize) != dstSize)
error("loadVGAVideoFile: Read failed");
- } else if (getFeatures() & GF_CRUNCHED) {
- if (getGameType() == GType_PN) {
- Common::Stack<uint32> data;
- byte *dataOut = 0;
- int dataOutSize = 0;
+ } else if (getGameType() == GType_PN && (getFeatures() & GF_CRUNCHED)) {
+ Common::Stack<uint32> data;
+ 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)
+ data.push(in.readUint32BE());
- decompressPN(data, dataOut, dataOutSize);
- dst = allocBlock (dataOutSize + extraBuffer);
- memcpy(dst, dataOut, dataOutSize);
- delete[] dataOut;
- } else {
- byte *srcBuffer = (byte *)malloc(srcSize);
- if (in.read(srcBuffer, srcSize) != srcSize)
- error("loadVGAVideoFile: Read failed");
+ decompressPN(data, dataOut, dataOutSize);
+ dst = allocBlock (dataOutSize + extraBuffer);
+ memcpy(dst, dataOut, dataOutSize);
+ delete[] dataOut;
+ } else if (getFeatures() & GF_CRUNCHED) {
+ byte *srcBuffer = (byte *)malloc(srcSize);
+ if (in.read(srcBuffer, srcSize) != srcSize)
+ error("loadVGAVideoFile: Read failed");
- dstSize = READ_BE_UINT32(srcBuffer + srcSize - 4);
- dst = allocBlock (dstSize + extraBuffer);
- decrunchFile(srcBuffer, dst, srcSize);
- free(srcBuffer);
- }
+ dstSize = READ_BE_UINT32(srcBuffer + srcSize - 4);
+ dst = allocBlock (dstSize + extraBuffer);
+ decrunchFile(srcBuffer, dst, srcSize);
+ free(srcBuffer);
} else {
dst = allocBlock(dstSize + extraBuffer);
if (in.read(dst, dstSize) != dstSize)
Modified: scummvm/trunk/engines/agos/res_snd.cpp
===================================================================
--- scummvm/trunk/engines/agos/res_snd.cpp 2009-04-29 05:30:58 UTC (rev 40191)
+++ scummvm/trunk/engines/agos/res_snd.cpp 2009-04-29 05:41:44 UTC (rev 40192)
@@ -390,7 +390,7 @@
}
dstSize = srcSize = in.size();
- if (getGameType() == GType_PN) {
+ if (getGameType() == GType_PN && (getFeatures() & GF_CRUNCHED)) {
Common::Stack<uint32> data;
byte *dataOut = 0;
int dataOutSize = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list