[Scummvm-cvs-logs] scummvm master -> 7456a2ca239773982f980086a2ae77ad5d31b1ab

bluegr bluegr at gmail.com
Thu Jun 6 00:28:00 CEST 2013


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:
7456a2ca23 TINSEL: Revert the incorrect flagging of DW2 entries as CD versions


Commit: 7456a2ca239773982f980086a2ae77ad5d31b1ab
    https://github.com/scummvm/scummvm/commit/7456a2ca239773982f980086a2ae77ad5d31b1ab
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-06-05T15:26:02-07:00

Commit Message:
TINSEL: Revert the incorrect flagging of DW2 entries as CD versions

This reverts the changes done to the DW2 entries in commit d4a354c1.

We only distinguish between floppy and CD versions if a game had both a
CD and a floppy version released. DW2 was only released as a CD version,
so the extra flagging of the DW2 entries as CD was redundant, and caused
confusion regarding previous saved games to users that readded the DW2
detection entries after this change

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 2e4be33..a7ba8b2 100644
--- a/engines/tinsel/detection.cpp
+++ b/engines/tinsel/detection.cpp
@@ -67,7 +67,7 @@ bool TinselEngine::getIsADGFDemo() const {
 	return (bool)(_gameDescription->desc.flags & ADGF_DEMO);
 }
 
-bool TinselEngine::isCD() const {
+bool TinselEngine::isV1CD() const {
 	return (bool)(_gameDescription->desc.flags & ADGF_CD);
 }
 
diff --git a/engines/tinsel/detection_tables.h b/engines/tinsel/detection_tables.h
index f05f39b..a945672 100644
--- a/engines/tinsel/detection_tables.h
+++ b/engines/tinsel/detection_tables.h
@@ -34,6 +34,8 @@ static const TinselGameDescription gameDescriptions[] = {
 	// TINSEL_V2: The Discworld 2 game used this updated version of the Tinsel 1 engine,
 	//   and as far as we know there aren't any variations of this engine.
 
+	// ==== Discworld 1 early (TinselV0) entries ==============================
+
 	{	// Floppy Demo V0 from http://www.adventure-treff.de/specials/dl_demos.php
 		{
 			"dw",
@@ -51,6 +53,8 @@ static const TinselGameDescription gameDescriptions[] = {
 		TINSEL_V0,
 	},
 
+	// ==== Discworld 1 entries ===============================================
+
 	{	// CD Demo V1 version, with *.gra files
 		{
 			"dw",
@@ -553,6 +557,9 @@ static const TinselGameDescription gameDescriptions[] = {
 		TINSEL_V1,
 	},
 
+	// ==== Discworld 2 entries ===============================================
+	// Note: All Discworld 2 versions are CD only, therefore we don't add the ADGF_CD flag
+
 	{	// English Discworld 2 demo
 		{
 			"dw2",
@@ -564,7 +571,7 @@ static const TinselGameDescription gameDescriptions[] = {
 			},
 			Common::EN_ANY,
 			Common::kPlatformDOS,
-			ADGF_DEMO | ADGF_CD,
+			ADGF_DEMO,
 			GUIO1(GUIO_NOASPECT)
 		},
 		GID_DW2,
@@ -584,7 +591,7 @@ static const TinselGameDescription gameDescriptions[] = {
 			},
 			Common::EN_GRB,
 			Common::kPlatformDOS,
-			ADGF_CD,
+			ADGF_NO_FLAGS,
 			GUIO1(GUIO_NOASPECT)
 		},
 		GID_DW2,
@@ -604,7 +611,7 @@ static const TinselGameDescription gameDescriptions[] = {
 			},
 			Common::EN_USA,
 			Common::kPlatformDOS,
-			ADGF_CD,
+			ADGF_NO_FLAGS,
 			GUIO1(GUIO_NOASPECT)
 		},
 		GID_DW2,
@@ -624,7 +631,7 @@ static const TinselGameDescription gameDescriptions[] = {
 			},
 			Common::FR_FRA,
 			Common::kPlatformDOS,
-			ADGF_CD,
+			ADGF_NO_FLAGS,
 			GUIO1(GUIO_NOASPECT)
 		},
 		GID_DW2,
@@ -644,7 +651,7 @@ static const TinselGameDescription gameDescriptions[] = {
 			},
 			Common::DE_DEU,
 			Common::kPlatformDOS,
-			ADGF_CD,
+			ADGF_NO_FLAGS,
 			GUIO1(GUIO_NOASPECT)
 		},
 		GID_DW2,
@@ -665,7 +672,7 @@ static const TinselGameDescription gameDescriptions[] = {
 			},
 			Common::IT_ITA,
 			Common::kPlatformDOS,
-			ADGF_CD,
+			ADGF_NO_FLAGS,
 			GUIO1(GUIO_NOASPECT)
 		},
 		GID_DW2,
@@ -685,7 +692,7 @@ static const TinselGameDescription gameDescriptions[] = {
 			},
 			Common::ES_ESP,
 			Common::kPlatformDOS,
-			ADGF_CD,
+			ADGF_NO_FLAGS,
 			GUIO1(GUIO_NOASPECT)
 		},
 		GID_DW2,
@@ -706,7 +713,7 @@ static const TinselGameDescription gameDescriptions[] = {
 			},
 			Common::RU_RUS,
 			Common::kPlatformDOS,
-			ADGF_CD,
+			ADGF_NO_FLAGS,
 			GUIO1(GUIO_NOASPECT)
 		},
 		GID_DW2,
diff --git a/engines/tinsel/sound.cpp b/engines/tinsel/sound.cpp
index cadc754..416ee74 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->isCD())
+	if (!_vm->isV1CD())
 		return false;
 
 	// no sample driver?
@@ -207,10 +207,6 @@ void SoundManager::playDW1MacMusic(Common::File &s, uint32 length) {
 bool SoundManager::playSample(int id, int sub, bool bLooped, int x, int y, int priority,
 		Audio::Mixer::SoundType type, Audio::SoundHandle *handle) {
 
-	// Floppy version has no sample file
-	if (!_vm->isCD())
-		return false;
-
 	// no sample driver?
 	if (!_vm->_mixer->isReady())
 		return false;
@@ -501,8 +497,8 @@ void SoundManager::showSoundError(const char *errorMsg, const char *soundFile) {
  * Opens and inits all sound sample files.
  */
 void SoundManager::openSampleFiles() {
-	// Floppy and demo versions have no sample files, except for the Discworld 2 demo
-	if (!_vm->isCD())
+	// V1 Floppy and V0 demo versions have no sample files
+	if (TinselV0 || (TinselV1 && !_vm->isV1CD()))
 		return;
 
 	TinselFile f;
diff --git a/engines/tinsel/tinsel.h b/engines/tinsel/tinsel.h
index ec504b6..56fed30 100644
--- a/engines/tinsel/tinsel.h
+++ b/engines/tinsel/tinsel.h
@@ -184,7 +184,7 @@ public:
 	uint32 getFlags() const;
 	Common::Platform getPlatform() const;
 	bool getIsADGFDemo() const;
-	bool isCD() const;
+	bool isV1CD() const;
 
 	const char *getSampleIndex(LANGUAGE lang);
 	const char *getSampleFile(LANGUAGE lang);






More information about the Scummvm-git-logs mailing list