diff options
Diffstat (limited to 'engines/tinsel')
-rw-r--r-- | engines/tinsel/detection.cpp | 4 | ||||
-rw-r--r-- | engines/tinsel/detection_tables.h | 92 | ||||
-rw-r--r-- | engines/tinsel/sound.cpp | 6 | ||||
-rw-r--r-- | engines/tinsel/tinsel.h | 17 |
4 files changed, 61 insertions, 58 deletions
diff --git a/engines/tinsel/detection.cpp b/engines/tinsel/detection.cpp index 6d20f8bee2..2e4be33e53 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 23d8d2242b..5f305f06e4 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 f0ad62a091..e052302cfd 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 ef04669f5f..38c17812b4 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); |