Skip to content

Commit

Permalink
TINSEL: Revert the incorrect flagging of DW2 entries as CD versions
Browse files Browse the repository at this point in the history
This reverts the changes done to the DW2 entries in commit d4a354c.

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
  • Loading branch information
bluegr committed Jun 5, 2013
1 parent 82c9530 commit b63d478
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 17 deletions.
2 changes: 1 addition & 1 deletion engines/tinsel/detection.cpp
Expand Up @@ -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);
}

Expand Down
23 changes: 15 additions & 8 deletions engines/tinsel/detection_tables.h
Expand Up @@ -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",
Expand All @@ -51,6 +53,8 @@ static const TinselGameDescription gameDescriptions[] = {
TINSEL_V0,
},

// ==== Discworld 1 entries ===============================================

{ // CD Demo V1 version, with *.gra files
{
"dw",
Expand Down Expand Up @@ -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",
Expand All @@ -564,7 +571,7 @@ static const TinselGameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformDOS,
ADGF_DEMO | ADGF_CD,
ADGF_DEMO,
GUIO1(GUIO_NOASPECT)
},
GID_DW2,
Expand All @@ -584,7 +591,7 @@ static const TinselGameDescription gameDescriptions[] = {
},
Common::EN_GRB,
Common::kPlatformDOS,
ADGF_CD,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
GID_DW2,
Expand All @@ -604,7 +611,7 @@ static const TinselGameDescription gameDescriptions[] = {
},
Common::EN_USA,
Common::kPlatformDOS,
ADGF_CD,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
GID_DW2,
Expand All @@ -624,7 +631,7 @@ static const TinselGameDescription gameDescriptions[] = {
},
Common::FR_FRA,
Common::kPlatformDOS,
ADGF_CD,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
GID_DW2,
Expand All @@ -644,7 +651,7 @@ static const TinselGameDescription gameDescriptions[] = {
},
Common::DE_DEU,
Common::kPlatformDOS,
ADGF_CD,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
GID_DW2,
Expand All @@ -665,7 +672,7 @@ static const TinselGameDescription gameDescriptions[] = {
},
Common::IT_ITA,
Common::kPlatformDOS,
ADGF_CD,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
GID_DW2,
Expand All @@ -685,7 +692,7 @@ static const TinselGameDescription gameDescriptions[] = {
},
Common::ES_ESP,
Common::kPlatformDOS,
ADGF_CD,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
GID_DW2,
Expand All @@ -706,7 +713,7 @@ static const TinselGameDescription gameDescriptions[] = {
},
Common::RU_RUS,
Common::kPlatformDOS,
ADGF_CD,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
GID_DW2,
Expand Down
10 changes: 3 additions & 7 deletions engines/tinsel/sound.cpp
Expand Up @@ -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?
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion engines/tinsel/tinsel.h
Expand Up @@ -184,7 +184,7 @@ class TinselEngine : public Engine {
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);
Expand Down

0 comments on commit b63d478

Please sign in to comment.