[Scummvm-cvs-logs] scummvm master -> d4a354c17f811faa916bf548a11a88cb51c3b7b2

bluegr md5 at scummvm.org
Sun Jul 15 13:56:04 CEST 2012


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

Summary:
bd09eb0655 TINSEL: Reorder the detection entries to split the DW1 and DW2 entries
d4a354c17f TINSEL: Remove the GF_CD and GF_FLOPPY flags


Commit: bd09eb06557514b4e68e6dc915cd71976af677bb
    https://github.com/scummvm/scummvm/commit/bd09eb06557514b4e68e6dc915cd71976af677bb
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2012-07-15T04:41:27-07:00

Commit Message:
TINSEL: Reorder the detection entries to split the DW1 and DW2 entries

Changed paths:
    engines/tinsel/detection_tables.h



diff --git a/engines/tinsel/detection_tables.h b/engines/tinsel/detection_tables.h
index dc3b5f1..23d8d22 100644
--- a/engines/tinsel/detection_tables.h
+++ b/engines/tinsel/detection_tables.h
@@ -535,26 +535,6 @@ static const TinselGameDescription gameDescriptions[] = {
 		TINSEL_V1,
 	},
 
-	{	// English DW2 demo
-		{
-			"dw2",
-			"Demo",
-			{
-				{"dw2.scn", 0, "853ab998f5136b69bc586991175d6eeb", 4231121},
-				{"english.smp", 0, "b5660a0e031cb4710bcb0ef5629ea61d", 28562357},
-				{NULL, 0, NULL, 0}
-			},
-			Common::EN_ANY,
-			Common::kPlatformPC,
-			ADGF_DEMO,
-			GUIO1(GUIO_NOASPECT)
-		},
-		GID_DW2,
-		0,
-		GF_CD | GF_SCNFILES,
-		TINSEL_V2,
-	},
-
 	{	// Polish fan translaction Discworld 1
 		{
 			"dw",
@@ -576,6 +556,26 @@ static const TinselGameDescription gameDescriptions[] = {
 		TINSEL_V1,
 	},
 
+	{	// English Discworld 2 demo
+		{
+			"dw2",
+			"Demo",
+			{
+				{"dw2.scn", 0, "853ab998f5136b69bc586991175d6eeb", 4231121},
+				{"english.smp", 0, "b5660a0e031cb4710bcb0ef5629ea61d", 28562357},
+				{NULL, 0, NULL, 0}
+			},
+			Common::EN_ANY,
+			Common::kPlatformPC,
+			ADGF_DEMO,
+			GUIO1(GUIO_NOASPECT)
+		},
+		GID_DW2,
+		0,
+		GF_CD | GF_SCNFILES,
+		TINSEL_V2,
+	},
+
 	{	// European/Australian Discworld 2 release
 		{
 			"dw2",


Commit: d4a354c17f811faa916bf548a11a88cb51c3b7b2
    https://github.com/scummvm/scummvm/commit/d4a354c17f811faa916bf548a11a88cb51c3b7b2
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2012-07-15T04:55:06-07:00

Commit Message:
TINSEL: Remove the GF_CD and GF_FLOPPY flags

Changed paths:
    engines/tinsel/detection.cpp
    engines/tinsel/detection_tables.h
    engines/tinsel/sound.cpp
    engines/tinsel/tinsel.h



diff --git a/engines/tinsel/detection.cpp b/engines/tinsel/detection.cpp
index 6d20f8b..2e4be33 100644
--- a/engines/tinsel/detection.cpp
+++ b/engines/tinsel/detection.cpp
@@ -67,6 +67,10 @@ bool TinselEngine::getIsADGFDemo() const {
 	return (bool)(_gameDescription->desc.flags & ADGF_DEMO);
 }
 
+bool TinselEngine::isCD() const {
+	return (bool)(_gameDescription->desc.flags & ADGF_CD);
+}
+
 } // End of namespace Tinsel
 
 static const PlainGameDescriptor tinselGames[] = {
diff --git a/engines/tinsel/detection_tables.h b/engines/tinsel/detection_tables.h
index 23d8d22..5f305f0 100644
--- a/engines/tinsel/detection_tables.h
+++ b/engines/tinsel/detection_tables.h
@@ -61,12 +61,12 @@ static const TinselGameDescription gameDescriptions[] = {
 			},
 			Common::EN_ANY,
 			Common::kPlatformPC,
-			ADGF_DEMO,
+			ADGF_DEMO | ADGF_CD,
 			GUIO0()
 		},
 		GID_DW1,
 		0,
-		GF_CD,
+		0,
 		TINSEL_V1,
 	},
 #if 0
@@ -81,12 +81,12 @@ static const TinselGameDescription gameDescriptions[] = {
 			},
 			Common::EN_ANY,
 			Common::kPlatformMacintosh,
-			ADGF_DEMO,
+			ADGF_DEMO | ADGF_CD,
 			GUIO0()
 		},
 		GID_DW1,
 		0,
-		GF_CD | GF_SCNFILES | GF_BIG_ENDIAN,
+		GF_SCNFILES | GF_BIG_ENDIAN,
 		TINSEL_V1,
 	},
 #endif
