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

sev- sev at scummvm.org
Sat Nov 28 19:57:26 UTC 2020


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

Summary:
a8ad61ca58 ENGINES: Do not pass string by reference to errorUnsupportedGame()
a4df6c48b7 GROOVIE: Always detect GroovieV2 games but bail out on their run
b0af00a7b8 KYRA: Always detect subengine games but error out on attempt to run
594eadd182 MOHAWK: Translate messages about non-supported subengines
0a9e83106b GROOVIE: Clarify user-visible warning
370c695308 SAGA: Always detect subengine games
e385e1159c WINTERMUTE: Show warning to user on attempt to run disabled subengine game
77d2d3d061 GROOVIE: Do not hide gameids for skipped subengines
f38243f5fb KYRA: Do not hide target ids for disabled subengines


Commit: a8ad61ca58548db68b87acb41e278cda1ca2b68c
    https://github.com/scummvm/scummvm/commit/a8ad61ca58548db68b87acb41e278cda1ca2b68c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-11-28T20:57:02+01:00

Commit Message:
ENGINES: Do not pass string by reference to errorUnsupportedGame()

This allows to use translated strings directly

Changed paths:
    engines/engine.cpp
    engines/engine.h


diff --git a/engines/engine.cpp b/engines/engine.cpp
index 1e4543ea4a..096e4997dd 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -655,7 +655,7 @@ bool Engine::warnUserAboutUnsupportedGame() {
 	return true;
 }
 
