[Scummvm-git-logs] scummvm master -> d8aca2185f82d56fbc2effac1d11b56f4ed0a995
sev-
noreply at scummvm.org
Sun Jan 1 00:33:41 UTC 2023
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:
d8aca2185f PETKA: Add support for compressed Red Comrades 1-2 (#4581)
Commit: d8aca2185f82d56fbc2effac1d11b56f4ed0a995
https://github.com/scummvm/scummvm/commit/d8aca2185f82d56fbc2effac1d11b56f4ed0a995
Author: Walter Agazzi (walter.agazzi at protonmail.com)
Date: 2023-01-01T01:33:37+01:00
Commit Message:
PETKA: Add support for compressed Red Comrades 1-2 (#4581)
PETKA: Add support for compressed Red Comrades 1-2
Changed paths:
engines/petka/detection_tables.h
engines/petka/petka.cpp
engines/petka/petka.h
diff --git a/engines/petka/detection_tables.h b/engines/petka/detection_tables.h
index 10d8f899308..3755c0d87d1 100644
--- a/engines/petka/detection_tables.h
+++ b/engines/petka/detection_tables.h
@@ -36,7 +36,6 @@ static const ADGameDescription gameDescriptions[] = {
Common::kPlatformWindows,
ADGF_DROPPLATFORM | ADGF_DROPLANGUAGE | ADGF_DEMO,
GUIO1(GUIO_NOMIDI)
-
},
// Red Comrades 1: Save the Galaxy
@@ -48,7 +47,18 @@ static const ADGameDescription gameDescriptions[] = {
Common::kPlatformWindows,
ADGF_DROPPLATFORM | ADGF_DROPLANGUAGE,
GUIO1(GUIO_NOMIDI)
+ },
+ // Red Comrades 1: Save the Galaxy (3 CD)
+ {
+ "petka1",
+ "Compressed",
+ AD_ENTRY2s("BGS1.STR", "99832accda859e2e1daeaae0a8561aeb", 20280804,
+ "data1.cab", "7e73a644d8b15d2fd3781de5edce0c18", 228838940),
+ Common::RU_RUS,
+ Common::kPlatformWindows,
+ ADGF_DROPPLATFORM | ADGF_DROPLANGUAGE | GF_COMPRESSED,
+ GUIO1(GUIO_NOMIDI)
},
// Red Comrades 2: For the Great Justice
@@ -62,6 +72,18 @@ static const ADGameDescription gameDescriptions[] = {
GUIO1(GUIO_NOMIDI)
},
+ // Red Comrades 2: For the Great Justice (CD)
+ {
+ "petka2",
+ "Compressed",
+ AD_ENTRY2s("main.str", "4e515669c343609518277cab6e7d8c8f", 18992879,
+ "data1.cab", "ac9ee2e481ee5a6389a6cd58faf5a358", 23287376),
+ Common::RU_RUS,
+ Common::kPlatformWindows,
+ ADGF_DROPPLATFORM | ADGF_DROPLANGUAGE | GF_COMPRESSED,
+ GUIO1(GUIO_NOMIDI)
+ },
+
AD_TABLE_END_MARKER
};
diff --git a/engines/petka/petka.cpp b/engines/petka/petka.cpp
index 3569eea99ec..14a901aa215 100644
--- a/engines/petka/petka.cpp
+++ b/engines/petka/petka.cpp
@@ -27,6 +27,7 @@
#include "common/formats/ini-file.h"
#include "common/system.h"
#include "common/file.h"
+#include "common/compression/installshield_cab.h"
#include "engines/advancedDetector.h"
#include "engines/util.h"
@@ -75,6 +76,12 @@ Common::Error PetkaEngine::run() {
initGraphics(640, 480, &format);
syncSoundSettings();
+ if (_desc->flags & GF_COMPRESSED) {
+ Common::Archive *cabinet = Common::makeInstallShieldArchive("data");
+ if (cabinet)
+ SearchMan.add("data1.cab", cabinet);
+ }
+
const char *const videos[] = {"buka.avi", "skif.avi", "adv.avi"};
for (uint i = 0; i < sizeof(videos) / sizeof(char *); ++i) {
Common::ScopedPtr<Common::File> file(new Common::File);
diff --git a/engines/petka/petka.h b/engines/petka/petka.h
index 0dae7899223..592e5e6c303 100644
--- a/engines/petka/petka.h
+++ b/engines/petka/petka.h
@@ -76,6 +76,10 @@ enum {
kPetkaDebugDialogs = 1 << 3
};
+enum {
+ GF_COMPRESSED = (1 << 0),
+};
+
class PetkaEngine : public Engine {
public:
PetkaEngine(OSystem *syst, const ADGameDescription *desc);
More information about the Scummvm-git-logs
mailing list