diff options
-rw-r--r-- | engines/tinsel/detection_tables.h | 4 | ||||
-rw-r--r-- | engines/tinsel/music.cpp | 2 | ||||
-rw-r--r-- | engines/tinsel/scene.h | 6 | ||||
-rw-r--r-- | engines/tinsel/sound.cpp | 2 | ||||
-rw-r--r-- | engines/tinsel/tinlib.cpp | 4 | ||||
-rw-r--r-- | engines/tinsel/tinsel.h | 22 |
6 files changed, 19 insertions, 21 deletions
diff --git a/engines/tinsel/detection_tables.h b/engines/tinsel/detection_tables.h index ef562a5e08..dc3b5f1382 100644 --- a/engines/tinsel/detection_tables.h +++ b/engines/tinsel/detection_tables.h @@ -47,7 +47,7 @@ static const TinselGameDescription gameDescriptions[] = { }, GID_DW1, 0, - GF_DEMO, + 0, TINSEL_V0, }, @@ -551,7 +551,7 @@ static const TinselGameDescription gameDescriptions[] = { }, GID_DW2, 0, - GF_CD | GF_SCNFILES | GF_DEMO, + GF_CD | GF_SCNFILES, TINSEL_V2, }, diff --git a/engines/tinsel/music.cpp b/engines/tinsel/music.cpp index a226feb656..637e043e11 100644 --- a/engines/tinsel/music.cpp +++ b/engines/tinsel/music.cpp @@ -300,7 +300,7 @@ void OpenMidiFiles() { Common::File midiStream; // Demo version has no midi file - if ((_vm->getFeatures() & GF_DEMO) || (TinselVersion == TINSEL_V2)) + if (TinselV0 || TinselV2) return; if (g_midiBuffer.pDat) diff --git a/engines/tinsel/scene.h b/engines/tinsel/scene.h index baaff27a3e..06e5c096d9 100644 --- a/engines/tinsel/scene.h +++ b/engines/tinsel/scene.h @@ -75,9 +75,9 @@ enum REEL { typedef enum { TRANS_DEF, TRANS_CUT, TRANS_FADE } TRANSITS; // amount to shift scene handles by -#define SCNHANDLE_SHIFT ((TinselV2 && !IsDemo) ? 25 : 23) -#define OFFSETMASK ((TinselV2 && !IsDemo) ? 0x01ffffffL : 0x007fffffL) -#define HANDLEMASK ((TinselV2 && !IsDemo) ? 0xFE000000L : 0xFF800000L) +#define SCNHANDLE_SHIFT ((TinselV2 && !TinselV2Demo) ? 25 : 23) +#define OFFSETMASK ((TinselV2 && !TinselV2Demo) ? 0x01ffffffL : 0x007fffffL) +#define HANDLEMASK ((TinselV2 && !TinselV2Demo) ? 0xFE000000L : 0xFF800000L) void DoHailScene(SCNHANDLE scene); diff --git a/engines/tinsel/sound.cpp b/engines/tinsel/sound.cpp index f575b03270..f0ad62a091 100644 --- a/engines/tinsel/sound.cpp +++ b/engines/tinsel/sound.cpp @@ -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 || (IsDemo && !TinselV2)) + if (_vm->getFeatures() & GF_FLOPPY || TinselV0) return; TinselFile f; diff --git a/engines/tinsel/tinlib.cpp b/engines/tinsel/tinlib.cpp index 5dda836144..7c4fec6592 100644 --- a/engines/tinsel/tinlib.cpp +++ b/engines/tinsel/tinlib.cpp @@ -3412,7 +3412,7 @@ static void TalkOrSay(CORO_PARAM, SPEECH_TYPE speechType, SCNHANDLE hText, int x // Kick off the sample now (perhaps with a delay) if (g_bNoPause) g_bNoPause = false; - else if (!IsDemo) + else if (!TinselV2Demo) CORO_SLEEP(SysVar(SV_SPEECHDELAY)); //SamplePlay(VOICE, hText, _ctx->sub, false, -1, -1, PRIORITY_TALK); @@ -4244,7 +4244,7 @@ int CallLibraryRoutine(CORO_PARAM, int operand, int32 *pp, const INT_CONTEXT *pi int libCode; if (TinselV0) libCode = DW1DEMO_CODES[operand]; else if (!TinselV2) libCode = DW1_CODES[operand]; - else if (_vm->getFeatures() & GF_DEMO) libCode = DW2DEMO_CODES[operand]; + else if (TinselV2Demo) libCode = DW2DEMO_CODES[operand]; else libCode = DW2_CODES[operand]; debug(7, "CallLibraryRoutine op %d (escOn %d, myEscape %d)", operand, pic->escOn, pic->myEscape); diff --git a/engines/tinsel/tinsel.h b/engines/tinsel/tinsel.h index 5660366657..ef04669f5f 100644 --- a/engines/tinsel/tinsel.h +++ b/engines/tinsel/tinsel.h @@ -63,21 +63,20 @@ enum TinselGameID { }; enum TinselGameFeatures { - GF_DEMO = 1 << 0, - GF_CD = 1 << 1, - GF_FLOPPY = 1 << 2, - GF_SCNFILES = 1 << 3, - GF_ENHANCED_AUDIO_SUPPORT = 1 << 4, - GF_ALT_MIDI = 1 << 5, // Alternate sequence in midi.dat file + 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 // 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 << 6, // French, German, Spanish - GF_USE_4FLAGS = 1 << 7, // French, German, Spanish, Italian - GF_USE_5FLAGS = 1 << 8, // All 5 flags + 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_BIG_ENDIAN = 1 << 9 + GF_BIG_ENDIAN = 1 << 8 }; /** @@ -134,11 +133,10 @@ typedef bool (*KEYFPTR)(const Common::KeyState &); #define TinselV0 (TinselVersion == TINSEL_V0) #define TinselV1 (TinselVersion == TINSEL_V1) #define TinselV2 (TinselVersion == TINSEL_V2) +#define TinselV2Demo (TinselVersion == TINSEL_V2 && _vm->getIsADGFDemo()) #define TinselV1PSX (TinselVersion == TINSEL_V1 && _vm->getPlatform() == Common::kPlatformPSX) #define TinselV1Mac (TinselVersion == TINSEL_V1 && _vm->getPlatform() == Common::kPlatformMacintosh) -#define IsDemo (_vm->getFeatures() & GF_DEMO) - #define READ_16(v) ((_vm->getFeatures() & GF_BIG_ENDIAN) ? READ_BE_UINT16(v) : READ_LE_UINT16(v)) #define READ_32(v) ((_vm->getFeatures() & GF_BIG_ENDIAN) ? READ_BE_UINT32(v) : READ_LE_UINT32(v)) |