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

dreammaster paulfgilbert at gmail.com
Sun Jun 23 23:43:03 CEST 2019


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

Summary:
544c841343 GLK: ALAN2: Remove unused variable
b2b78f48f0 GLK: ALAN2: Fixes for restarting in-game
a53e00597b GLK: Show unknown variant dialog for unknown detection entries


Commit: 544c8413431369705ec0dd29733b1536a85fdd52
    https://github.com/scummvm/scummvm/commit/544c8413431369705ec0dd29733b1536a85fdd52
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2019-06-23T14:41:49-07:00

Commit Message:
GLK: ALAN2: Remove unused variable

Changed paths:
    engines/glk/alan2/alan_version.cpp


diff --git a/engines/glk/alan2/alan_version.cpp b/engines/glk/alan2/alan_version.cpp
index 5e88ba3..cce5a48 100644
--- a/engines/glk/alan2/alan_version.cpp
+++ b/engines/glk/alan2/alan_version.cpp
@@ -38,8 +38,5 @@ Product alan = {
 	{"2.8(6)", 2, 8, 6, 995034907, ""}
 };
 
-static char *alanId =
-    "@(#)RELEASE ";
-
 } // End of namespace Alan2
 } // End of namespace Glk


Commit: b2b78f48f0ef5de7253df428cd53115e4a88a84d
    https://github.com/scummvm/scummvm/commit/b2b78f48f0ef5de7253df428cd53115e4a88a84d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2019-06-23T14:41:49-07:00

Commit Message:
GLK: ALAN2: Fixes for restarting in-game

Changed paths:
    engines/glk/alan2/exe.cpp
    engines/glk/alan2/main.cpp


diff --git a/engines/glk/alan2/exe.cpp b/engines/glk/alan2/exe.cpp
index 2acd9d2..5ff79c8 100644
--- a/engines/glk/alan2/exe.cpp
+++ b/engines/glk/alan2/exe.cpp
@@ -178,13 +178,13 @@ void quit(CONTEXT) {
 			CALL1(terminate, 0)
 		}
 
-		if (strcmp(buf, "restart") == 0) {
+		if (scumm_stricmp(buf, "restart") == 0) {
 			g_vm->setRestart(true);
 			LONG_JUMP
-		} else if (strcmp(buf, "restore") == 0) {
+		} else if (scumm_stricmp(buf, "restore") == 0) {
 			restore();
 			LONG_JUMP
-		} else if (strcmp(buf, "quit") == 0) {
+		} else if (scumm_stricmp(buf, "quit") == 0) {
 			CALL1(terminate, 0)
 		}
 	}
