[Scummvm-git-logs] scummvm master -> ef45ef4b4906ed8bd89395d1447d80cbe2820b21

bluegr noreply at scummvm.org
Sat Jan 7 17:50:55 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:
ef45ef4b49 SAGA: Support ite demo 3 without unpacking it.


Commit: ef45ef4b4906ed8bd89395d1447d80cbe2820b21
    https://github.com/scummvm/scummvm/commit/ef45ef4b4906ed8bd89395d1447d80cbe2820b21
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-01-07T19:50:52+02:00

Commit Message:
SAGA: Support ite demo 3 without unpacking it.

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


diff --git a/engines/saga/detection_tables.h b/engines/saga/detection_tables.h
index 4e92a784ea5..2388f514e49 100644
--- a/engines/saga/detection_tables.h
+++ b/engines/saga/detection_tables.h
@@ -145,6 +145,34 @@ static const SAGAGameDescription gameDescriptions[] = {
 		{},
 	},
 
+	// Inherit the earth - Win32 Demo version 3, compressed
+	{
+		{
+			"ite",
+			"Win Demo 3",
+			{
+				{"itedemo.exe",		0,	"0a12e3ff2d511c2723acc4abc4480ee1", 31675904},
+				AD_LISTEND
+			},
+			Common::EN_ANY,
+			Common::kPlatformWindows,
+			ADGF_DEMO,
+			GUIO0()
+		},
+		GID_ITE,
+		GF_INSTALLER,
+		ITE_DEFAULT_SCENE,
+		RESOURCELIST_ITE,
+		FONTLIST_ITE_WIN_DEMO,
+		PATCHLIST_ITE_MAC, // Skip midi patches.
+		INTROLIST_ITE_DEFAULT,
+		{
+			{"ited.rsc",		GAME_RESOURCEFILE,	"3a450852cbf3c80773984d565647e6ac", 1951395},
+			{"scriptsd.rsc",	GAME_SCRIPTFILE,	"3f12b67fa93e56e1a6be39d2921d80bb", 70051},
+			AD_LISTEND
+		},
+	},
+
 
 	// Inherit the earth - Win32 Demo version 1
 	// Non-interactive demo
diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp
index dfbc309cee5..f49d8c6dd96 100644
--- a/engines/saga/saga.cpp
+++ b/engines/saga/saga.cpp
@@ -26,6 +26,7 @@
 #include "common/events.h"
 #include "common/translation.h"
 #include "common/compression/unarj.h"
+#include "common/compression/unzip.h"
 
 #include "audio/mixer.h"
 
@@ -352,10 +353,14 @@ Common::Error SagaEngine::run() {
 		for (const ADGameFileDescription *gameArchiveDescription = getArchivesDescriptions();
 		     gameArchiveDescription->fileName; gameArchiveDescription++)
 			filenames.push_back(gameArchiveDescription->fileName);
-		Common::Archive *arj = Common::makeArjArchive(filenames);
-		if (!arj)
-			error("Error opening ARJ archive");
-		SearchMan.add("arj", arj, DisposeAfterUse::YES);
+		Common::Archive *archive = nullptr;
+		if (filenames.size() == 1 && filenames[0].hasSuffix(".exe"))
+			archive = Common::makeZipArchive(filenames[0]);
+		else
+			archive = Common::makeArjArchive(filenames);
+		if (!archive)
+			error("Error opening archive");
+		SearchMan.add("archive", archive, DisposeAfterUse::YES);
 	}
 
 	// Assign default values to the config manager, in case settings are missing




More information about the Scummvm-git-logs mailing list