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

sdelamarre noreply at scummvm.org
Sun Oct 25 13:18:46 UTC 2026


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

Summary:
0f841fddc0 GOB: Fix the handling of the second file pattern in o7_setActiveCD
a9641bb5e1 GOB: Workaround to handle Adi4 multi-CD applications
acd3037c4f GOB: Fix a bug related to Adi4 application STK loading/unloading


Commit: 0f841fddc08d095268a3785087843bcfcbfeb5cd
    https://github.com/scummvm/scummvm/commit/0f841fddc08d095268a3785087843bcfcbfeb5cd
Author: Simon Delamarre (simon.delamarre14 at gmail.com)
Date: 2026-10-25T14:01:24+01:00

Commit Message:
GOB: Fix the handling of the second file pattern in o7_setActiveCD

Fixes some resources files not being found in Adi4/Anglais, which used
a common file pattern for CD1 and CD2 ("DESCA711.ADI") and a second
pattern to distinguish between the two CDs ("Disc1", "Disc2").

Changed paths:
    engines/gob/inter_v7.cpp


diff --git a/engines/gob/inter_v7.cpp b/engines/gob/inter_v7.cpp
index 0214acb738c..cf2424e7508 100644
--- a/engines/gob/inter_v7.cpp
+++ b/engines/gob/inter_v7.cpp
@@ -896,14 +896,23 @@ void Inter_v7::o7_playVmdOrMusic() {
 
 }
 void Inter_v7::o7_setActiveCD() {
-	Common::String str0 = _vm->_game->_script->evalString();
-	Common::String str1 = _vm->_game->_script->evalString();
+	// Search for a "CD" directory containing a file matching a pattern, and mark it as the current CD directory (if found).
+	Common::String filePattern1 = _vm->_game->_script->evalString();
+	Common::String filePattern2 = _vm->_game->_script->evalString();
 
 	Common::ArchiveMemberDetailsList files;
-	SearchMan.listMatchingMembers(files, Common::Path(str0, '\\'));
+	SearchMan.listMatchingMembers(files, Common::Path(filePattern1, '\\'));
 	Common::Path savedCDpath = _currentCDPath;
 
 	for (const auto &file : files) {
+		if (!filePattern2.empty()) {
+			// If a second pattern is given, the searched directory must also contain a file matching it.
+			Common::Archive *cdDirArchive = SearchMan.getArchive(file.arcName);
+			Common::ArchiveMemberList cdDirFiles;
+			if (!cdDirArchive || cdDirArchive->listMatchingMembers(cdDirFiles, Common::Path(filePattern2, '\\')) == 0)
+				continue;
+		}
+
 		if (setCurrentCDPath(file.arcName)) {
 			debugC(5, kDebugFileIO, "o7_setActiveCD: %s -> %s", savedCDpath.toString().c_str(),  _currentCDPath.toString().c_str());
 			storeValue(1);


Commit: a9641bb5e18d88e03c46556162e8efc3a4a0c308
    https://github.com/scummvm/scummvm/commit/a9641bb5e18d88e03c46556162e8efc3a4a0c308
Author: Simon Delamarre (simon.delamarre14 at gmail.com)
Date: 2026-10-25T14:01:24+01:00

Commit Message:
GOB: Workaround to handle Adi4 multi-CD applications

Changed paths:
    engines/gob/inter_v7.cpp


diff --git a/engines/gob/inter_v7.cpp b/engines/gob/inter_v7.cpp
index cf2424e7508..299d94988be 100644
--- a/engines/gob/inter_v7.cpp
+++ b/engines/gob/inter_v7.cpp
@@ -1937,6 +1937,17 @@ void Inter_v7::o7_checkData(OpFuncParams &params) {
 		size = _vm->_dataIO->fileSize(file);
 		if (size == -1)
 			warning("File \"%s\" not found", file.c_str());
+		else if (_vm->getGameType() == kGameTypeAdi4 && file.matchString("DISC?", true)) {
+			// WORKAROUND: In some Adi4 applications (e.g. "Anglais"), the script use a flag file "DISC1", "DISC2", etc. to check which disc is currently inserted.
+			// If the found file is in a directory other than the current CD path, pretend it is not there.
+			Common::ArchiveMemberDetailsList matchingFiles;
+			SearchMan.listMatchingMembers(matchingFiles, file.c_str());
+			if (!matchingFiles.empty() && !matchingFiles.front().arcName.equalsIgnoreCase(_currentCDPath.baseName())) {
+				debugC(2, kDebugFileIO, "o7_checkData: file \"%s\" is not in current CD path \"%s\", pretending it does not exist", file.c_str(), _currentCDPath.toString().c_str());
+				WRITE_VAR(16, -1);
+				return;
+			}
+		}
 
 	} else if (mode == SaveLoad::kSaveModeSave)
 		size = _vm->_saveLoad->getSize(file.c_str());


Commit: acd3037c4f7ed4333cc31037e55f87776b982a7e
    https://github.com/scummvm/scummvm/commit/acd3037c4f7ed4333cc31037e55f87776b982a7e
Author: Simon Delamarre (simon.delamarre14 at gmail.com)
Date: 2026-10-25T14:01:24+01:00

Commit Message:
GOB: Fix a bug related to Adi4 application STK loading/unloading

The Adi4 application STKs must be marked as "base" one, which protect
them from being closed by the o2_closeItk opcode.

Changed paths:
    engines/gob/inter_v7.cpp


diff --git a/engines/gob/inter_v7.cpp b/engines/gob/inter_v7.cpp
index 299d94988be..09e7d4ac1d4 100644
--- a/engines/gob/inter_v7.cpp
+++ b/engines/gob/inter_v7.cpp
@@ -2360,14 +2360,14 @@ void Inter_v7::o7_startAdi4Application(OpGobParams &params) {
 		warning("o7_startAdi4Application: c = 0 case stub");
 	} else {
 		Common::String appliStkFile = "ADI" + appliAbbreviation + ".STK";
-		_vm->_dataIO->openArchive(appliStkFile, false);
+		_vm->_dataIO->openArchive(appliStkFile, true);
 
 		Common::String appliIntroTotFile = appliAbbreviation + "INTRO";
 		_vm->_draw->_colorOffset = 10;
 		_vm->_game->totSub(1, appliIntroTotFile);
 		_vm->_draw->_colorOffset = 0;
 
-		_vm->_dataIO->closeArchive(false);
+		_vm->_dataIO->closeArchive(true);
 	}
 
 	_adi4CurrentSectionInAppChildData = 0;




More information about the Scummvm-git-logs mailing list