diff --git a/engines/glk/alan2/main.cpp b/engines/glk/alan2/main.cpp
index e6d2226..1371ace 100644
--- a/engines/glk/alan2/main.cpp
+++ b/engines/glk/alan2/main.cpp
@@ -1422,7 +1422,7 @@ void run() {
 		init();
 
 		Context ctx;
-		while (!g_vm->shouldQuit()) {
+		while (!g_vm->shouldQuit() && !g_vm->shouldRestart()) {
 			if (!ctx._break) {
 				if (dbgflg)
 					debug();


Commit: a53e00597bdab2ffc1496f672010d9f51e69b991
    https://github.com/scummvm/scummvm/commit/a53e00597bdab2ffc1496f672010d9f51e69b991
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2019-06-23T14:41:49-07:00

Commit Message:
GLK: Show unknown variant dialog for unknown detection entries

Changed paths:
    engines/glk/advsys/detection.cpp
    engines/glk/alan2/detection.cpp
    engines/glk/frotz/detection.cpp
    engines/glk/glulxe/detection.cpp
    engines/glk/hugo/detection.cpp
    engines/glk/magnetic/detection.cpp
    engines/glk/scott/detection.cpp
    engines/glk/tads/detection.cpp


diff --git a/engines/glk/advsys/detection.cpp b/engines/glk/advsys/detection.cpp
index d3b376f..d6641a6 100644
--- a/engines/glk/advsys/detection.cpp
+++ b/engines/glk/advsys/detection.cpp
@@ -86,13 +86,15 @@ bool AdvSysMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &
 
 			gameList.push_back(gd);
 		} else {
-			if (gDebugLevel > 0) {
-				// Print an entry suitable for putting into the detection_tables.h
-				debug("ENTRY0(\"%s\", \"%s\", %u),", filename.c_str(), md5.c_str(), (uint)filesize);
-			}
-
 			const PlainGameDescriptor &desc = ADVSYS_GAME_LIST[0];
 			DetectedGame gd(desc.gameId, desc.description, Common::UNK_LANG, Common::kPlatformUnknown);
+			gd.canBeAdded = true;
+			gd.hasUnknownFiles = true;
+			FileProperties fp;
+			fp.md5 = md5;
+			fp.size = filesize;
+			gd.matchedFiles[file->getName()] = fp;
+
 			gameList.push_back(gd);
 		}
 	}
diff --git a/engines/glk/alan2/detection.cpp b/engines/glk/alan2/detection.cpp
index 0b146ad..2338ebb 100644
--- a/engines/glk/alan2/detection.cpp
+++ b/engines/glk/alan2/detection.cpp
@@ -73,18 +73,15 @@ bool Alan2MetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &g
 
 		DetectedGame gd;
 		if (!p->_gameId) {
-			if (gDebugLevel > 0) {
-				// Print an entry suitable for putting into the detection_tables.h, using the
-				// name of the parent folder the game is in as the presumed game Id
-				Common::String fname = filename;
-				const char *dot = strchr(fname.c_str(), '.');
-				if (dot)
-					fname = Common::String(fname.c_str(), dot);
-
-				debug("ENTRY0(\"%s\", \"%s\", %u),", fname.c_str(), md5.c_str(), (uint)filesize);
-			}
 			const PlainGameDescriptor &desc = ALAN2_GAME_LIST[0];
 			gd = DetectedGame(desc.gameId, desc.description, Common::UNK_LANG, Common::kPlatformUnknown);
+			gd.canBeAdded = true;
+			gd.hasUnknownFiles = true;
+			FileProperties fp;
+			fp.md5 = md5;
+			fp.size = filesize;
+			gd.matchedFiles[filename] = fp;
+
 		} else {
 			PlainGameDescriptor gameDesc = findGame(p->_gameId);
 			gd = DetectedGame(p->_gameId, gameDesc.description, Common::EN_ANY, Common::kPlatformUnknown);
diff --git a/engines/glk/frotz/detection.cpp b/engines/glk/frotz/detection.cpp
index 0c8a92b..4502fc6 100644
--- a/engines/glk/frotz/detection.cpp
+++ b/engines/glk/frotz/detection.cpp
@@ -120,22 +120,15 @@ bool FrotzMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &g
 			if (filename.hasSuffixIgnoreCase(".dat") || filename.hasSuffixIgnoreCase(".zip") || emptyBlorb)
 				continue;
 
-			if (gDebugLevel > 0) {
-				// Print an entry suitable for putting into the detection_tables.h, using the
-				// name of the parent folder the game is in as the presumed game Id
-				Common::String folderName = file->getParent().getName();
-				if (folderName.hasSuffix("\\"))
-					folderName.deleteLastChar();
-				Common::String fname = filename;
-				const char *dot = strchr(fname.c_str(), '.');
-				if (dot)
-					fname = Common::String(fname.c_str(), dot);
-
-				debug("ENTRY0(\"%s\", %s, \"%s\", %u),",
-					fname.c_str(), strlen(serial) ? serial : "nullptr", md5.c_str(), (uint)filesize);
-			}
 			const PlainGameDescriptor &desc = ZCODE_GAME_LIST[0];
 			gd = DetectedGame(desc.gameId, desc.description, Common::UNK_LANG, Common::kPlatformUnknown);
+			gd.canBeAdded = true;
+			gd.hasUnknownFiles = true;
+			FileProperties fp;
+			fp.md5 = md5;
+			fp.size = filesize;
+			gd.matchedFiles[filename] = fp;
+
 		} else {
 			GameDescriptor gameDesc = findGame(p->_gameId);
 			gd = DetectedGame(p->_gameId, gameDesc._description, p->_language, Common::kPlatformUnknown, p->_extra);
diff --git a/engines/glk/glulxe/detection.cpp b/engines/glk/glulxe/detection.cpp
index d75f1b7..5ee6285 100644
--- a/engines/glk/glulxe/detection.cpp
+++ b/engines/glk/glulxe/detection.cpp
@@ -81,21 +81,15 @@ bool GlulxeMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &
 
 		DetectedGame gd;
 		if (!p->_gameId) {
-			if (gDebugLevel > 0) {
-				// Print an entry suitable for putting into the detection_tables.h, using the
-				// name of the parent folder the game is in as the presumed game Id
-				Common::String folderName = file->getParent().getName();
-				if (folderName.hasSuffix("\\"))
-					folderName.deleteLastChar();
-				Common::String fname = filename;
-				const char *dot = strchr(fname.c_str(), '.');
-				if (dot)
-					fname = Common::String(fname.c_str(), dot);
-
-				debug("ENTRY0(\"%s\", \"%s\", %u),", fname.c_str(), md5.c_str(), (uint)filesize);
-			}
 			const PlainGameDescriptor &desc = GLULXE_GAME_LIST[0];
 			gd = DetectedGame(desc.gameId, desc.description, Common::UNK_LANG, Common::kPlatformUnknown);
+			gd.canBeAdded = true;
+			gd.hasUnknownFiles = true;
+			FileProperties fp;
+			fp.md5 = md5;
+			fp.size = filesize;
+			gd.matchedFiles[filename] = fp;
+
 		} else {
 			PlainGameDescriptor gameDesc = findGame(p->_gameId);
 			gd = DetectedGame(p->_gameId, gameDesc.description, p->_language, Common::kPlatformUnknown, p->_extra);
diff --git a/engines/glk/hugo/detection.cpp b/engines/glk/hugo/detection.cpp
index 299c837..daff460 100644
--- a/engines/glk/hugo/detection.cpp
+++ b/engines/glk/hugo/detection.cpp
@@ -76,13 +76,15 @@ bool HugoMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &ga
 
 		DetectedGame gd;
 		if (!p->_gameId) {
-			if (gDebugLevel > 0) {
-				// Print an entry suitable for putting into the detection_tables.h
-				debug("ENTRY0(\"%s\", \"%s\", %u),", filename.c_str(), md5.c_str(), (uint)filesize);
-			}
-
 			const PlainGameDescriptor &desc = HUGO_GAME_LIST[0];
 			gd = DetectedGame(desc.gameId, desc.description, Common::UNK_LANG, Common::kPlatformUnknown);
+			gd.canBeAdded = true;
+			gd.hasUnknownFiles = true;
+			FileProperties fp;
+			fp.md5 = md5;
+			fp.size = filesize;
+			gd.matchedFiles[filename] = fp;
+
 		} else {
 			PlainGameDescriptor gameDesc = findGame(p->_gameId);
 			gd = DetectedGame(p->_gameId, gameDesc.description, p->_language, Common::kPlatformUnknown, p->_extra);
diff --git a/engines/glk/magnetic/detection.cpp b/engines/glk/magnetic/detection.cpp
index 83d1143..1552eec 100644
--- a/engines/glk/magnetic/detection.cpp
+++ b/engines/glk/magnetic/detection.cpp
@@ -81,13 +81,15 @@ bool MagneticMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames
 
 		DetectedGame gd;
 		if (!p->_gameId) {
-			if (gDebugLevel > 0) {
-				// Print an entry suitable for putting into the detection_tables.h
-				debug("ENTRY0(\"%s\", \"%s\", %u),", filename.c_str(), md5.c_str(), (uint)filesize);
-			}
-
 			const PlainGameDescriptor &desc = MAGNETIC_GAME_LIST[0];
 			gd = DetectedGame(desc.gameId, desc.description, Common::UNK_LANG, Common::kPlatformUnknown);
+			gd.canBeAdded = true;
+			gd.hasUnknownFiles = true;
+			FileProperties fp;
+			fp.md5 = md5;
+			fp.size = filesize;
+			gd.matchedFiles[filename] = fp;
+
 		} else {
 			PlainGameDescriptor gameDesc = findGame(p->_gameId);
 			gd = DetectedGame(p->_gameId, gameDesc.description, p->_language, Common::kPlatformUnknown, p->_extra);
diff --git a/engines/glk/scott/detection.cpp b/engines/glk/scott/detection.cpp
index e2c9872..03445ea 100644
--- a/engines/glk/scott/detection.cpp
+++ b/engines/glk/scott/detection.cpp
@@ -77,14 +77,28 @@ bool ScottMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &g
 		while (p->_md5 && p->_filesize != filesize && md5 != p->_md5)
 			++p;
 
-		if (p->_filesize) {
+		DetectedGame gd;
+		if (!p->_gameId) {
+			if (!isBlorb && filename.hasSuffixIgnoreCase(".dat"))
+				continue;
+
+			const PlainGameDescriptor &desc = SCOTT_GAME_LIST[0];
+			gd = DetectedGame(desc.gameId, desc.description, Common::UNK_LANG, Common::kPlatformUnknown);
+			gd.canBeAdded = true;
+			gd.hasUnknownFiles = true;
+			FileProperties fp;
+			fp.md5 = md5;
+			fp.size = filesize;
+			gd.matchedFiles[filename] = fp;
+
+		} else {
 			// Found a match
 			PlainGameDescriptor gameDesc = findGame(p->_gameId);
 			DetectedGame gd(p->_gameId, gameDesc.description, Common::EN_ANY, Common::kPlatformUnknown);
 			gd.addExtraEntry("filename", file->getName());
-
-			gameList.push_back(gd);
 		}
+
+		gameList.push_back(gd);
 	}
 
 	return !gameList.empty();
diff --git a/engines/glk/tads/detection.cpp b/engines/glk/tads/detection.cpp
index 51a29d1..8ea996b 100644
--- a/engines/glk/tads/detection.cpp
+++ b/engines/glk/tads/detection.cpp
@@ -106,17 +106,15 @@ bool TADSMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &ga
 
 		DetectedGame gd;
 		if (!p->_gameId) {
-			if (gDebugLevel > 0) {
-				// Print an entry suitable for putting into the detection_tables.h
-				Common::String fname = filename;
-				const char *dot = strchr(fname.c_str(), '.');
-				if (dot)
-					fname = Common::String(fname.c_str(), dot);
-
-				debug("TADS%d ENTRY0(\"%s\", \"%s\", %u),", tadsVersion, fname.c_str(), md5.c_str(), (uint)filesize);
-			}
 			const GameDescriptor &desc = tadsVersion == 2 ? TADS2_GAME_LIST[0] : TADS3_GAME_LIST[0];
 			gd = DetectedGame(desc._gameId, desc._description, Common::UNK_LANG, Common::kPlatformUnknown);
+			gd.canBeAdded = true;
+			gd.hasUnknownFiles = true;
+			FileProperties fp;
+			fp.md5 = md5;
+			fp.size = filesize;
+			gd.matchedFiles[filename] = fp;
+
 		} else {
 			PlainGameDescriptor gameDesc = findGame(p->_gameId);
 			gd = DetectedGame(p->_gameId, gameDesc.description, p->_language, Common::kPlatformUnknown, p->_extra);





More information about the Scummvm-git-logs mailing list