@@ -110,7 +110,7 @@ static const TinselGameDescription gameDescriptions[] = {
 		},
 		GID_DW1,
 		0,
-		GF_FLOPPY | GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT,
+		GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT,
 		TINSEL_V1,
 	},
 
@@ -133,7 +133,7 @@ static const TinselGameDescription gameDescriptions[] = {
 		},
 		GID_DW1,
 		0,
-		GF_FLOPPY | GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT,
+		GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT,
 		TINSEL_V1,
 	},
 
@@ -156,7 +156,7 @@ static const TinselGameDescription gameDescriptions[] = {
 		},
 		GID_DW1,
 		0,
-		GF_FLOPPY | GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT,
+		GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT,
 		TINSEL_V1,
 	},
 
@@ -179,7 +179,7 @@ static const TinselGameDescription gameDescriptions[] = {
 		},
 		GID_DW1,
 		0,
-		GF_FLOPPY | GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT,
+		GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT,
 		TINSEL_V1,
 	},
 
@@ -195,7 +195,7 @@ static const TinselGameDescription gameDescriptions[] = {
 		},
 		GID_DW1,
 		0,
-		GF_FLOPPY | GF_ENHANCED_AUDIO_SUPPORT,
+		GF_ENHANCED_AUDIO_SUPPORT,
 		TINSEL_V1,
 	},
 
@@ -214,7 +214,7 @@ static const TinselGameDescription gameDescriptions[] = {
 		},
 		GID_DW1,
 		0,
-		GF_CD | GF_ENHANCED_AUDIO_SUPPORT,
+		GF_ENHANCED_AUDIO_SUPPORT,
 		TINSEL_V1,
 	},
 
@@ -228,12 +228,12 @@ static const TinselGameDescription gameDescriptions[] = {
 			},
 			Common::EN_ANY,
 			Common::kPlatformPC,
-			ADGF_NO_FLAGS,
+			ADGF_CD,
 			GUIO_NONE
 		},
 		GID_DW1,
 		0,
-		GF_CD | GF_ENHANCED_AUDIO_SUPPORT,
+		GF_ENHANCED_AUDIO_SUPPORT,
 		TINSEL_V1,
 	},
 
@@ -249,7 +249,7 @@ static const TinselGameDescription gameDescriptions[] = {
 		},
 		GID_DW1,
 		0,
-		GF_FLOPPY | GF_ENHANCED_AUDIO_SUPPORT,
+		GF_ENHANCED_AUDIO_SUPPORT,
 		TINSEL_V1,
 	},
 
@@ -271,7 +271,7 @@ static const TinselGameDescription gameDescriptions[] = {
 		},
 		GID_DW1,
 		0,
-		GF_CD | GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT,
+		GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT,
 		TINSEL_V1,
 	},
 
@@ -296,7 +296,7 @@ static const TinselGameDescription gameDescriptions[] = {
 		},
 		GID_DW1,
 		0,
-		GF_CD | GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT,
+		GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT,
 		TINSEL_V1,
 	},
 
@@ -315,12 +315,12 @@ static const TinselGameDescription gameDescriptions[] = {
 			},
 			Common::DE_DEU,
 			Common::kPlatformPC,
-			ADGF_DROPLANGUAGE | ADGF_CD,
+			ADGF_DROPLANGUAGE,
 			GUIO0()
 		},
 		GID_DW1,
 		0,
-		GF_CD | GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT,
+		GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT,
 		TINSEL_V1,
 	},
 	{
@@ -343,7 +343,7 @@ static const TinselGameDescription gameDescriptions[] = {
 		},
 		GID_DW1,
 		0,
-		GF_CD | GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT,
+		GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT,
 		TINSEL_V1,
 	},
 	{
@@ -366,7 +366,7 @@ static const TinselGameDescription gameDescriptions[] = {
 		},
 		GID_DW1,
 		0,
-		GF_CD | GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT,
+		GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT,
 		TINSEL_V1,
 	},
 
@@ -386,7 +386,7 @@ static const TinselGameDescription gameDescriptions[] = {
 		},
 		GID_DW1,
 		0,
-		GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT,
+		GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT,
 		TINSEL_V1,
 	},
 
@@ -406,7 +406,7 @@ static const TinselGameDescription gameDescriptions[] = {
 		},
 		GID_DW1,
 		0,
