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

NMIError 60350957+NMIError at users.noreply.github.com
Tue Oct 5 18:37:20 UTC 2021


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:
d6b0b78ae3 SAGA: Allow use of non-resource files for detection


Commit: d6b0b78ae3952449581a3029247f572ee3062e38
    https://github.com/scummvm/scummvm/commit/d6b0b78ae3952449581a3029247f572ee3062e38
Author: Coen Rampen (crampen at gmail.com)
Date: 2021-10-05T20:37:05+02:00

Commit Message:
SAGA: Allow use of non-resource files for detection

The engine expected all files listed in the detection entries to be resource
files. This commit adds the option to use a non-resource file for detection.
This is needed to use a MID file to detect one of the Windows versions of
Inherit the Earth.

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


diff --git a/engines/saga/detection_tables.h b/engines/saga/detection_tables.h
index c8cd85ad86..6a2983549c 100644
--- a/engines/saga/detection_tables.h
+++ b/engines/saga/detection_tables.h
@@ -515,7 +515,7 @@ static const SAGAGameDescription gameDescriptions[] = {
 			{
 				{"ite.rsc",		GAME_RESOURCEFILE,	"8f4315a9bb10ec839253108a032c8b54", 8928678},
 				{"scripts.rsc",	GAME_SCRIPTFILE,	"a891405405edefc69c9d6c420c868b84", -1},
-				{"cave.mid",	GAME_RESOURCEFILE,	"f7619359323058b61ec44fa8ce7888e5", 4441},
+				{"cave.mid",	0,					"f7619359323058b61ec44fa8ce7888e5", 4441},
 				AD_LISTEND
 			},
 			Common::EN_ANY,
diff --git a/engines/saga/resource.cpp b/engines/saga/resource.cpp
index 9f1ee723ae..49a697dbd4 100644
--- a/engines/saga/resource.cpp
+++ b/engines/saga/resource.cpp
@@ -169,7 +169,8 @@ bool Resource::createContexts() {
 
 	for (const ADGameFileDescription *gameFileDescription = _vm->getFilesDescriptions();
 		gameFileDescription->fileName; gameFileDescription++) {
-		addContext(gameFileDescription->fileName, gameFileDescription->fileType);
+		if (gameFileDescription->fileType > 0)
+			addContext(gameFileDescription->fileName, gameFileDescription->fileType);
 		if (gameFileDescription->fileType == GAME_SOUNDFILE) {
 			soundFileInArray = true;
 		}




More information about the Scummvm-git-logs mailing list