-void Engine::errorUnsupportedGame(Common::String &extraMsg) {
+void Engine::errorUnsupportedGame(Common::String extraMsg) {
 	Common::String message = extraMsg.empty() ? _("This game is not supported.") : _("This game is not supported for the following reason:\n\n");
 	message += _(extraMsg);
 	message += "\n\n";
diff --git a/engines/engine.h b/engines/engine.h
index 8d82b592d9..4dc63c1de6 100644
--- a/engines/engine.h
+++ b/engines/engine.h
@@ -432,9 +432,9 @@ public:
 	 * Display an error message to the user that the game is not supported.
 	 *
 	 * @param extraMsg    This will be appended to the default message.
-	 *						
+	 *
 	 */
-	static void errorUnsupportedGame(Common::String &extraMsg);
+	static void errorUnsupportedGame(Common::String extraMsg);
 
 	/**
 	 * Get the total play time.


Commit: a4df6c48b7fbb6742dd04af14af6314f2c4a9497
    https://github.com/scummvm/scummvm/commit/a4df6c48b7fbb6742dd04af14af6314f2c4a9497
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-11-28T20:57:02+01:00

Commit Message:
GROOVIE: Always detect GroovieV2 games but bail out on their run

Changed paths:
    engines/groovie/POTFILES
    engines/groovie/detection.cpp
    engines/groovie/metaengine.cpp


diff --git a/engines/groovie/POTFILES b/engines/groovie/POTFILES
index 0bf4528a7d..64f7e479d2 100644
--- a/engines/groovie/POTFILES
+++ b/engines/groovie/POTFILES
@@ -1,2 +1,3 @@
 engines/groovie/detection.cpp
+engines/groovie/metaengine.cpp
 engines/groovie/script.cpp
diff --git a/engines/groovie/detection.cpp b/engines/groovie/detection.cpp
index ecd9161f2f..ffbb01ab06 100644
--- a/engines/groovie/detection.cpp
+++ b/engines/groovie/detection.cpp
@@ -125,7 +125,6 @@ static const GroovieGameDescription gameDescriptions[] = {
 		kGroovieT7G, 0
 	},
 
-#ifdef ENABLE_GROOVIE2
 	// The 11th Hour DOS English
 	{
 		{
@@ -285,7 +284,6 @@ static const GroovieGameDescription gameDescriptions[] = {
 		},
 		kGroovieV2, 1
 	},
-#endif
 
 	{AD_TABLE_END_MARKER, kGroovieT7G, 0}
 };
diff --git a/engines/groovie/metaengine.cpp b/engines/groovie/metaengine.cpp
index ad457c0d54..6f8a240272 100644
--- a/engines/groovie/metaengine.cpp
+++ b/engines/groovie/metaengine.cpp
@@ -24,6 +24,7 @@
 #include "groovie/saveload.h"
 
 #include "common/system.h"
+#include "common/translation.h"
 
 #include "engines/advancedDetector.h"
 #include "groovie/detection.h"
@@ -47,6 +48,13 @@ public:
 
 bool GroovieMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *gd) const {
 	if (gd) {
+#ifndef ENABLE_GROOVIE2
+		if (((const GroovieGameDescription *)gd)->version == kGroovieV2) {
+			Engine::errorUnsupportedGame(_("GroovieV2 support is not compiled in"));
+			return false;
+		}
+#endif
+
 		*engine = new GroovieEngine(syst, (const GroovieGameDescription *)gd);
 	}
 	return gd != 0;


Commit: b0af00a7b822d53d20b6ffe218fc99964fc333bc
    https://github.com/scummvm/scummvm/commit/b0af00a7b822d53d20b6ffe218fc99964fc333bc
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-11-28T20:57:02+01:00

Commit Message:
KYRA: Always detect subengine games but error out on attempt to run

Changed paths:
    engines/kyra/POTFILES
    engines/kyra/detection_tables.h
    engines/kyra/metaengine.cpp


diff --git a/engines/kyra/POTFILES b/engines/kyra/POTFILES
index f30bd15e3c..bde948ef85 100644
--- a/engines/kyra/POTFILES
+++ b/engines/kyra/POTFILES
@@ -1,5 +1,6 @@
 engines/kyra/detection.cpp
 engines/kyra/detection_tables.h
+engines/kyra/metaengine.cpp
 engines/kyra/engine/eobcommon.cpp
 engines/kyra/engine/lol.cpp
 engines/kyra/gui/saveload_eob.cpp
diff --git a/engines/kyra/detection_tables.h b/engines/kyra/detection_tables.h
index 6a2f7e3457..79127fe8ec 100644
--- a/engines/kyra/detection_tables.h
+++ b/engines/kyra/detection_tables.h
@@ -1040,7 +1040,6 @@ const KYRAGameDescription adGameDescs[] = {
 		KYRA3_CD_FAN_FLAGS(Common::RU_RUS, Common::DE_DEU)
 	},
 
-#ifdef ENABLE_LOL
 	// Lands of Lore CD
 	{
 		{
@@ -1559,8 +1558,6 @@ const KYRAGameDescription adGameDescs[] = {
 		},
 		LOL_DEMO_FLAGS
 	},
-#endif // ENABLE_LOL
-#ifdef ENABLE_EOB
 
 	{
 		{
@@ -1743,7 +1740,6 @@ const KYRAGameDescription adGameDescs[] = {
 		},
 		EOB2_FLAGS
 	},
-#endif // ENABLE_EOB
 
 	{ AD_TABLE_END_MARKER, FLAGS(0, 0, 0, 0, 0, 0, 0, 0, 0, 0) }
 };
diff --git a/engines/kyra/metaengine.cpp b/engines/kyra/metaengine.cpp
index 2b2885c679..d719f3d01e 100644
--- a/engines/kyra/metaengine.cpp
+++ b/engines/kyra/metaengine.cpp
@@ -30,6 +30,7 @@
 #include "common/config-manager.h"
 #include "common/system.h"
 #include "common/savefile.h"
+#include "common/translation.h"
 
 #include "engines/advancedDetector.h"
 
@@ -108,11 +109,14 @@ bool KyraMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGame
 	case Kyra::GI_KYRA3:
 		*engine = new Kyra::KyraEngine_MR(syst, flags);
 		break;
-#ifdef ENABLE_LOL
 	case Kyra::GI_LOL:
+#ifdef ENABLE_LOL
 		*engine = new Kyra::LoLEngine(syst, flags);
-		break;
+#else
+		Engine::errorUnsupportedGame(_("Lands of Lore support is not compiled in"));
+		res = false;
 #endif // ENABLE_LOL
+		break;
 #ifdef ENABLE_EOB
 	case Kyra::GI_EOB1:
 		*engine = new Kyra::EoBEngine(syst, flags);
@@ -120,10 +124,19 @@ bool KyraMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGame
 	case Kyra::GI_EOB2:
 		 if (Common::parseRenderMode(ConfMan.get("render_mode")) == Common::kRenderEGA)
 			 flags.useHiRes = true;
-		 if (platform == Common::kPlatformFMTowns && !flags.useHiColorMode)
-			 error("EOB II FM-TOWNS requires support of 16bit color modes which has not been activated in your ScummVM build (The 'USE_RGB_COLOR' define has not been set).");
+		 if (platform == Common::kPlatformFMTowns && !flags.useHiColorMode) {
+			 Engine::errorUnsupportedGame(_("EOB II FM-TOWNS requires support of 16bit color modes which has not been activated in your ScummVM build"));
+			 res = false;
+			 break;
+		 }
 		*engine = new Kyra::DarkMoonEngine(syst, flags);
 		break;
+#else
+	case Kyra::GI_EOB1:
+	case Kyra::GI_EOB2:
+		Engine::errorUnsupportedGame(_("Eye of Beholder support is not compiled in"));
+		res = false;
+		break;
 #endif // ENABLE_EOB
 	default:
 		res = false;


Commit: 594eadd18264bdbe33f302c7de77128573f773b6
    https://github.com/scummvm/scummvm/commit/594eadd18264bdbe33f302c7de77128573f773b6
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-11-28T20:57:02+01:00

Commit Message:
MOHAWK: Translate messages about non-supported subengines

Changed paths:
    engines/mohawk/POTFILES
    engines/mohawk/metaengine.cpp


diff --git a/engines/mohawk/POTFILES b/engines/mohawk/POTFILES
index 8d99a6dc0d..97aa6ca256 100644
--- a/engines/mohawk/POTFILES
+++ b/engines/mohawk/POTFILES
@@ -1,6 +1,7 @@
 engines/mohawk/detection.cpp
 engines/mohawk/dialogs.cpp
 engines/mohawk/mohawk.cpp
+engines/mohawk/metaengine.cpp
 engines/mohawk/myst.cpp
 engines/mohawk/myst_stacks/menu.cpp
 engines/mohawk/myst_stacks/preview.cpp
diff --git a/engines/mohawk/metaengine.cpp b/engines/mohawk/metaengine.cpp
index 2ab8cdabe2..9f5684f42a 100644
--- a/engines/mohawk/metaengine.cpp
+++ b/engines/mohawk/metaengine.cpp
@@ -25,6 +25,7 @@
 
 #include "common/savefile.h"
 #include "common/system.h"
+#include "common/translation.h"
 
 #include "engines/advancedDetector.h"
 
@@ -268,14 +269,14 @@ bool MohawkMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGa
 #ifdef ENABLE_MYST
 #ifndef ENABLE_MYSTME
 			if (gd->features & Mohawk::GF_ME) {
-				warning("Myst ME support not compiled in");
+				Engine::errorUnsupportedGame(_("Myst ME support not compiled in"));
 				return false;
 			}
 #endif
 			*engine = new Mohawk::MohawkEngine_Myst(syst, gd);
 			break;
 #else
-			warning("Myst support not compiled in");
+			Engine::errorUnsupportedGame(_("Myst support not compiled in"));
 			return false;
 #endif
 		case Mohawk::GType_RIVEN:
@@ -283,7 +284,7 @@ bool MohawkMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGa
 			*engine = new Mohawk::MohawkEngine_Riven(syst, gd);
 			break;
 #else
-			warning("Riven support not compiled in");
+			Engine::errorUnsupportedGame(_("Riven support not compiled in"));
 			return false;
 #endif
 		case Mohawk::GType_LIVINGBOOKSV1:
@@ -298,7 +299,7 @@ bool MohawkMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGa
 			*engine = new Mohawk::MohawkEngine_CSTime(syst, gd);
 			break;
 #else
-			warning("CSTime support not compiled in");
+			Engine::errorUnsupportedGame(_("CSTime support not compiled in"));
 			return false;
 #endif
 		default:


Commit: 0a9e83106b32bf48c437eb9fb1bbe9187093b983
    https://github.com/scummvm/scummvm/commit/0a9e83106b32bf48c437eb9fb1bbe9187093b983
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-11-28T20:57:02+01:00

Commit Message:
GROOVIE: Clarify user-visible warning

Changed paths:
    engines/groovie/metaengine.cpp


diff --git a/engines/groovie/metaengine.cpp b/engines/groovie/metaengine.cpp
index 6f8a240272..7a69adc732 100644
--- a/engines/groovie/metaengine.cpp
+++ b/engines/groovie/metaengine.cpp
@@ -50,7 +50,7 @@ bool GroovieMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADG
 	if (gd) {
 #ifndef ENABLE_GROOVIE2
 		if (((const GroovieGameDescription *)gd)->version == kGroovieV2) {
-			Engine::errorUnsupportedGame(_("GroovieV2 support is not compiled in"));
+			Engine::errorUnsupportedGame(_("11h Hour support is not compiled in"));
 			return false;
 		}
 #endif


Commit: 370c695308636140534e485700f2d20b1b9471be
    https://github.com/scummvm/scummvm/commit/370c695308636140534e485700f2d20b1b9471be
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-11-28T20:57:02+01:00

Commit Message:
SAGA: Always detect subengine games

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


diff --git a/engines/saga/POTFILES b/engines/saga/POTFILES
index b5670b07aa..4411e0c306 100644
--- a/engines/saga/POTFILES
+++ b/engines/saga/POTFILES
@@ -1,2 +1,3 @@
 engines/saga/detection_tables.h
+engines/saga/metaengine.cpp
 engines/saga/saga.cpp
diff --git a/engines/saga/detection_tables.h b/engines/saga/detection_tables.h
index 3b16c85c30..abf856964e 100644
--- a/engines/saga/detection_tables.h
+++ b/engines/saga/detection_tables.h
@@ -751,7 +751,6 @@ static const SAGAGameDescription gameDescriptions[] = {
 
 	// TODO: Add the Amiga versions here (not supported yet)
 
-#ifdef ENABLE_IHNM
 	// IHNM Section ///////////////////////////////////////////////////////////////////////////////////////////
 
 	// I Have No Mouth And I Must Scream - Demo version
@@ -1044,9 +1043,6 @@ static const SAGAGameDescription gameDescriptions[] = {
 		IHNMCD_GameFonts,
 		NULL,
 	},
-#endif
-
-#ifdef ENABLE_SAGA2
 
 	// Dinotopia Section //////////////////////////////////////////////////////////////////////////////////////
 	{
@@ -1106,8 +1102,6 @@ static const SAGAGameDescription gameDescriptions[] = {
 		NULL,
 	},
 
-#endif
-
 	{ AD_TABLE_END_MARKER, 0, 0, 0, NULL, 0, NULL, NULL }
 };
 
diff --git a/engines/saga/metaengine.cpp b/engines/saga/metaengine.cpp
index 0e6244d510..87428e20a7 100644
--- a/engines/saga/metaengine.cpp
+++ b/engines/saga/metaengine.cpp
@@ -29,6 +29,7 @@
 #include "common/config-manager.h"
 #include "engines/advancedDetector.h"
 #include "common/system.h"
+#include "common/translation.h"
 #include "graphics/thumbnail.h"
 
 #include "saga/animation.h"
@@ -109,6 +110,25 @@ bool Saga::SagaEngine::hasFeature(EngineFeature f) const {
 
 bool SagaMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
 	const Saga::SAGAGameDescription *gd = (const Saga::SAGAGameDescription *)desc;
+
+	switch (gd->gameId) {
+	case Saga::GID_IHNM:
+#ifndef ENABLE_IHNM
+		Engine::errorUnsupportedGame(_("I Have No Mouth support not compiled in"));
+		return false;
+#endif
+		break;
+	case Saga::GID_DINO:
+	case Saga::GID_FTA2:
+#ifndef ENABLE_SAGA2
+		Engine::errorUnsupportedGame(_("SAGA2 support not compiled in"));
+		return false;
+#endif
+		break;
+	default:
+		break;
+	}
+
 	if (gd) {
 		*engine = new Saga::SagaEngine(syst, gd);
 	}


Commit: e385e1159c066e541e6f1360031f53b69d6f0bec
    https://github.com/scummvm/scummvm/commit/e385e1159c066e541e6f1360031f53b69d6f0bec
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-11-28T20:57:02+01:00

Commit Message:
WINTERMUTE: Show warning to user on attempt to run disabled subengine game

Changed paths:
    engines/wintermute/POTFILES
    engines/wintermute/metaengine.cpp


diff --git a/engines/wintermute/POTFILES b/engines/wintermute/POTFILES
index bf8833fed4..506282eab0 100644
--- a/engines/wintermute/POTFILES
+++ b/engines/wintermute/POTFILES
@@ -1,3 +1,4 @@
 engines/wintermute/detection.cpp
+engines/wintermute/metaengine.cpp
 engines/wintermute/wintermute.cpp
 engines/wintermute/keymapper_tables.h
diff --git a/engines/wintermute/metaengine.cpp b/engines/wintermute/metaengine.cpp
index 533d4b88f9..07504b9d9f 100644
--- a/engines/wintermute/metaengine.cpp
+++ b/engines/wintermute/metaengine.cpp
@@ -61,6 +61,28 @@ public:
 		assert(syst);
 		assert(engine);
 		const WMEGameDescription *gd = (const WMEGameDescription *)desc;
+
+#ifndef ENABLE_FOXTAIL
+		if (gd->targetExecutable >= FOXTAIL_OLDEST_VERSION && gd->targetExecutable <= FOXTAIL_LATEST_VERSION) {
+			Engine::errorUnsupportedGame(_("FoxTail support is not compiled in"));
+			return false;
+		}
+#endif
+
+#ifndef ENABLE_HEROCRAFT
+		if (gd->targetExecutable == WME_HEROCRAFT) {
+			Engine::errorUnsupportedGame(_("Hero Craft support is not compiled in"));
+			return false;
+		}
+#endif
+
+#ifndef ENABLE_WME3D
+		if (gd->adDesc.flags & GF_3D) {
+			Engine::errorUnsupportedGame(_("Wintermute3D support is not compiled in"));
+			return false;
+		}
+#endif
+
 		*engine = new Wintermute::WintermuteEngine(syst, gd);
 		return true;
 	}


Commit: 77d2d3d061d2ae4bfa40a9fc54f0c98bbb3a135c
    https://github.com/scummvm/scummvm/commit/77d2d3d061d2ae4bfa40a9fc54f0c98bbb3a135c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-11-28T20:57:02+01:00

Commit Message:
GROOVIE: Do not hide gameids for skipped subengines

Changed paths:
    engines/groovie/detection.cpp
    engines/groovie/metaengine.cpp


diff --git a/engines/groovie/detection.cpp b/engines/groovie/detection.cpp
index ffbb01ab06..ea6b2ad5f5 100644
--- a/engines/groovie/detection.cpp
+++ b/engines/groovie/detection.cpp
@@ -33,13 +33,10 @@ namespace Groovie {
 static const PlainGameDescriptor groovieGames[] = {
 	// Games
 	{"t7g", "The 7th Guest"},
-
-#ifdef ENABLE_GROOVIE2
 	{"11h", "The 11th Hour: The Sequel to The 7th Guest"},
 	{"clandestiny", "Clandestiny"},
 	{"unclehenry", "Uncle Henry's Playhouse"},
 	{"tlc", "Tender Loving Care"},
-#endif
 
 	{0, 0}
 };
diff --git a/engines/groovie/metaengine.cpp b/engines/groovie/metaengine.cpp
index 7a69adc732..6f8a240272 100644
--- a/engines/groovie/metaengine.cpp
+++ b/engines/groovie/metaengine.cpp
@@ -50,7 +50,7 @@ bool GroovieMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADG
 	if (gd) {
 #ifndef ENABLE_GROOVIE2
 		if (((const GroovieGameDescription *)gd)->version == kGroovieV2) {
-			Engine::errorUnsupportedGame(_("11h Hour support is not compiled in"));
+			Engine::errorUnsupportedGame(_("GroovieV2 support is not compiled in"));
 			return false;
 		}
 #endif


Commit: f38243f5fb316b16b90a4104c89e78a115d871f4
    https://github.com/scummvm/scummvm/commit/f38243f5fb316b16b90a4104c89e78a115d871f4
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-11-28T20:57:02+01:00

Commit Message:
KYRA: Do not hide target ids for disabled subengines

Changed paths:
    engines/kyra/detection.cpp
    engines/kyra/detection_tables.h


diff --git a/engines/kyra/detection.cpp b/engines/kyra/detection.cpp
index 3e9d1674e5..29b0e7d657 100644
--- a/engines/kyra/detection.cpp
+++ b/engines/kyra/detection.cpp
@@ -71,7 +71,6 @@ const ADExtraGuiOptionsMap gameGuiOptions[] = {
 		}
 	},
 
-#ifdef ENABLE_LOL
 	// LoL options
 
 	{
@@ -110,9 +109,7 @@ const ADExtraGuiOptionsMap gameGuiOptions[] = {
 			false
 		}
 	},
-#endif
 
-#ifdef ENABLE_EOB
 	// EoB options
 
 	{
@@ -137,8 +134,6 @@ const ADExtraGuiOptionsMap gameGuiOptions[] = {
 		}
 	},
 
-#endif
-
 	AD_EXTRA_GUI_OPTIONS_TERMINATOR
 };
 
diff --git a/engines/kyra/detection_tables.h b/engines/kyra/detection_tables.h
index 79127fe8ec..feee4ce2df 100644
--- a/engines/kyra/detection_tables.h
+++ b/engines/kyra/detection_tables.h
@@ -1748,13 +1748,9 @@ const PlainGameDescriptor gameList[] = {
 	{ "kyra1", "The Legend of Kyrandia" },
 	{ "kyra2", "The Legend of Kyrandia: The Hand of Fate" },
 	{ "kyra3", "The Legend of Kyrandia: Malcolm's Revenge" },
-#ifdef ENABLE_LOL
 	{ "lol", "Lands of Lore: The Throne of Chaos" },
-#endif // ENABLE_LOL
-#ifdef ENABLE_EOB
 	{ "eob", "Eye of the Beholder" },
 	{ "eob2", "Eye of the Beholder II: The Legend of Darkmoon" },
-#endif // ENABLE_EOB
 	{ 0, 0 }
 };
 




More information about the Scummvm-git-logs mailing list