-		GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT,
+		GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT,
 		TINSEL_V1,
 	},
 
@@ -425,7 +425,7 @@ static const TinselGameDescription gameDescriptions[] = {
 		},
 		GID_DW1,
 		0,
-		GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT,
+		GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT,
 		TINSEL_V1,
 	},
 
@@ -443,12 +443,12 @@ static const TinselGameDescription gameDescriptions[] = {
 			},
 			Common::EN_ANY,
 			Common::kPlatformPSX,
-			ADGF_DEMO,
+			ADGF_CD | ADGF_DEMO,
 			GUIO0()
 		},
 		GID_DW1,
 		0,
-		GF_CD | GF_SCNFILES,
+		GF_SCNFILES,
 		TINSEL_V1,
 	},
 
@@ -469,7 +469,7 @@ static const TinselGameDescription gameDescriptions[] = {
 		},
 		GID_DW1,
 		0,
-		GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT,
+		GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT,
 		TINSEL_V1,
 	},
 #endif
@@ -491,7 +491,7 @@ static const TinselGameDescription gameDescriptions[] = {
 		},
 		GID_DW1,
 		0,
-		GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT | GF_BIG_ENDIAN,
+		GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT | GF_BIG_ENDIAN,
 		TINSEL_V1,
 	},
 
@@ -510,7 +510,7 @@ static const TinselGameDescription gameDescriptions[] = {
 		},
 		GID_DW1,
 		0,
-		GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT | GF_ALT_MIDI,
+		GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT | GF_ALT_MIDI,
 		TINSEL_V1,
 	},
 
@@ -531,7 +531,7 @@ static const TinselGameDescription gameDescriptions[] = {
 		},
 		GID_DW1,
 		0,
-		GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT,
+		GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT,
 		TINSEL_V1,
 	},
 
@@ -547,12 +547,12 @@ static const TinselGameDescription gameDescriptions[] = {
 			},
 			Common::PL_POL,
 			Common::kPlatformPC,
-			ADGF_NO_FLAGS,
+			ADGF_CD,
 			GUIO_NONE
 		},
 		GID_DW1,
 		0,
-		GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT,
+		GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT,
 		TINSEL_V1,
 	},
 
@@ -567,12 +567,12 @@ static const TinselGameDescription gameDescriptions[] = {
 			},
 			Common::EN_ANY,
 			Common::kPlatformPC,
-			ADGF_DEMO,
+			ADGF_DEMO | ADGF_CD,
 			GUIO1(GUIO_NOASPECT)
 		},
 		GID_DW2,
 		0,
-		GF_CD | GF_SCNFILES,
+		GF_SCNFILES,
 		TINSEL_V2,
 	},
 
@@ -587,12 +587,12 @@ static const TinselGameDescription gameDescriptions[] = {
 			},
 			Common::EN_GRB,
 			Common::kPlatformPC,
-			ADGF_NO_FLAGS,
+			ADGF_CD,
 			GUIO1(GUIO_NOASPECT)
 		},
 		GID_DW2,
 		0,
-		GF_CD | GF_SCNFILES,
+		GF_SCNFILES,
 		TINSEL_V2,
 	},
 
@@ -607,12 +607,12 @@ static const TinselGameDescription gameDescriptions[] = {
 			},
 			Common::EN_USA,
 			Common::kPlatformPC,
-			ADGF_NO_FLAGS,
+			ADGF_CD,
 			GUIO1(GUIO_NOASPECT)
 		},
 		GID_DW2,
 		0,
-		GF_CD | GF_SCNFILES,
+		GF_SCNFILES,
 		TINSEL_V2,
 	},
 
@@ -627,12 +627,12 @@ static const TinselGameDescription gameDescriptions[] = {
 			},
 			Common::FR_FRA,
 			Common::kPlatformPC,
-			ADGF_NO_FLAGS,
+			ADGF_CD,
 			GUIO1(GUIO_NOASPECT)
 		},
 		GID_DW2,
 		0,
-		GF_CD | GF_SCNFILES,
+		GF_SCNFILES,
 		TINSEL_V2,
 	},
 
@@ -647,12 +647,12 @@ static const TinselGameDescription gameDescriptions[] = {
 			},
 			Common::DE_DEU,
 			Common::kPlatformPC,
-			ADGF_NO_FLAGS,
+			ADGF_CD,
 			GUIO1(GUIO_NOASPECT)
 		},
 		GID_DW2,
 		0,
-		GF_CD | GF_SCNFILES,
+		GF_SCNFILES,
 		TINSEL_V2,
 	},
 
@@ -668,12 +668,12 @@ static const TinselGameDescription gameDescriptions[] = {
 			},
 			Common::IT_ITA,
 			Common::kPlatformPC,
