[Scummvm-cvs-logs] scummvm master -> 89aa6573fed989131da5e34648f70b0669e39501

bluegr md5 at scummvm.org
Sun Jul 15 13:39:29 CEST 2012


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:
89aa6573fe TINSEL: Remove the GF_DEMO flag


Commit: 89aa6573fed989131da5e34648f70b0669e39501
    https://github.com/scummvm/scummvm/commit/89aa6573fed989131da5e34648f70b0669e39501
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2012-07-15T04:38:26-07:00

Commit Message:
TINSEL: Remove the GF_DEMO flag

Changed paths:
    engines/tinsel/detection_tables.h
    engines/tinsel/music.cpp
    engines/tinsel/scene.h
    engines/tinsel/sound.cpp
    engines/tinsel/tinlib.cpp
    engines/tinsel/tinsel.h



diff --git a/engines/tinsel/detection_tables.h b/engines/tinsel/detection_tables.h
index ef562a5..dc3b5f1 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 a226feb..637e043 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 baaff27..06e5c09 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 f575b03..f0ad62a 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 5dda836..7c4fec6 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 5660366..ef04669 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))
 






More information about the Scummvm-git-logs mailing list