[Scummvm-git-logs] scummvm master -> 8dc074a4fd8c3e1332f12f22d902b30d8d7a3299

sdelamarre noreply at scummvm.org
Tue Oct 21 20:29:02 UTC 2025


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

Summary:
1c550714c2 GOB: Add o7_resolvePath opcode (Adi4)
2871695d10 GOB: Add stub for o7_copyDataToClipboard opcode (Adi4)
a581656144 GOB: Add stub for "start external program" command in o6_totSub
8dc074a4fd GOB: Add a missing WRITE_VAR(27) in o1_manageDataFile() opcode (Adi4)


Commit: 1c550714c2db1a284d9da0b9eda41ec8284ff789
    https://github.com/scummvm/scummvm/commit/1c550714c2db1a284d9da0b9eda41ec8284ff789
Author: Simon Delamarre (simon.delamarre14 at gmail.com)
Date: 2025-10-21T22:28:37+02:00

Commit Message:
GOB: Add o7_resolvePath opcode (Adi4)

Changed paths:
    engines/gob/inter.h
    engines/gob/inter_v7.cpp


diff --git a/engines/gob/inter.h b/engines/gob/inter.h
index 5bfdd82167c..e29d5d21fc5 100644
--- a/engines/gob/inter.h
+++ b/engines/gob/inter.h
@@ -806,6 +806,7 @@ protected:
 
 	void o7_xorDeobfuscate(OpGobParams &params);
 	void o7_xorObfuscate(OpGobParams &params);
+	void o7_resolvePath(OpGobParams &params);
 	void o7_ansiToOEM(OpGobParams &params);
 	void o7_oemToANSI(OpGobParams &params);
 	void o7_setDBStringEncoding(OpGobParams &params);