-			ADGF_NO_FLAGS,
+			ADGF_CD,
 			GUIO1(GUIO_NOASPECT)
 		},
 		GID_DW2,
 		0,
-		GF_CD | GF_SCNFILES,
+		GF_SCNFILES,
 		TINSEL_V2,
 	},
 	{
@@ -688,12 +688,12 @@ static const TinselGameDescription gameDescriptions[] = {
 			},
 			Common::ES_ESP,
 			Common::kPlatformPC,
-			ADGF_NO_FLAGS,
+			ADGF_CD,
 			GUIO1(GUIO_NOASPECT)
 		},
 		GID_DW2,
 		0,
-		GF_CD | GF_SCNFILES,
+		GF_SCNFILES,
 		TINSEL_V2,
 	},
 
@@ -709,12 +709,12 @@ static const TinselGameDescription gameDescriptions[] = {
 			},
 			Common::RU_RUS,
 			Common::kPlatformPC,
-			ADGF_NO_FLAGS,
+			ADGF_CD,
 			GUIO1(GUIO_NOASPECT)
 		},
 		GID_DW2,
 		0,
-		GF_CD | GF_SCNFILES,
+		GF_SCNFILES,
 		TINSEL_V2,
 	},
 
diff --git a/engines/tinsel/sound.cpp b/engines/tinsel/sound.cpp
index f0ad62a..e052302 100644
--- a/engines/tinsel/sound.cpp
+++ b/engines/tinsel/sound.cpp
@@ -75,7 +75,7 @@ SoundManager::~SoundManager() {
 // playSample for DiscWorld 1
 bool SoundManager::playSample(int id, Audio::Mixer::SoundType type, Audio::SoundHandle *handle) {
 	// Floppy version has no sample file
-	if (_vm->getFeatures() & GF_FLOPPY)
+	if (!_vm->isCD())
 		return false;
 
 	// no sample driver?
@@ -182,7 +182,7 @@ bool SoundManager::playSample(int id, int sub, bool bLooped, int x, int y, int p
 		Audio::Mixer::SoundType type, Audio::SoundHandle *handle) {
 
 	// Floppy version has no sample file
-	if (_vm->getFeatures() & GF_FLOPPY)
+	if (!_vm->isCD())
 		return false;
 
 	// no sample driver?
@@ -471,7 +471,7 @@ void SoundManager::setSFXVolumes(uint8 volume) {
  */
 void SoundManager::openSampleFiles() {
 	// Floppy and demo versions have no sample files, except for the Discworld 2 demo
-	if (_vm->getFeatures() & GF_FLOPPY || TinselV0)
+	if (!_vm->isCD() || TinselV0)
 		return;
 
 	TinselFile f;
diff --git a/engines/tinsel/tinsel.h b/engines/tinsel/tinsel.h
index ef04669..38c1781 100644
--- a/engines/tinsel/tinsel.h
+++ b/engines/tinsel/tinsel.h
@@ -63,20 +63,18 @@ enum TinselGameID {
 };
 
 enum TinselGameFeatures {
-	GF_CD = 1 << 0,
-	GF_FLOPPY = 1 << 1,
-	GF_SCNFILES = 1 << 2,
-	GF_ENHANCED_AUDIO_SUPPORT = 1 << 3,
-	GF_ALT_MIDI = 1 << 4,		// Alternate sequence in midi.dat file
+	GF_SCNFILES = 1 << 0,
+	GF_ENHANCED_AUDIO_SUPPORT = 1 << 1,
+	GF_ALT_MIDI = 1 << 2,		// Alternate sequence in midi.dat file
 
 	// The GF_USE_?FLAGS values specify how many country flags are displayed
 	// in the subtitles options dialog.
 	// None of these defined -> 1 language, in ENGLISH.TXT
-	GF_USE_3FLAGS = 1 << 5,	// French, German, Spanish
-	GF_USE_4FLAGS = 1 << 6,	// French, German, Spanish, Italian
-	GF_USE_5FLAGS = 1 << 7,	// All 5 flags
+	GF_USE_3FLAGS = 1 << 3,	// French, German, Spanish
+	GF_USE_4FLAGS = 1 << 4,	// French, German, Spanish, Italian
+	GF_USE_5FLAGS = 1 << 5,	// All 5 flags
 
-	GF_BIG_ENDIAN = 1 << 8
+	GF_BIG_ENDIAN = 1 << 6
 };
 
 /**
@@ -185,6 +183,7 @@ public:
 	uint32 getFlags() const;
 	Common::Platform getPlatform() const;
 	bool getIsADGFDemo() const;
+	bool isCD() const;
 
 	const char *getSampleIndex(LANGUAGE lang);
 	const char *getSampleFile(LANGUAGE lang);






More information about the Scummvm-git-logs mailing list