[Scummvm-git-logs] scummvm master -> 8132aaef17e0a4474dbf02c7c9d5758a17396282

sev- noreply at scummvm.org
Sat Jan 14 20:38:08 UTC 2023


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:
8132aaef17 SWORD2: Remove redundant flags from the detection entries


Commit: 8132aaef17e0a4474dbf02c7c9d5758a17396282
    https://github.com/scummvm/scummvm/commit/8132aaef17e0a4474dbf02c7c9d5758a17396282
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-01-14T21:37:55+01:00

Commit Message:
SWORD2: Remove redundant flags from the detection entries

Changed paths:
    engines/sword2/detection.cpp
    engines/sword2/detection.h
    engines/sword2/detection_tables.h
    engines/sword2/metaengine.cpp
    engines/sword2/resman.cpp
    engines/sword2/sound.cpp
    engines/sword2/sword2.cpp
    engines/sword2/sword2.h


diff --git a/engines/sword2/detection.cpp b/engines/sword2/detection.cpp
index 6587e1f6169..295cd88fc6f 100644
--- a/engines/sword2/detection.cpp
+++ b/engines/sword2/detection.cpp
@@ -43,7 +43,7 @@ static const char *const directoryGlobs[] = {
 
 class Sword2MetaEngineDetection : public AdvancedMetaEngineDetection {
 public:
-	Sword2MetaEngineDetection() : AdvancedMetaEngineDetection(Sword2::gameDescriptions, sizeof(Sword2::Sword2GameDescription), sword2Games) {
+	Sword2MetaEngineDetection() : AdvancedMetaEngineDetection(Sword2::gameDescriptions, sizeof(ADGameDescription), sword2Games) {
 		_guiOptions = GUIO3(GUIO_NOMIDI, GUIO_NOASPECT, GAMEOPTION_OBJECT_LABELS);
 		_maxScanDepth = 2;
 		_directoryGlobs = directoryGlobs;
diff --git a/engines/sword2/detection.h b/engines/sword2/detection.h
index 164dcff691a..dbef5ab34b3 100644
--- a/engines/sword2/detection.h
+++ b/engines/sword2/detection.h
@@ -29,14 +29,7 @@
 namespace Sword2 {
 
 enum {
-	GF_DEMO	       = 1 << 0,
-	GF_SPANISHDEMO = 1 << 1
-};
-
-struct Sword2GameDescription {
-	ADGameDescription desc;
-
-	uint32 features;
+	GF_SPANISHDEMO = 1 << 0
 };
 
 #define GAMEOPTION_OBJECT_LABELS GUIO_GAMEOPTIONS1
diff --git a/engines/sword2/detection_tables.h b/engines/sword2/detection_tables.h
index 907252d8ceb..ad8412a0fb3 100644
--- a/engines/sword2/detection_tables.h
+++ b/engines/sword2/detection_tables.h
@@ -23,370 +23,292 @@
 
 namespace Sword2 {
 
-static const Sword2GameDescription gameDescriptions[] = {
+static const ADGameDescription gameDescriptions[] = {
 	{
-		{
-			"sword2",
-			"Demo",
-			AD_ENTRY1s("general.clu", "11e824864a75195652610e8b397382a6", 8030769),
-			Common::EN_ANY,
-			Common::kPlatformWindows,
-			ADGF_DEMO,
-			GUIO0()
-		},
-		GF_DEMO
+		"sword2",
+		"Demo",
+		AD_ENTRY1s("general.clu", "11e824864a75195652610e8b397382a6", 8030769),
+		Common::EN_ANY,
+		Common::kPlatformWindows,
+		ADGF_DEMO,
+		GUIO0()
 	},
 
 	{
-		{
-			"sword2",
-			"PC Gamer Demo",
-			AD_ENTRY1s("general.clu", "522ecd261027f0b55315a32aaef97295", 4519015),
-			Common::EN_ANY,
-			Common::kPlatformWindows,
-			ADGF_DEMO,
-			GUIO0()
-		},
-		GF_DEMO
+		"sword2",
+		"PC Gamer Demo",
+		AD_ENTRY1s("general.clu", "522ecd261027f0b55315a32aaef97295", 4519015),
+		Common::EN_ANY,
+		Common::kPlatformWindows,
+		ADGF_DEMO,
+		GUIO0()
 	},
 
 	{
-		{
-			"sword2",
-			"Demo",
-			AD_ENTRY1s("players.clu", "5068815a62ba932afba7267bafc9786d", 9904289),
-			Common::ES_ESP,
-			Common::kPlatformWindows,
-			ADGF_DEMO,
-			GUIO0()
-		},
-		GF_DEMO | GF_SPANISHDEMO
+		"sword2",
+		"Demo",
+		AD_ENTRY1s("players.clu", "5068815a62ba932afba7267bafc9786d", 9904289),
+		Common::ES_ESP,
+		Common::kPlatformWindows,
+		ADGF_DEMO | GF_SPANISHDEMO,
+		GUIO0()
 	},
 
 	{
-		{
-			"sword2",
-			"Demo",
-			AD_ENTRY1s("players.clu", "e8786804d399310bda3fcbf897bc44f7", 3085812),
-			Common::EN_ANY,
-			Common::kPlatformPSX,
-			ADGF_DEMO,
-			GUIO0()
-		},
-		GF_DEMO
+		"sword2",
+		"Demo",
+		AD_ENTRY1s("players.clu", "e8786804d399310bda3fcbf897bc44f7", 3085812),
+		Common::EN_ANY,
+		Common::kPlatformPSX,
+		ADGF_DEMO,
+		GUIO0()
 	},
 
 	{
-		{
-			"sword2",
-			"",
-			AD_ENTRY3s("general.clu",  "31db8564f9187538f24d9fda0677f666", 7059728,
-			           "text.clu",     "9b344d976ca8d19a1cf5aa4413397f6b", 304968,
-			           "speech1.clu",  "a403904a0e825356107d228f8f74092e", 176260048),
-			Common::EN_ANY,
-			Common::kPlatformWindows,
-			ADGF_NO_FLAGS,
-			GUIO0()
-		},
-		0
+		"sword2",
+		"",
+		AD_ENTRY3s("general.clu",  "31db8564f9187538f24d9fda0677f666", 7059728,
+					"text.clu",     "9b344d976ca8d19a1cf5aa4413397f6b", 304968,
+					"speech1.clu",  "a403904a0e825356107d228f8f74092e", 176260048),
+		Common::EN_ANY,
+		Common::kPlatformWindows,
+		ADGF_NO_FLAGS,
+		GUIO0()
 	},
 
 	{
-		{
-			"sword2",
-			"1CD release",
-			AD_ENTRY2s("general.clu",  "31db8564f9187538f24d9fda0677f666", 7059728,
-			           "resource.tab", "ee4c0a8a2b8821ca113ea4176968b857", 16588),
-			Common::EN_ANY,
-			Common::kPlatformWindows,
-			ADGF_NO_FLAGS,
-			GUIO0()
-		},
-		0
+		"sword2",
+		"1CD release",
+		AD_ENTRY2s("general.clu",  "31db8564f9187538f24d9fda0677f666", 7059728,
+					"resource.tab", "ee4c0a8a2b8821ca113ea4176968b857", 16588),
+		Common::EN_ANY,
+		Common::kPlatformWindows,
+		ADGF_NO_FLAGS,
+		GUIO0()
 	},
 
 	{
-		{
-			"sword2",
-			"EU",
-			AD_ENTRY3s("general.clu", "31db8564f9187538f24d9fda0677f666", 7059728,
-			           "text.clu",    "9b344d976ca8d19a1cf5aa4413397f6b", 304968,
-			           "speech1.clg", "d49a5f3683b734d1129cbf6a0f95ae83", 57935499),
-			Common::EN_ANY,
-			Common::kPlatformWindows,
-			ADGF_NO_FLAGS,
-			GUIO0()
-		},
-		0
+		"sword2",
+		"EU",
+		AD_ENTRY3s("general.clu", "31db8564f9187538f24d9fda0677f666", 7059728,
+					"text.clu",    "9b344d976ca8d19a1cf5aa4413397f6b", 304968,
+					"speech1.clg", "d49a5f3683b734d1129cbf6a0f95ae83", 57935499),
+		Common::EN_ANY,
+		Common::kPlatformWindows,
+		ADGF_NO_FLAGS,
+		GUIO0()
 	},
 
 	{
-		{
-			"sword2",
-			"",
-			AD_ENTRY2s("general.clu", "31db8564f9187538f24d9fda0677f666", 7059728,
-			           "text.clu",    "d0cafb4d2982613ca4cf0574a0e4e079", 418165),
-			Common::FR_FRA,
-			Common::kPlatformWindows,
-			ADGF_NO_FLAGS,
-			GUIO0()
-		},
-		0
+		"sword2",
+		"",
+		AD_ENTRY2s("general.clu", "31db8564f9187538f24d9fda0677f666", 7059728,
+					"text.clu",    "d0cafb4d2982613ca4cf0574a0e4e079", 418165),
+		Common::FR_FRA,
+		Common::kPlatformWindows,
+		ADGF_NO_FLAGS,
+		GUIO0()
 	},
 
 	{
-		{
-			"sword2",
-			"",
-			AD_ENTRY2s("general.clu", "31db8564f9187538f24d9fda0677f666", 7059728,
-			           "text.clu",    "5771f52410745029d7f71af05072d3d6", 556961),
-			Common::DE_DEU,
-			Common::kPlatformWindows,
-			ADGF_NO_FLAGS,
-			GUIO0()
-		},
-		0
+		"sword2",
+		"",
+		AD_ENTRY2s("general.clu", "31db8564f9187538f24d9fda0677f666", 7059728,
+					"text.clu",    "5771f52410745029d7f71af05072d3d6", 556961),
+		Common::DE_DEU,
+		Common::kPlatformWindows,
+		ADGF_NO_FLAGS,
+		GUIO0()
 	},
 
 	{
-		{
-			"sword2",
-			"",
-			AD_ENTRY2s("general.clu", "31db8564f9187538f24d9fda0677f666", 7059728,
-			           "text.clu",    "56c1197e72249473538c30c912607d01", 418165),
-			Common::ES_ESP,
-			Common::kPlatformWindows,
-			ADGF_NO_FLAGS,
-			GUIO0()
-		},
-		0
+		"sword2",
+		"",
+		AD_ENTRY2s("general.clu", "31db8564f9187538f24d9fda0677f666", 7059728,
+					"text.clu",    "56c1197e72249473538c30c912607d01", 418165),
+		Common::ES_ESP,
+		Common::kPlatformWindows,
+		ADGF_NO_FLAGS,
+		GUIO0()
 	},
 
 	{
-		{
-			"sword2",
-			"",
-			AD_ENTRY2s("general.clu", "31db8564f9187538f24d9fda0677f666", 7059728,
-			           "text.clu",    "c141e9903e4a1f45252dd1500498b6e2", 488745),
-			Common::IT_ITA,
-			Common::kPlatformWindows,
-			ADGF_NO_FLAGS,
-			GUIO0()
-		},
-		0
+		"sword2",
+		"",
+		AD_ENTRY2s("general.clu", "31db8564f9187538f24d9fda0677f666", 7059728,
+					"text.clu",    "c141e9903e4a1f45252dd1500498b6e2", 488745),
+		Common::IT_ITA,
+		Common::kPlatformWindows,
+		ADGF_NO_FLAGS,
+		GUIO0()
 	},
 
 	{
-		{
-			"sword2",
-			"English speech",
-			AD_ENTRY2s("general.clu", "31db8564f9187538f24d9fda0677f666", 7059728,
-			           "text.clu",    "bc45e00cfb737ad61fada3ca6b1b2bfc", 279042),
-			Common::CS_CZE,
-			Common::kPlatformWindows,
-			ADGF_NO_FLAGS,
-			GUIO0()
-		},
-		0
+		"sword2",
+		"English speech",
+		AD_ENTRY2s("general.clu", "31db8564f9187538f24d9fda0677f666", 7059728,
+					"text.clu",    "bc45e00cfb737ad61fada3ca6b1b2bfc", 279042),
+		Common::CS_CZE,
+		Common::kPlatformWindows,
+		ADGF_NO_FLAGS,
+		GUIO0()
 	},
 
 	{
-		{
-			"sword2",
-			"English speech",
-			AD_ENTRY2s("general.clu", "11e824864a75195652610e8b397382a6", 8030769,
-			           "text.clu",    "9867bb6dfc850bfa165812f0827a5508", 454229),
-			Common::FI_FIN,
-			Common::kPlatformWindows,
-			ADGF_NO_FLAGS,
-			GUIO0()
-		},
-		0
+		"sword2",
+		"English speech",
+		AD_ENTRY2s("general.clu", "11e824864a75195652610e8b397382a6", 8030769,
+					"text.clu",    "9867bb6dfc850bfa165812f0827a5508", 454229),
+		Common::FI_FIN,
+		Common::kPlatformWindows,
+		ADGF_NO_FLAGS,
+		GUIO0()
 	},
 
 	{
-		{
-			"sword2",
-			"Fanmade/English speech/V1",
-			AD_ENTRY2s("general.clu", "31db8564f9187538f24d9fda0677f666", 7059728,
-			           "text.clu",    "93ea23ccf78dc746ed9a027fcf66d58d", 248692),
-			Common::HE_ISR,
-			Common::kPlatformWindows,
-			ADGF_NO_FLAGS,
-			GUIO0()
-		},
-		0
+		"sword2",
+		"Fanmade/English speech/V1",
+		AD_ENTRY2s("general.clu", "31db8564f9187538f24d9fda0677f666", 7059728,
+					"text.clu",    "93ea23ccf78dc746ed9a027fcf66d58d", 248692),
+		Common::HE_ISR,
+		Common::kPlatformWindows,
+		ADGF_NO_FLAGS,
+		GUIO0()
 	},
 
 	{
-		{
-			"sword2",
-			"Fanmade/English speech/V2",
-			AD_ENTRY2s("general.clu", "31db8564f9187538f24d9fda0677f666", 7059728,
-			           "text.clu",    "b5442676e958309bf1a4817dd3893aab", 248702),
-			Common::HE_ISR,
-			Common::kPlatformWindows,
-			ADGF_NO_FLAGS,
-			GUIO0()
-		},
-		0
+		"sword2",
+		"Fanmade/English speech/V2",
+		AD_ENTRY2s("general.clu", "31db8564f9187538f24d9fda0677f666", 7059728,
+					"text.clu",    "b5442676e958309bf1a4817dd3893aab", 248702),
+		Common::HE_ISR,
+		Common::kPlatformWindows,
+		ADGF_NO_FLAGS,
+		GUIO0()
 	},
 
 	{
-		{
-			"sword2",
-			"English speech",
-			AD_ENTRY2s("general.clu", "31db8564f9187538f24d9fda0677f666", 7059728,
-			           "text.clu",    "82714fa70516486174cddc2754958cd4", 304968),
-			Common::HU_HUN,
-			Common::kPlatformWindows,
-			ADGF_NO_FLAGS,
-			GUIO0()
-		},
-		0
+		"sword2",
+		"English speech",
+		AD_ENTRY2s("general.clu", "31db8564f9187538f24d9fda0677f666", 7059728,
+					"text.clu",    "82714fa70516486174cddc2754958cd4", 304968),
+		Common::HU_HUN,
+		Common::kPlatformWindows,
+		ADGF_NO_FLAGS,
+		GUIO0()
 	},
 
 	{
-		{
-			"sword2",
-			"English speech",
-			AD_ENTRY2s("general.clu", "11e824864a75195652610e8b397382a6", 8030769,
-			           "text.clu",    "f1cf2aaa7e56d8bf6572c9b25267931e", 373704),
-			Common::PL_POL,
-			Common::kPlatformWindows,
-			ADGF_NO_FLAGS,
-			GUIO0()
-		},
-		0
+		"sword2",
+		"English speech",
+		AD_ENTRY2s("general.clu", "11e824864a75195652610e8b397382a6", 8030769,
+					"text.clu",    "f1cf2aaa7e56d8bf6572c9b25267931e", 373704),
+		Common::PL_POL,
+		Common::kPlatformWindows,
+		ADGF_NO_FLAGS,
+		GUIO0()
 	},
 
 	{
-		{
-			"sword2",
-			"English speech",
-			AD_ENTRY2s("general.clu", "31db8564f9187538f24d9fda0677f666", 7059728,
-			           "text.clu",    "cda6306bedfa63ac4386ff82977bfcd6", 410949),
-			Common::PT_BRA,
-			Common::kPlatformWindows,
-			ADGF_NO_FLAGS,
-			GUIO0()
-		},
-		0
+		"sword2",
+		"English speech",
+		AD_ENTRY2s("general.clu", "31db8564f9187538f24d9fda0677f666", 7059728,
+					"text.clu",    "cda6306bedfa63ac4386ff82977bfcd6", 410949),
+		Common::PT_BRA,
+		Common::kPlatformWindows,
+		ADGF_NO_FLAGS,
+		GUIO0()
 	},
 
 	{
-		{
-			"sword2",
-			"Fargus",
-			AD_ENTRY2s("general.clu", "98e43a4fd93227b1d5d44e664eeede0c", 7320908,
-			           "text.clu",    "33a2645498ef1f4e63c4f6a50da4a3e2", 288998),
-			Common::RU_RUS,
-			Common::kPlatformWindows,
-			ADGF_NO_FLAGS,
-			GUIO0()
-		},
-		0
+		"sword2",
+		"Fargus",
+		AD_ENTRY2s("general.clu", "98e43a4fd93227b1d5d44e664eeede0c", 7320908,
+					"text.clu",    "33a2645498ef1f4e63c4f6a50da4a3e2", 288998),
+		Common::RU_RUS,
+		Common::kPlatformWindows,
+		ADGF_NO_FLAGS,
+		GUIO0()
 	},
 
 	{
-		{
-			"sword2",
-			"Mediahauz/English speech",
-			AD_ENTRY2s("general.clu", "31db8564f9187538f24d9fda0677f666", 7059728,
-			           "text.clu",    "e85c148037b8bfc02c968d4d22fda5e1", 315178),
-			Common::RU_RUS,
-			Common::kPlatformWindows,
-			ADGF_NO_FLAGS,
-			GUIO0()
-		},
-		0
+		"sword2",
+		"Mediahauz/English speech",
+		AD_ENTRY2s("general.clu", "31db8564f9187538f24d9fda0677f666", 7059728,
+					"text.clu",    "e85c148037b8bfc02c968d4d22fda5e1", 315178),
+		Common::RU_RUS,
+		Common::kPlatformWindows,
+		ADGF_NO_FLAGS,
+		GUIO0()
 	},
 
 	{
-		{
-			"sword2",
-			"",
-			AD_ENTRY2s("general.clu", "7ef0353ca03338d59b4f4e3d01a38df1", 2095780,
-			           "text.clu",    "06691fc9f749f3f7ad0f622fbfe79467", 302756),
-			Common::EN_USA,
-			Common::kPlatformPSX,
-			ADGF_NO_FLAGS,
-			GUIO0()
-		},
-		0
+		"sword2",
+		"",
+		AD_ENTRY2s("general.clu", "7ef0353ca03338d59b4f4e3d01a38df1", 2095780,
+					"text.clu",    "06691fc9f749f3f7ad0f622fbfe79467", 302756),
+		Common::EN_USA,
+		Common::kPlatformPSX,
+		ADGF_NO_FLAGS,
+		GUIO0()
 	},
 
 	{
-		{
-			"sword2",
-			"",
-			AD_ENTRY2s("general.clu", "7ef0353ca03338d59b4f4e3d01a38df1", 2095780,
-			           "text.clu",    "be8ad3f1d9d3ddd8881169b16aa23970", 838392),
-			Common::EN_GRB,
-			Common::kPlatformPSX,
-			ADGF_NO_FLAGS,
-			GUIO0()
-		},
-		0
+		"sword2",
+		"",
+		AD_ENTRY2s("general.clu", "7ef0353ca03338d59b4f4e3d01a38df1", 2095780,
+					"text.clu",    "be8ad3f1d9d3ddd8881169b16aa23970", 838392),
+		Common::EN_GRB,
+		Common::kPlatformPSX,
+		ADGF_NO_FLAGS,
+		GUIO0()
 	},
 
 	{
-		{
-			"sword2",
-			"",
-			AD_ENTRY2s("general.clu", "7ef0353ca03338d59b4f4e3d01a38df1", 2095780,
-			           "text.clu",    "0920f1aec8bc9d02f8c94f73965c8006", 327668),
-			Common::FR_FRA,
-			Common::kPlatformPSX,
-			ADGF_NO_FLAGS,
-			GUIO0()
-		},
-		0
+		"sword2",
+		"",
+		AD_ENTRY2s("general.clu", "7ef0353ca03338d59b4f4e3d01a38df1", 2095780,
+					"text.clu",    "0920f1aec8bc9d02f8c94f73965c8006", 327668),
+		Common::FR_FRA,
+		Common::kPlatformPSX,
+		ADGF_NO_FLAGS,
+		GUIO0()
 	},
 
 	{
-		{
-			"sword2",
-			"",
-			AD_ENTRY2s("general.clu", "7ef0353ca03338d59b4f4e3d01a38df1", 2095780,
-			           "text.clu",    "5ce53dfc154b80d4ca64b60df808e411", 347456),
-			Common::DE_DEU,
-			Common::kPlatformPSX,
-			ADGF_NO_FLAGS,
-			GUIO0()
-		},
-		0
+		"sword2",
+		"",
+		AD_ENTRY2s("general.clu", "7ef0353ca03338d59b4f4e3d01a38df1", 2095780,
+					"text.clu",    "5ce53dfc154b80d4ca64b60df808e411", 347456),
+		Common::DE_DEU,
+		Common::kPlatformPSX,
+		ADGF_NO_FLAGS,
+		GUIO0()
 	},
 
 	{
-		{
-			"sword2",
-			"",
-			AD_ENTRY2s("general.clu", "7ef0353ca03338d59b4f4e3d01a38df1", 2095780,
-			           "text.clu",    "03ffcd1eec48f74a3d16d1b7751cee0b", 316124),
-			Common::ES_ESP,
-			Common::kPlatformPSX,
-			ADGF_NO_FLAGS,
-			GUIO0()
-		},
-		0
+		"sword2",
+		"",
+		AD_ENTRY2s("general.clu", "7ef0353ca03338d59b4f4e3d01a38df1", 2095780,
+					"text.clu",    "03ffcd1eec48f74a3d16d1b7751cee0b", 316124),
+		Common::ES_ESP,
+		Common::kPlatformPSX,
+		ADGF_NO_FLAGS,
+		GUIO0()
 	},
 
 	{
-		{
-			"sword2",
-			"",
-			AD_ENTRY2s("general.clu", "7ef0353ca03338d59b4f4e3d01a38df1", 2095780,
-			           "text.clu",    "298bd6eef464780bf6b0830805eef220", 334784),
-			Common::IT_ITA,
-			Common::kPlatformPSX,
-			ADGF_NO_FLAGS,
-			GUIO0()
-		},
-		0
+		"sword2",
+		"",
+		AD_ENTRY2s("general.clu", "7ef0353ca03338d59b4f4e3d01a38df1", 2095780,
+					"text.clu",    "298bd6eef464780bf6b0830805eef220", 334784),
+		Common::IT_ITA,
+		Common::kPlatformPSX,
+		ADGF_NO_FLAGS,
+		GUIO0()
 	},
 
-	{ AD_TABLE_END_MARKER, 0 }
+	AD_TABLE_END_MARKER
 };
 
 } // End of namespace Sword2
diff --git a/engines/sword2/metaengine.cpp b/engines/sword2/metaengine.cpp
index 3add0fb6744..91194b96e8e 100644
--- a/engines/sword2/metaengine.cpp
+++ b/engines/sword2/metaengine.cpp
@@ -135,8 +135,7 @@ void Sword2MetaEngine::removeSaveState(const char *target, int slot) const {
 }
 
 Common::Error Sword2MetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
-	const Sword2::Sword2GameDescription *gd = (const Sword2::Sword2GameDescription *)desc;
-	*engine = new Sword2::Sword2Engine(syst, gd);
+	*engine = new Sword2::Sword2Engine(syst, desc);
 	return Common::kNoError;
 }
 
diff --git a/engines/sword2/resman.cpp b/engines/sword2/resman.cpp
index c4116a3fb36..d117feae5ee 100644
--- a/engines/sword2/resman.cpp
+++ b/engines/sword2/resman.cpp
@@ -453,7 +453,7 @@ Common::File *ResourceManager::openCluFile(uint16 fileNum) {
 		// playing a demo, then we're in trouble if the file
 		// can't be found!
 
-		if ((_vm->_features & GF_DEMO) || _resFiles[fileNum].cd == 0)
+		if ((_vm->_features & ADGF_DEMO) || _resFiles[fileNum].cd == 0)
 			error("Could not find '%s'", _resFiles[fileNum].fileName);
 
 		askForCD(_resFiles[fileNum].cd);
diff --git a/engines/sword2/sound.cpp b/engines/sword2/sound.cpp
index 91ae3ffe413..823ffc14201 100644
--- a/engines/sword2/sound.cpp
+++ b/engines/sword2/sound.cpp
@@ -298,7 +298,7 @@ void Sound::queueFx(int32 res, int32 type, int32 delay, int32 volume, int32 pan)
 			// Check that we really have a WAV file here, alas this
 			// check is useless with psx demo game, because psx audio files
 			// are headerless and there is no way to check the type
-			if (!(Sword2Engine::isPsx() && (_vm->_features & GF_DEMO)))
+			if (!(Sword2Engine::isPsx() && (_vm->_features & ADGF_DEMO)))
 				assert(_vm->_resman->fetchType(data) == WAV_FILE);
 
 			uint32 len = _vm->_resman->fetchLen(res);
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp
index bdf0e5eb86c..8942b6769db 100644
--- a/engines/sword2/sword2.cpp
+++ b/engines/sword2/sword2.cpp
@@ -49,7 +49,7 @@ namespace Sword2 {
 
 Common::Platform Sword2Engine::_platform;
 
-Sword2Engine::Sword2Engine(OSystem *syst, const Sword2GameDescription *gameDesc) : Engine(syst), _rnd("sword2") {
+Sword2Engine::Sword2Engine(OSystem *syst, const ADGameDescription *gameDesc) : Engine(syst), _rnd("sword2") {
 	// Add default file directories
 	const Common::FSNode gameDataDir(ConfMan.get("path"));
 	SearchMan.addSubDirectoryMatching(gameDataDir, "clusters");
@@ -58,8 +58,8 @@ Sword2Engine::Sword2Engine(OSystem *syst, const Sword2GameDescription *gameDesc)
 	SearchMan.addSubDirectoryMatching(gameDataDir, "smacks");
 	SearchMan.addSubDirectoryMatching(gameDataDir, "streams"); // PSX video
 
-	_features = gameDesc->features;
-	Sword2Engine::_platform = gameDesc->desc.platform;
+	_features = gameDesc->flags;
+	Sword2Engine::_platform = gameDesc->platform;
 
 	_bootParam = ConfMan.getInt("boot_param");
 	_saveSlot = ConfMan.getInt("save_slot");
@@ -216,7 +216,7 @@ Common::Error Sword2Engine::run() {
 	setupPersistentResources();
 	initializeFontResourceFlags();
 
-	if (_features & GF_DEMO)
+	if (_features & ADGF_DEMO)
 		_logic->writeVar(DEMO, 1);
 	else
 		_logic->writeVar(DEMO, 0);
diff --git a/engines/sword2/sword2.h b/engines/sword2/sword2.h
index 9a97b1391a4..cd2cf6b72a2 100644
--- a/engines/sword2/sword2.h
+++ b/engines/sword2/sword2.h
@@ -146,7 +146,7 @@ protected:
 	void pauseEngineIntern(bool pause) override;
 
 public:
-	Sword2Engine(OSystem *syst, const Sword2GameDescription *gameDesc);
+	Sword2Engine(OSystem *syst, const ADGameDescription *gameDesc);
 	~Sword2Engine() override;
 
 	int getFramesPerSecond();




More information about the Scummvm-git-logs mailing list