diff --git a/engines/gob/inter_v7.cpp b/engines/gob/inter_v7.cpp
index bccce93700e..44bee2f5368 100644
--- a/engines/gob/inter_v7.cpp
+++ b/engines/gob/inter_v7.cpp
@@ -160,6 +160,7 @@ void Inter_v7::setupOpcodesGob() {
 	OPCODEGOB(406, o7_startAdi4Application);
 	OPCODEGOB(407, o7_xorDeobfuscate);
 	OPCODEGOB(408, o7_xorObfuscate);
+	OPCODEGOB(410, o7_resolvePath);
 	OPCODEGOB(420, o7_ansiToOEM);
 	OPCODEGOB(421, o7_oemToANSI);
 	OPCODEGOB(512, o7_setDBStringEncoding);
@@ -2272,6 +2273,21 @@ void Inter_v7::o7_xorObfuscate(OpGobParams &params) {
 	xorObfuscate(data, size);
 }
 
+void Inter_v7::o7_resolvePath(OpGobParams &params) {
+	uint16 srcVarIndex = _vm->_game->_script->readUint16();
+	uint16 destVarIndex = _vm->_game->_script->readUint16();
+	char *str = GET_VAR_STR(srcVarIndex);
+	Common::String resolvedPath = getFile(str);
+	if ((int)resolvedPath.size() > 4 * _vm->_global->_inter_animDataSize) {
+		warning("o7_resolvePath: resolved path too long (%d > max length = %d), truncating",
+				(int)resolvedPath.size(),
+				4 * _vm->_global->_inter_animDataSize);
+		resolvedPath = resolvedPath.substr(0, 4 * _vm->_global->_inter_animDataSize);
+	}
+
+	WRITE_VAR_STR(destVarIndex, resolvedPath.c_str());
+}
+
 void Inter_v7::o7_ansiToOEM(OpGobParams &params) {
 	uint16 varIndex = _vm->_game->_script->readUint16();
 	char *str = GET_VAR_STR(varIndex);


Commit: 2871695d10078222e7fdd6c83294052f291c33f4
    https://github.com/scummvm/scummvm/commit/2871695d10078222e7fdd6c83294052f291c33f4
Author: Simon Delamarre (simon.delamarre14 at gmail.com)
Date: 2025-10-21T22:28:37+02:00

Commit Message:
GOB: Add stub for o7_copyDataToClipboard opcode (Adi4)

Changed paths:
    engines/gob/inter.h
    engines/gob/inter_v7.cpp


diff --git a/engines/gob/inter.h b/engines/gob/inter.h
index e29d5d21fc5..50d2fc01212 100644
--- a/engines/gob/inter.h
+++ b/engines/gob/inter.h
@@ -731,6 +731,7 @@ protected:
 	void o7_getFileInfo();
 	void o7_getSystemProperty();
 	void o7_loadImage();
+	void o7_copyDataToClipboard();
 	void o7_setVolume();
 	void o7_zeroVar();
 	void o7_draw0xA0();
diff --git a/engines/gob/inter_v7.cpp b/engines/gob/inter_v7.cpp
index 44bee2f5368..939655dc161 100644
--- a/engines/gob/inter_v7.cpp
+++ b/engines/gob/inter_v7.cpp
@@ -88,6 +88,7 @@ void Inter_v7::setupOpcodesDraw() {
 	OPCODEDRAW(0x8C, o7_getSystemProperty);
 	OPCODEDRAW(0x8E, o7_getFileInfo);
 	OPCODEDRAW(0x90, o7_loadImage);
+	OPCODEDRAW(0x91, o7_copyDataToClipboard);
 	OPCODEDRAW(0x93, o7_setVolume);
 	OPCODEDRAW(0x95, o7_zeroVar);
 	OPCODEDRAW(0xA0, o7_draw0xA0);
@@ -1026,6 +1027,11 @@ void Inter_v7::o7_loadImage() {
 	}
 }
 
+void Inter_v7::o7_copyDataToClipboard() {
+	Common::String data = _vm->_game->_script->evalString();
+	warning("STUB: Adi4: Copy data '%s' to clipboard", data.c_str());
+}
+
 void Inter_v7::o7_setVolume() {
 	uint32 volume = _vm->_game->_script->readValExpr();
 


Commit: a5816561444fa28486da1991e9711a23af95a27f
    https://github.com/scummvm/scummvm/commit/a5816561444fa28486da1991e9711a23af95a27f
Author: Simon Delamarre (simon.delamarre14 at gmail.com)
Date: 2025-10-21T22:28:37+02:00

Commit Message:
GOB: Add stub for "start external program" command in o6_totSub

Changed paths:
    engines/gob/inter_v6.cpp


diff --git a/engines/gob/inter_v6.cpp b/engines/gob/inter_v6.cpp
index a62c00bdb3b..971e6fc2417 100644
--- a/engines/gob/inter_v6.cpp
+++ b/engines/gob/inter_v6.cpp
@@ -84,10 +84,11 @@ void Inter_v6::o6_totSub() {
 			totFile += _vm->_game->_script->readChar();
 
 	uint8 flags = _vm->_game->_script->readByte();
-	if (flags & 0x40)
-		warning("Urban Stub: o6_totSub(), flags & 0x40");
-
-	_vm->_game->totSub(flags, totFile);
+	if (flags & 0x40) {
+		warning("STUB: o6_totSub(), flags & 0x40: starting external program: %s (flags = %X)", totFile.c_str(), flags);
+	} else {
+		_vm->_game->totSub(flags, totFile);
+	}
 }
 
 void Inter_v6::o6_playVmdOrMusic() {


Commit: 8dc074a4fd8c3e1332f12f22d902b30d8d7a3299
    https://github.com/scummvm/scummvm/commit/8dc074a4fd8c3e1332f12f22d902b30d8d7a3299
Author: Simon Delamarre (simon.delamarre14 at gmail.com)
Date: 2025-10-21T22:28:37+02:00

Commit Message:
GOB: Add a missing WRITE_VAR(27) in o1_manageDataFile() opcode (Adi4)

Changed paths:
    engines/gob/inter.h
    engines/gob/inter_v7.cpp


diff --git a/engines/gob/inter.h b/engines/gob/inter.h
index 50d2fc01212..804effe46ea 100644
--- a/engines/gob/inter.h
+++ b/engines/gob/inter.h
@@ -787,6 +787,7 @@ protected:
 	void o7_checkData(OpFuncParams &params);
 	void o7_readData(OpFuncParams &params);
 	void o7_writeData(OpFuncParams &params);
+	void o7_manageDataFile(OpFuncParams &params);
 
 	bool readAdi4InfDataForChild(Common::Array<byte> &dest, uint32 childNumber, uint32 offset, uint32 size);
 	bool readAdi4InstalledAppsData(Common::Array<byte> &generalChildData,
diff --git a/engines/gob/inter_v7.cpp b/engines/gob/inter_v7.cpp
index 939655dc161..6cacabc077e 100644
--- a/engines/gob/inter_v7.cpp
+++ b/engines/gob/inter_v7.cpp
@@ -148,6 +148,7 @@ void Inter_v7::setupOpcodesFunc() {
 	OPCODEFUNC(0x3F, o7_checkData);
 	OPCODEFUNC(0x4D, o7_readData);
 	OPCODEFUNC(0x4E, o7_writeData);
+	OPCODEFUNC(0x4F, o7_manageDataFile);
 }
 
 void Inter_v7::setupOpcodesGob() {
@@ -1956,6 +1957,21 @@ void Inter_v7::o7_writeData(OpFuncParams &params) {
 		warning("Attempted to write to file \"%s\"", file.c_str());
 }
 
+void Inter_v7::o7_manageDataFile(OpFuncParams &params) {
+	Common::String file = _vm->_game->_script->evalString();
+
+	if (!file.empty()) {
+		bool result = _vm->_dataIO->openArchive(Common::Path(file, '\\').toString('/'), true);
+		WRITE_VAR(27, result);
+	} else {
+		_vm->_dataIO->closeArchive(true);
+
+		// NOTE: Lost in Time might close a data file without explicitely closing a video in it.
+		//       So we make sure that all open videos are still available.
+		_vm->_vidPlayer->reopenAll();
+	}
+}
+
 Common::String Inter_v7::ansiToOEM(Common::String string) {
 	Common::U32String u32String = string.decode(Common::kWindows1252);
 	// Replace characters that do not exist in the target codepage with the closest match




More information about the Scummvm-git-logs mailing list