[Scummvm-git-logs] scummvm master -> 1106b1f2da4ac625ad8ad819fac58882c6f5147c

sev- noreply at scummvm.org
Thu Oct 20 14:16:17 UTC 2022


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
1106b1f2da PINK: Added support for the original CD layout of Polish Peril


Commit: 1106b1f2da4ac625ad8ad819fac58882c6f5147c
    https://github.com/scummvm/scummvm/commit/1106b1f2da4ac625ad8ad819fac58882c6f5147c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-10-20T16:15:43+02:00

Commit Message:
PINK: Added support for the original CD layout of Polish Peril

Changed paths:
    engines/pink/detection_tables.h
    engines/pink/pink.cpp
    engines/pink/pink.h


diff --git a/engines/pink/detection_tables.h b/engines/pink/detection_tables.h
index 2f307a8de54..2ff768e658a 100644
--- a/engines/pink/detection_tables.h
+++ b/engines/pink/detection_tables.h
@@ -136,6 +136,18 @@ static const ADGameDescription gameDescriptions[] = {
 		GUIO1(GUIO_NOMIDI)
 	},
 
+	// Polish Original CD layout
+	{
+		"peril",
+		"Compressed",
+		AD_ENTRY2s("PPTP.ORB", "3b987bb529e131b92c3eb912871dedbd", 644839372,
+				   "Data1.cab", "a2d2dd8f68f6e3cc335b566fbfcea0b2", 3699395),
+		Common::PL_POL,
+		Common::kPlatformWindows,
+		ADGF_TESTING | ADGF_DROPPLATFORM | GF_COMPRESSED,
+		GUIO1(GUIO_NOMIDI)
+	},
+
 	// Portuguese
 	{
 		"peril",
diff --git a/engines/pink/pink.cpp b/engines/pink/pink.cpp
index b115e35082a..b50c9d53760 100644
--- a/engines/pink/pink.cpp
+++ b/engines/pink/pink.cpp
@@ -22,6 +22,7 @@
 #include "common/debug-channels.h"
 #include "common/winexe_pe.h"
 #include "common/config-manager.h"
+#include "common/installshield_cab.h"
 
 #include "engines/advancedDetector.h"
 #include "engines/util.h"
@@ -73,6 +74,17 @@ Common::Error PinkEngine::init() {
 
 	_exeResources = new Common::PEResources();
 	Common::String fileName = isPeril() ? "pptp.exe" : "hpp.exe";
+
+	if ((_desc->flags & GF_COMPRESSED) && isPeril()) {
+		fileName = "pptp.ex_";
+
+		Common::Archive *cabinet = Common::makeInstallShieldArchive("data");
+		if (!cabinet)
+			error("Failed to open the InstallShield cabinet");
+
+		SearchMan.add("data1.cab", cabinet);
+	}
+
 	if (!_exeResources->loadFromEXE(fileName)) {
 		return Common::kNoGameDataFoundError;
 	}
diff --git a/engines/pink/pink.h b/engines/pink/pink.h
index d9a39054e5b..d9b0e0a5ef8 100644
--- a/engines/pink/pink.h
+++ b/engines/pink/pink.h
@@ -86,6 +86,10 @@ enum {
 	kPinkDebugActions = 1 << 4
 };
 
+enum {
+	GF_COMPRESSED = 1 << 0,
+};
+
 extern Graphics::PaletteLookup *g_paletteLookup;
 
 class PinkEngine : public Engine {




More information about the Scummvm-git-logs mailing list