[Scummvm-cvs-logs] SF.net SVN: scummvm: [28058] scummvm/trunk/engines/saga

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Fri Jul 13 18:37:37 CEST 2007


Revision: 28058
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28058&view=rev
Author:   thebluegr
Date:     2007-07-13 09:37:37 -0700 (Fri, 13 Jul 2007)

Log Message:
-----------
Rewrote and greatly simplified the SAGA detector, removing many duplicate and unneeded entries
- Digital music will now always be enabled for all versions if the digital music file is present. The duplicate game entries with and without this file have been removed
- Changed the way compressed sound files are detected. All the duplicate compressed sound entries have been removed
- The Wyrmkeep Windows CD version is now properly distinguished from the DOS CD version
- Unified all the different patch file entries (apart from the Mac patch file entries, which are of a different type). If a patch file is not found, it's ignored

Modified Paths:
--------------
    scummvm/trunk/engines/saga/actor.h
    scummvm/trunk/engines/saga/detection.cpp
    scummvm/trunk/engines/saga/detection_tables.h
    scummvm/trunk/engines/saga/rscfile.cpp
    scummvm/trunk/engines/saga/saga.cpp
    scummvm/trunk/engines/saga/saga.h

Modified: scummvm/trunk/engines/saga/actor.h
===================================================================
--- scummvm/trunk/engines/saga/actor.h	2007-07-13 16:30:04 UTC (rev 28057)
+++ scummvm/trunk/engines/saga/actor.h	2007-07-13 16:37:37 UTC (rev 28058)
@@ -41,7 +41,7 @@
 class HitZone;
 
 
-// #define ACTOR_DEBUG 1 //only for actor pathfinding debug!
+#define ACTOR_DEBUG 1 //only for actor pathfinding debug!
 
 #define ACTOR_BARRIERS_MAX 16
 

Modified: scummvm/trunk/engines/saga/detection.cpp
===================================================================
--- scummvm/trunk/engines/saga/detection.cpp	2007-07-13 16:30:04 UTC (rev 28057)
+++ scummvm/trunk/engines/saga/detection.cpp	2007-07-13 16:37:37 UTC (rev 28058)
@@ -69,7 +69,19 @@
 
 int SagaEngine::getGameId() const { return _gameDescription->gameId; }
 int SagaEngine::getGameType() const { return _gameDescription->gameType; }
-uint32 SagaEngine::getFeatures() const { return _gameDescription->features; }
+
+uint32 SagaEngine::getFeatures() const {
+	uint32 result = _gameDescription->features;
+
+	if (_gf_wyrmkeep)
+		result |= GF_WYRMKEEP;
+
+	if (_gf_compressed_sounds)
+		result |= GF_COMPRESSED_SOUNDS;
+
+	return result; 
+}
+
 Common::Language SagaEngine::getLanguage() const { return _gameDescription->desc.language; }
 Common::Platform SagaEngine::getPlatform() const { return _gameDescription->desc.platform; }
 int SagaEngine::getGameNumber() const { return _gameNumber; }
@@ -133,6 +145,18 @@
 	_displayClip.right = getDisplayInfo().logicalWidth;
 	_displayClip.bottom = getDisplayInfo().logicalHeight;
 
+	if (Common::File::exists("graphics/credit3n.dlt")) {
+		_gf_wyrmkeep = true;
+	}
+
+	// If a compressed sound file is found in the game's directory, set the compressed flag to true
+	if (Common::File::exists("music.cmp")  || Common::File::exists("musicd.cmp")  ||
+		Common::File::exists("sounds.cmp") || Common::File::exists("soundsd.cmp") ||
+		Common::File::exists("voices.cmp") || Common::File::exists("voicesd.cmp") ||
+		Common::File::exists("inherit the earth voices.cmp")) {
+		_gf_compressed_sounds = true;
+	}	
+
 	return _resource->createContexts();
 }
 

Modified: scummvm/trunk/engines/saga/detection_tables.h
===================================================================
--- scummvm/trunk/engines/saga/detection_tables.h	2007-07-13 16:30:04 UTC (rev 28057)
+++ scummvm/trunk/engines/saga/detection_tables.h	2007-07-13 16:37:37 UTC (rev 28058)
@@ -201,7 +201,8 @@
 	true
 };
 
-static const GamePatchDescription ITEWinPatch1_Files[] = {
+// Patch files. Files not found will be ignored
+static const GamePatchDescription ITEPatch_Files[] = {
 	{ "cave.mid", GAME_RESOURCEFILE, 9, NULL},
 	{ "intro.mid", GAME_RESOURCEFILE, 10, NULL},
 	{ "fvillage.mid", GAME_RESOURCEFILE, 11, NULL},
@@ -235,31 +236,11 @@
 	{ "wyrm3.dlt", GAME_RESOURCEFILE, 1532, NULL},
 	{ "wyrm4.dlt", GAME_RESOURCEFILE, 1533, NULL},
 	{ "credit3n.dlt", GAME_RESOURCEFILE, 1796, NULL},
+	{ "credit3m.dlt", GAME_RESOURCEFILE, 1796, NULL},	// Macintosh
 	{ "credit4n.dlt", GAME_RESOURCEFILE, 1797, NULL},
-	{ "p2_a.voc", GAME_VOICEFILE, 4, NULL}
-};
-
-static const GamePatchDescription ITEWinPatch2_Files[] = {
-	{ "cave.mid", GAME_RESOURCEFILE, 9, NULL},
-	{ "intro.mid", GAME_RESOURCEFILE, 10, NULL},
-	{ "fvillage.mid", GAME_RESOURCEFILE, 11, NULL},
-	{ "elkfanfare.mid", GAME_RESOURCEFILE, 19, NULL},
-	{ "bcexpl.mid", GAME_RESOURCEFILE, 20, NULL},
-	{ "boargtnt.mid", GAME_RESOURCEFILE, 21, NULL},
-	{ "explorea.mid", GAME_RESOURCEFILE, 23, NULL},
-	{ "sweet.mid", GAME_RESOURCEFILE, 32, NULL},
-
-	{ "wyrm.pak", GAME_RESOURCEFILE, 1529, NULL},
-	{ "wyrm1.dlt", GAME_RESOURCEFILE, 1530, NULL},
-	{ "wyrm2.dlt", GAME_RESOURCEFILE, 1531, NULL},
-	{ "wyrm3.dlt", GAME_RESOURCEFILE, 1532, NULL},
+	{ "credit4m.dlt", GAME_RESOURCEFILE, 1797, NULL},	// Macintosh
+	{ "p2_a.voc", GAME_VOICEFILE, 4, NULL},
 	{ "p2_a.iaf", GAME_VOICEFILE, 4, &ITECD_GameSound}
-/*	boarhall.bbm
-	elkenter.bbm
-	ferrets.bbm
-	ratdoor.bbm
-	sanctuar.bbm
-	tycho.bbm*/
 };
 
 static const GamePatchDescription ITEMacPatch_Files[] = {
@@ -273,16 +254,6 @@
 	{ "p2_a.iaf", GAME_VOICEFILE, 4, &ITEMACCD_GameSound}
 };
 
-static const GamePatchDescription ITELinPatch_Files[] = {
-	{ "wyrm.pak", GAME_RESOURCEFILE, 1529, NULL},
-	{ "wyrm1.dlt", GAME_RESOURCEFILE, 1530, NULL},
-	{ "wyrm2.dlt", GAME_RESOURCEFILE, 1531, NULL},
-	{ "wyrm3.dlt", GAME_RESOURCEFILE, 1532, NULL},
-	{ "credit3n.dlt", GAME_RESOURCEFILE, 1796, NULL},
-	{ "credit4n.dlt", GAME_RESOURCEFILE, 1797, NULL},
-	{ "P2_A.iaf", GAME_VOICEFILE, 4, &ITECD_GameSound}
-};
-
 // IHNM section
 
 static const GameResourceDescription IHNM_Resources = {
@@ -326,6 +297,9 @@
 };
 
 static const SAGAGameDescription gameDescriptions[] = {
+	// ITE Section ////////////////////////////////////////////////////////////////////////////////////////////
+	// ITE Demos //////////////////////////////////////////////////////////////////////////////////////////////
+
 	// Inherit the earth - DOS Demo version
 	// sound unchecked
 	{
@@ -357,17 +331,18 @@
 		NULL,
 	},
 
-	// Inherit the earth - MAC Demo version 2
+	// Inherit the earth - MAC Demo version 1 and 2
+	// Demo 1 has normal scenes, demo 2 has scene substitutes but the files are the same (apart from musicd.rsc)
 	{
 		{
 			"ite",
-			"Demo 2",
+			"Demo 1/2",
 			{
 	{"ited.rsc",		GAME_RESOURCEFILE,	"addfc9d82bc2fa1f4cab23743c652c08", -1},
 	{"scriptsd.rsc",	GAME_SCRIPTFILE,	"fded5c59b8b7c5976229f960d21e6b0b", -1},
-	{"soundsd.rsc",		GAME_SOUNDFILE,		"b3a831fbed337d1f1300fee1dd474f6c", -1},
-	{"voicesd.rsc",		GAME_VOICEFILE,		"e139d86bab2ee8ba3157337f894a92d4", -1},
-	{"musicd.rsc",		GAME_MUSICFILE,		"495bdde51fd9f4bea2b9c911091b1ab2", -1},
+	//{"soundsd.rsc",		GAME_SOUNDFILE,		"b3a831fbed337d1f1300fee1dd474f6c", -1},
+	//{"voicesd.rsc",		GAME_VOICEFILE,		"e139d86bab2ee8ba3157337f894a92d4", -1},
+	//{"musicd.rsc",		GAME_MUSICFILE,		"1a91cd60169f367ecb6c6e058d899b2f", -1},
 	{ NULL, 0, NULL, 0}
 			},
 			Common::EN_ANY,
@@ -375,37 +350,6 @@
 			Common::ADGF_DEMO
 		},
 		GType_ITE,
-		GID_ITE_MACDEMO2,
-		GF_BIG_ENDIAN_DATA | GF_WYRMKEEP | GF_CD_FX | GF_SCENE_SUBSTITUTES,
-		ITE_DEFAULT_SCENE,
-		&ITE_Resources,
-		ARRAYSIZE(ITEWINDEMO_GameFonts),
-		ITEWINDEMO_GameFonts,
-		&ITEMACDEMO_GameVoice,
-		&ITEMACDEMO_GameSound,
-		&ITEMACDEMO_GameMusic,
-		ARRAYSIZE(ITEMacPatch_Files),
-		ITEMacPatch_Files,
-	},
-
-	// Inherit the earth - MAC Demo version 1
-	{
-		{
-			"ite",
-			"Demo 1",
-			{
-	{"ited.rsc",		GAME_RESOURCEFILE,	"addfc9d82bc2fa1f4cab23743c652c08", -1},
-	{"scriptsd.rsc",	GAME_SCRIPTFILE,	"fded5c59b8b7c5976229f960d21e6b0b", -1},
-	{"soundsd.rsc",		GAME_SOUNDFILE,		"b3a831fbed337d1f1300fee1dd474f6c", -1},
-	{"voicesd.rsc",		GAME_VOICEFILE,		"e139d86bab2ee8ba3157337f894a92d4", -1},
-	{"musicd.rsc",		GAME_MUSICFILE,		"1a91cd60169f367ecb6c6e058d899b2f", -1},
-	{ NULL, 0, NULL, 0}
-			},
-			Common::EN_ANY,
-			Common::kPlatformMacintosh,
-			Common::ADGF_DEMO
-		},
-		GType_ITE,
 		GID_ITE_MACDEMO1,
 		GF_BIG_ENDIAN_DATA | GF_WYRMKEEP | GF_CD_FX,
 		ITE_DEFAULT_SCENE,
@@ -419,145 +363,23 @@
 		ITEMacPatch_Files,
 	},
 
-	// Inherit the earth - MAC CD Guild version
+	// Inherit the earth - Win32 Demo version 2/3, Linux Demo version
+	// Win32 Version 3 and Linux Demo version have digital music, Win32 version 2 has MIDI music
+	// These demos have scene substitutes, and can only be distinguished from Win32 demo 1 (below)
+	// from soundsd.rsc and voicesd.rsc
 	{
 		{
 			"ite",
-			"CD",
+			"Win Demo 2/3, Linux Demo",
 			{
-	{"ite resources.bin",	GAME_RESOURCEFILE | GAME_MACBINARY,	"0bd506aa887bfc7965f695c6bd28237d", -1},
-	{"ite scripts.bin",		GAME_SCRIPTFILE | GAME_MACBINARY,	"af0d7a2588e09ad3ecbc5b474ea238bf", -1},
-	{"ite sounds.bin",		GAME_SOUNDFILE | GAME_MACBINARY,	"441426c6bb2a517f65c7e49b57f7a345", -1},
-	{"ite music.bin",		GAME_MUSICFILE_GM | GAME_MACBINARY,	"c1d20324b7cdf1650e67061b8a93251c", -1},
-	{"ite voices.bin",		GAME_VOICEFILE | GAME_MACBINARY,	"dba92ae7d57e942250fe135609708369", -1},
-	{ NULL, 0, NULL, 0}
-			},
-			Common::EN_ANY,
-			Common::kPlatformMacintosh,
-			Common::ADGF_NO_FLAGS
-		},
-		GType_ITE,
-		GID_ITE_MACCD_G,
-		GF_BIG_ENDIAN_DATA | GF_CD_FX,
-		ITE_DEFAULT_SCENE,
-		&ITE_Resources,
-		ARRAYSIZE(ITEWINDEMO_GameFonts),
-		ITEWINDEMO_GameFonts,
-		&ITEMACCD_G_GameSound,
-		&ITEMACCD_G_GameSound,
-		NULL,
-		0,
-		NULL,
-	},
-
-	// Inherit the earth - MAC CD Wyrmkeep version
-	{
-		{
-			"ite",
-			"Wyrmkeep CD",
-			{
-	{"ite.rsc",						GAME_RESOURCEFILE,	"4f7fa11c5175980ed593392838523060", -1},
-	{"scripts.rsc",					GAME_SCRIPTFILE,	"adf1f46c1d0589083996a7060c798ad0", -1},
-	{"sounds.rsc",					GAME_SOUNDFILE,		"95863b89a0916941f6c5e1789843ba14", -1},
-	{"inherit the earth voices",	GAME_VOICEFILE,		"c14c4c995e7a0d3828e3812a494301b7", -1},
-	{"music.rsc",					GAME_MUSICFILE,		"1a91cd60169f367ecb6c6e058d899b2f", -1},
-	{ NULL, 0, NULL, 0}
-			},
-			Common::EN_ANY,
-			Common::kPlatformMacintosh,
-			Common::ADGF_NO_FLAGS
-		},
-		GType_ITE,
-		GID_ITE_MACCD,
-		GF_BIG_ENDIAN_DATA | GF_WYRMKEEP | GF_CD_FX,
-		ITE_DEFAULT_SCENE,
-		&ITE_Resources,
-		ARRAYSIZE(ITEWINDEMO_GameFonts),
-		ITEWINDEMO_GameFonts,
-		&ITEMACCD_GameSound,
-		&ITEMACCD_GameSound,
-		&ITEMACCD_GameMusic,
-		ARRAYSIZE(ITEMacPatch_Files),
-		ITEMacPatch_Files,
-	},
-
-	// Inherit the earth - MAC CD Wyrmkeep version (compressed sound)
-	{
-		{
-			"ite",
-			"Wyrmkeep CD",
-			{
-	{"ite.rsc",						GAME_RESOURCEFILE,	"4f7fa11c5175980ed593392838523060", -1},
-	{"scripts.rsc",					GAME_SCRIPTFILE,	"adf1f46c1d0589083996a7060c798ad0", -1},
-	{"sounds.cmp",					GAME_SOUNDFILE,		NULL, -1},
-	{"inherit the earth voices.cmp",GAME_VOICEFILE,		NULL, -1},
-	{"music.cmp",					GAME_MUSICFILE,		NULL, -1},
-	{ NULL, 0, NULL, 0}
-			},
-			Common::EN_ANY,
-			Common::kPlatformMacintosh,
-			Common::ADGF_NO_FLAGS
-		},
-		GType_ITE,
-		GID_ITE_MACCD,
-		GF_BIG_ENDIAN_DATA | GF_WYRMKEEP | GF_CD_FX | GF_COMPRESSED_SOUNDS,
-		ITE_DEFAULT_SCENE,
-		&ITE_Resources,
-		ARRAYSIZE(ITEWINDEMO_GameFonts),
-		ITEWINDEMO_GameFonts,
-		&ITEMACCD_GameSound,
-		&ITEMACCD_GameSound,
-		&ITEMACCD_GameMusic,
-		ARRAYSIZE(ITEMacPatch_Files),
-		ITEMacPatch_Files,
-	},
-
-	// Inherit the earth - Linux Demo version
-	// Note: it should be before GID_ITE_WINDEMO2 version
-	{
-		{
-			"ite",
-			"Demo",
-			{
 	{"ited.rsc",		GAME_RESOURCEFILE,	"3a450852cbf3c80773984d565647e6ac", -1},
 	{"scriptsd.rsc",	GAME_SCRIPTFILE,	"3f12b67fa93e56e1a6be39d2921d80bb", -1},
-	{"soundsd.rsc",		GAME_SOUNDFILE,		"95a6c148e22e99a8c243f2978223583c", 2026769},
+	{"soundsd.rsc",		GAME_SOUNDFILE,		"95a6c148e22e99a8c243f2978223583c", -1},
 	{"voicesd.rsc",		GAME_VOICEFILE,		"e139d86bab2ee8ba3157337f894a92d4", -1},
-	{"musicd.rsc",		GAME_MUSICFILE,		"d6454756517f042f01210458abe8edd4", -1},
+	//{"musicd.rsc",		GAME_MUSICFILE,		"d6454756517f042f01210458abe8edd4", -1},
 	{ NULL, 0, NULL, 0}
 			},
 			Common::EN_ANY,
-			Common::kPlatformLinux,
-			Common::ADGF_DEMO
-		},
-		GType_ITE,
-		GID_ITE_LINDEMO,
-		GF_WYRMKEEP | GF_CD_FX | GF_SCENE_SUBSTITUTES,
-		ITE_DEFAULT_SCENE,
-		&ITE_Resources,
-		ARRAYSIZE(ITEWINDEMO_GameFonts),
-		ITEWINDEMO_GameFonts,
-		&ITEWINDEMO2_GameVoice,
-		&ITEWINDEMO2_GameSound,
-		&ITELINDEMO_GameMusic,
-		ARRAYSIZE(ITELinPatch_Files),
-		ITELinPatch_Files,
-	},
-
-	// Inherit the earth - Win32 Demo version 3
-	{
-		{
-			"ite",
-			"Demo 3",
-			{
-	{"ited.rsc",		GAME_RESOURCEFILE,	"3a450852cbf3c80773984d565647e6ac", -1},
-	{"scriptsd.rsc",	GAME_SCRIPTFILE,	"3f12b67fa93e56e1a6be39d2921d80bb", -1},
-	{"soundsd.rsc",		GAME_SOUNDFILE,		"95a6c148e22e99a8c243f2978223583c", 2005074},
-	{"voicesd.rsc",		GAME_VOICEFILE,		"e139d86bab2ee8ba3157337f894a92d4", -1},
-	{"musicd.rsc",		GAME_MUSICFILE,		"d6454756517f042f01210458abe8edd4", -1},
-	{ NULL, 0, NULL, 0}
-			},
-			Common::EN_ANY,
 			Common::kPlatformWindows,
 			Common::ADGF_DEMO
 		},
@@ -571,20 +393,22 @@
 		&ITEWINDEMO2_GameVoice,
 		&ITEWINDEMO2_GameSound,
 		&ITELINDEMO_GameMusic,
-		ARRAYSIZE(ITEWinPatch2_Files),
-		ITEWinPatch2_Files,
+		ARRAYSIZE(ITEPatch_Files),
+		ITEPatch_Files,
 	},
 
-	// Inherit the earth - Win32 Demo version 2
+	// Inherit the earth - Win32 Demo version 1
+	// Demo version 1 does not have scene substitutes, and can only be distinguished from demo 2/3
+	// from soundsd.rsc and voicesd.rsc
 	{
 		{
 			"ite",
-			"Demo 2",
+			"Demo 1",
 			{
 	{"ited.rsc",		GAME_RESOURCEFILE,	"3a450852cbf3c80773984d565647e6ac", -1},
 	{"scriptsd.rsc",	GAME_SCRIPTFILE,	"3f12b67fa93e56e1a6be39d2921d80bb", -1},
-	{"soundsd.rsc",		GAME_SOUNDFILE,		"95a6c148e22e99a8c243f2978223583c", 2005074},
-	{"voicesd.rsc",		GAME_VOICEFILE,		"e139d86bab2ee8ba3157337f894a92d4", -1},
+	{"soundsd.rsc",		GAME_SOUNDFILE,		"a741139dd7365a13f463cd896ff9969a", -1},
+	{"voicesd.rsc",		GAME_VOICEFILE,		"0759eaf5b64ae19fd429920a70151ad3", -1},
 	{ NULL, 0, NULL, 0}
 			},
 			Common::EN_ANY,
@@ -592,87 +416,87 @@
 			Common::ADGF_DEMO
 		},
 		GType_ITE,
-		GID_ITE_WINDEMO2,
-		GF_WYRMKEEP | GF_CD_FX | GF_SCENE_SUBSTITUTES,
+		GID_ITE_WINDEMO1,
+		GF_WYRMKEEP | GF_CD_FX,
 		ITE_DEFAULT_SCENE,
 		&ITE_Resources,
 		ARRAYSIZE(ITEWINDEMO_GameFonts),
 		ITEWINDEMO_GameFonts,
-		&ITEWINDEMO2_GameVoice,
-		&ITEWINDEMO2_GameSound,
+		&ITEWINDEMO1_GameSound,
+		&ITEWINDEMO1_GameSound,
 		NULL,
-		ARRAYSIZE(ITEWinPatch2_Files),
-		ITEWinPatch2_Files,
+		ARRAYSIZE(ITEPatch_Files),
+		ITEPatch_Files,
 	},
 
-	// Inherit the earth - Win32 Demo version 1
+	// ITE Mac versions ///////////////////////////////////////////////////////////////////////////////////////
+
+	// Inherit the earth - MAC CD Guild version
 	{
 		{
 			"ite",
-			"Demo 1",
+			"CD",
 			{
-	{"ited.rsc",		GAME_RESOURCEFILE,	"3a450852cbf3c80773984d565647e6ac", -1},
-	{"scriptsd.rsc",	GAME_SCRIPTFILE,	"3f12b67fa93e56e1a6be39d2921d80bb", -1},
-	{"soundsd.rsc",		GAME_SOUNDFILE,		"a741139dd7365a13f463cd896ff9969a", -1},
-	{"voicesd.rsc",		GAME_VOICEFILE,		"0759eaf5b64ae19fd429920a70151ad3", -1},
+	{"ite resources.bin",	GAME_RESOURCEFILE | GAME_MACBINARY,	"0bd506aa887bfc7965f695c6bd28237d", -1},
+	{"ite scripts.bin",		GAME_SCRIPTFILE | GAME_MACBINARY,	"af0d7a2588e09ad3ecbc5b474ea238bf", -1},
+	{"ite sounds.bin",		GAME_SOUNDFILE | GAME_MACBINARY,	"441426c6bb2a517f65c7e49b57f7a345", -1},
+	{"ite music.bin",		GAME_MUSICFILE_GM | GAME_MACBINARY,	"c1d20324b7cdf1650e67061b8a93251c", -1},
+	{"ite voices.bin",		GAME_VOICEFILE | GAME_MACBINARY,	"dba92ae7d57e942250fe135609708369", -1},
 	{ NULL, 0, NULL, 0}
 			},
 			Common::EN_ANY,
-			Common::kPlatformWindows,
-			Common::ADGF_DEMO
+			Common::kPlatformMacintosh,
+			Common::ADGF_NO_FLAGS
 		},
 		GType_ITE,
-		GID_ITE_WINDEMO1,
-		GF_WYRMKEEP | GF_CD_FX,
+		GID_ITE_MACCD_G,
+		GF_BIG_ENDIAN_DATA | GF_CD_FX,
 		ITE_DEFAULT_SCENE,
 		&ITE_Resources,
 		ARRAYSIZE(ITEWINDEMO_GameFonts),
 		ITEWINDEMO_GameFonts,
-		&ITEWINDEMO1_GameSound,
-		&ITEWINDEMO1_GameSound,
+		&ITEMACCD_G_GameSound,
+		&ITEMACCD_G_GameSound,
 		NULL,
-		ARRAYSIZE(ITEWinPatch1_Files),
-		ITEWinPatch1_Files,
+		0,
+		NULL,
 	},
 
-	// Inherit the earth - Wyrmkeep combined Windows/Mac/Linux CD
-
-	// version is different from the other Wyrmkeep re-releases in that it does
-	// not have any substitute files. Presumably the ite.rsc file has been
-	// modified to include the Wyrmkeep changes. The resource files are little-
-	// endian, except for the voice file which is big-endian.
+	// Inherit the earth - MAC CD Wyrmkeep version
 	{
 		{
 			"ite",
-			"Multi-OS CD Version",
+			"Wyrmkeep CD",
 			{
-	{"ite.rsc",						GAME_RESOURCEFILE,					"a6433e34b97b15e64fe8214651012db9", -1},
-	{"scripts.rsc",					GAME_SCRIPTFILE,					"a891405405edefc69c9d6c420c868b84", -1},
-	{"sounds.rsc",					GAME_SOUNDFILE,						"e2ccb61c325d6d1ead3be0e731fe29fe", -1},
-	{"inherit the earth voices",	GAME_VOICEFILE | GAME_SWAPENDIAN,	"c14c4c995e7a0d3828e3812a494301b7", -1},
-	{"music.rsc",					GAME_MUSICFILE,						"d6454756517f042f01210458abe8edd4", -1},
+	{"ite.rsc",						GAME_RESOURCEFILE,	"4f7fa11c5175980ed593392838523060", -1},
+	{"scripts.rsc",					GAME_SCRIPTFILE,	"adf1f46c1d0589083996a7060c798ad0", -1},
+	//{"sounds.rsc",					GAME_SOUNDFILE,		"95863b89a0916941f6c5e1789843ba14", -1},
+	//{"inherit the earth voices",	GAME_VOICEFILE,		"c14c4c995e7a0d3828e3812a494301b7", -1},
+	//{"music.rsc",					GAME_MUSICFILE,		"1a91cd60169f367ecb6c6e058d899b2f", -1},
 	{ NULL, 0, NULL, 0}
 			},
 			Common::EN_ANY,
-			Common::kPlatformUnknown,
+			Common::kPlatformMacintosh,
 			Common::ADGF_NO_FLAGS
 		},
 		GType_ITE,
-		GID_ITE_MULTICD,
-		GF_WYRMKEEP | GF_CD_FX,
+		GID_ITE_MACCD,
+		GF_BIG_ENDIAN_DATA | GF_WYRMKEEP | GF_CD_FX,
 		ITE_DEFAULT_SCENE,
 		&ITE_Resources,
-		ARRAYSIZE(ITECD_GameFonts),
-		ITECD_GameFonts,
+		ARRAYSIZE(ITEWINDEMO_GameFonts),
+		ITEWINDEMO_GameFonts,
 		&ITEMACCD_GameSound,
-		&ITECD_GameSound,
+		&ITEMACCD_GameSound,
 		&ITEMACCD_GameMusic,
-		0,
-		NULL,
+		ARRAYSIZE(ITEMacPatch_Files),
+		ITEMacPatch_Files,
 	},
 
-	// Inherit the earth - Wyrmkeep combined Windows/Mac/Linux CD (compressed sound)
+	// ITE CD versions ////////////////////////////////////////////////////////////////////////////////////////
 
+	// Inherit the earth - Wyrmkeep combined Windows/Mac/Linux CD
+
 	// version is different from the other Wyrmkeep re-releases in that it does
 	// not have any substitute files. Presumably the ite.rsc file has been
 	// modified to include the Wyrmkeep changes. The resource files are little-
@@ -684,9 +508,9 @@
 			{
 	{"ite.rsc",						GAME_RESOURCEFILE,					"a6433e34b97b15e64fe8214651012db9", -1},
 	{"scripts.rsc",					GAME_SCRIPTFILE,					"a891405405edefc69c9d6c420c868b84", -1},
-	{"sounds.cmp",					GAME_SOUNDFILE,						NULL, -1},
-	{"inherit the earth voices.cmp",GAME_VOICEFILE | GAME_SWAPENDIAN,	NULL, -1},
-	{"music.cmp",					GAME_MUSICFILE,						NULL, -1},
+	//{"sounds.rsc",					GAME_SOUNDFILE,						"e2ccb61c325d6d1ead3be0e731fe29fe", -1},
+	//{"inherit the earth voices",	GAME_VOICEFILE | GAME_SWAPENDIAN,	"c14c4c995e7a0d3828e3812a494301b7", -1},
+	//{"music.rsc",					GAME_MUSICFILE,						"d6454756517f042f01210458abe8edd4", -1},
 	{ NULL, 0, NULL, 0}
 			},
 			Common::EN_ANY,
@@ -695,7 +519,7 @@
 		},
 		GType_ITE,
 		GID_ITE_MULTICD,
-		GF_WYRMKEEP | GF_CD_FX | GF_COMPRESSED_SOUNDS,
+		GF_WYRMKEEP | GF_CD_FX,
 		ITE_DEFAULT_SCENE,
 		&ITE_Resources,
 		ARRAYSIZE(ITECD_GameFonts),
@@ -707,26 +531,26 @@
 		NULL,
 	},
 
-	// Inherit the earth - Wyrmkeep Linux CD version
+	// Inherit the earth - Windows/Linux/DOS CD version
 	{
 		{
 			"ite",
-			"CD Version",
+			"Windows/Linux/DOS CD Version",
 			{
 	{"ite.rsc",		GAME_RESOURCEFILE,	"8f4315a9bb10ec839253108a032c8b54", -1},
 	{"scripts.rsc",	GAME_SCRIPTFILE,	"a891405405edefc69c9d6c420c868b84", -1},
-	{"sounds.rsc",	GAME_SOUNDFILE,		"e2ccb61c325d6d1ead3be0e731fe29fe", -1},
-	{"voices.rsc",	GAME_VOICEFILE,		"41bb6b95d792dde5196bdb78740895a6", -1},
-	{"music.rsc",	GAME_MUSICFILE,		"d6454756517f042f01210458abe8edd4", -1},
+	//{"sounds.rsc",	GAME_SOUNDFILE,		"e2ccb61c325d6d1ead3be0e731fe29fe", -1},
+	//{"voices.rsc",	GAME_VOICEFILE,		"41bb6b95d792dde5196bdb78740895a6", -1},
+	//{"music.rsc",	GAME_MUSICFILE,		"d6454756517f042f01210458abe8edd4", -1},
 	{ NULL, 0, NULL, 0}
 			},
 			Common::EN_ANY,
-			Common::kPlatformLinux,
+			Common::kPlatformPC,
 			Common::ADGF_NO_FLAGS
 		},
 		GType_ITE,
-		GID_ITE_LINCD,
-		GF_WYRMKEEP | GF_CD_FX,
+		GID_ITE_CD,
+		GF_CD_FX,
 		ITE_DEFAULT_SCENE,
 		&ITE_Resources,
 		ARRAYSIZE(ITECD_GameFonts),
@@ -734,101 +558,10 @@
 		&ITECD_GameSound,
 		&ITECD_GameSound,
 		&ITEMACCD_GameMusic,
-		ARRAYSIZE(ITELinPatch_Files),
-		ITELinPatch_Files,
+		ARRAYSIZE(ITEPatch_Files),
+		ITEPatch_Files,
 	},
 
-	// Inherit the earth - Wyrmkeep Linux CD version (compressed sound)
-	{
-		{
-			"ite",
-			"CD Version",
-			{
-	{"ite.rsc",		GAME_RESOURCEFILE,	"8f4315a9bb10ec839253108a032c8b54", -1},
-	{"scripts.rsc",	GAME_SCRIPTFILE,	"a891405405edefc69c9d6c420c868b84", -1},
-	{"sounds.cmp",	GAME_SOUNDFILE,		NULL, -1},
-	{"voices.cmp",	GAME_VOICEFILE,		NULL, -1},
-	{"music.cmp",	GAME_MUSICFILE,		NULL, -1},
-	{ NULL, 0, NULL, 0}
-			},
-			Common::EN_ANY,
-			Common::kPlatformLinux,
-			Common::ADGF_NO_FLAGS
-		},
-		GType_ITE,
-		GID_ITE_LINCD,
-		GF_WYRMKEEP | GF_CD_FX | GF_COMPRESSED_SOUNDS,
-		ITE_DEFAULT_SCENE,
-		&ITE_Resources,
-		ARRAYSIZE(ITECD_GameFonts),
-		ITECD_GameFonts,
-		&ITECD_GameSound,
-		&ITECD_GameSound,
-		&ITEMACCD_GameMusic,
-		ARRAYSIZE(ITELinPatch_Files),
-		ITELinPatch_Files,
-	},
-
-	// Inherit the earth - Wyrmkeep Windows CD version
-	{
-		{
-			"ite",
-			"CD Version",
-			{
-	{"ite.rsc",		GAME_RESOURCEFILE,	"8f4315a9bb10ec839253108a032c8b54", -1},
-	{"scripts.rsc",	GAME_SCRIPTFILE,	"a891405405edefc69c9d6c420c868b84", -1},
-	{"sounds.rsc",	GAME_SOUNDFILE,		"e2ccb61c325d6d1ead3be0e731fe29fe", -1},
-	{"voices.rsc",	GAME_VOICEFILE,		"41bb6b95d792dde5196bdb78740895a6", -1},
-	{ NULL, 0, NULL, 0}
-			},
-			Common::EN_ANY,
-			Common::kPlatformWindows,
-			Common::ADGF_NO_FLAGS
-		},
-		GType_ITE,
-		GID_ITE_WINCD,
-		GF_WYRMKEEP | GF_CD_FX,
-		ITE_DEFAULT_SCENE,
-		&ITE_Resources,
-		ARRAYSIZE(ITECD_GameFonts),
-		ITECD_GameFonts,
-		&ITECD_GameSound,
-		&ITECD_GameSound,
-		NULL,
-		ARRAYSIZE(ITEWinPatch1_Files),
-		ITEWinPatch1_Files,
-	},
-
-	// Inherit the earth - Wyrmkeep Windows CD version (compressed sound)
-	{
-		{
-			"ite",
-			"CD Version",
-			{
-	{"ite.rsc",		GAME_RESOURCEFILE,	"8f4315a9bb10ec839253108a032c8b54", -1},
-	{"scripts.rsc",	GAME_SCRIPTFILE,	"a891405405edefc69c9d6c420c868b84", -1},
-	{"sounds.cmp",	GAME_SOUNDFILE,		NULL, -1},
-	{"voices.cmp",	GAME_VOICEFILE,		NULL, -1},
-	{ NULL, 0, NULL, 0}
-			},
-			Common::EN_ANY,
-			Common::kPlatformWindows,
-			Common::ADGF_NO_FLAGS
-		},
-		GType_ITE,
-		GID_ITE_WINCD,
-		GF_WYRMKEEP | GF_CD_FX | GF_COMPRESSED_SOUNDS,
-		ITE_DEFAULT_SCENE,
-		&ITE_Resources,
-		ARRAYSIZE(ITECD_GameFonts),
-		ITECD_GameFonts,
-		&ITECD_GameSound,
-		&ITECD_GameSound,
-		NULL,
-		ARRAYSIZE(ITEWinPatch1_Files),
-		ITEWinPatch1_Files,
-	},
-
 	// Inherit the earth - DOS CD version
 	{
 		{
@@ -837,8 +570,8 @@
 			{
 	{"ite.rsc",		GAME_RESOURCEFILE,	"8f4315a9bb10ec839253108a032c8b54", -1},
 	{"scripts.rsc",	GAME_SCRIPTFILE,	"50a0d2d7003c926a3832d503c8534e90", -1},
-	{"sounds.rsc",	GAME_SOUNDFILE,		"e2ccb61c325d6d1ead3be0e731fe29fe", -1},
-	{"voices.rsc",	GAME_VOICEFILE,		"41bb6b95d792dde5196bdb78740895a6", -1},
+	//{"sounds.rsc",	GAME_SOUNDFILE,		"e2ccb61c325d6d1ead3be0e731fe29fe", -1},
+	//{"voices.rsc",	GAME_VOICEFILE,		"41bb6b95d792dde5196bdb78740895a6", -1},
 	{ NULL, 0, NULL, 0}
 			},
 			Common::EN_ANY,
@@ -859,98 +592,6 @@
 		NULL,
 	},
 
-	// Inherit the earth - DOS CD version (compressed sound)
-	{
-		{
-			"ite",
-			"CD Version",
-			{
-	{"ite.rsc",		GAME_RESOURCEFILE,	"8f4315a9bb10ec839253108a032c8b54", -1},
-	{"scripts.rsc",	GAME_SCRIPTFILE,	"50a0d2d7003c926a3832d503c8534e90", -1},
-	{"sounds.cmp",	GAME_SOUNDFILE,		NULL, -1},
-	{"voices.cmp",	GAME_VOICEFILE,		NULL, -1},
-	{ NULL, 0, NULL, 0}
-			},
-			Common::EN_ANY,
-			Common::kPlatformPC,
-			Common::ADGF_NO_FLAGS
-		},
-		GType_ITE,
-		GID_ITE_CD_G,
-		GF_CD_FX | GF_COMPRESSED_SOUNDS,
-		ITE_DEFAULT_SCENE,
-		&ITE_Resources,
-		ARRAYSIZE(ITECD_GameFonts),
-		ITECD_GameFonts,
-		&ITECD_GameSound,
-		&ITECD_GameSound,
-		NULL,
-		0,
-		NULL,
-	},
-
-	// Inherit the earth - DOS CD version with digital music
-	{
-		{
-			"ite",
-			"CD Version",
-			{
-	{"ite.rsc",		GAME_RESOURCEFILE,	"8f4315a9bb10ec839253108a032c8b54", -1},
-	{"scripts.rsc",	GAME_SCRIPTFILE,	"50a0d2d7003c926a3832d503c8534e90", -1},
-	{"sounds.rsc",	GAME_SOUNDFILE,		"e2ccb61c325d6d1ead3be0e731fe29fe", -1},
-	{"voices.rsc",	GAME_VOICEFILE,		"41bb6b95d792dde5196bdb78740895a6", -1},
-	{"music.rsc",	GAME_MUSICFILE,		"d6454756517f042f01210458abe8edd4", -1},
-	{ NULL, 0, NULL, 0}
-			},
-			Common::EN_ANY,
-			Common::kPlatformPC,
-			Common::ADGF_NO_FLAGS
-		},
-		GType_ITE,
-		GID_ITE_CD_G2,
-		GF_CD_FX,
-		ITE_DEFAULT_SCENE,
-		&ITE_Resources,
-		ARRAYSIZE(ITECD_GameFonts),
-		ITECD_GameFonts,
-		&ITECD_GameSound,
-		&ITECD_GameSound,
-		&ITEMACCD_GameMusic,
-		0,
-		NULL,
-	},
-
-	// Inherit the earth - DOS CD version with digital music (compressed sound)
-	{
-		{
-			"ite",
-			"CD Version",
-			{
-	{"ite.rsc",		GAME_RESOURCEFILE,	"8f4315a9bb10ec839253108a032c8b54", -1},
-	{"scripts.rsc",	GAME_SCRIPTFILE,	"50a0d2d7003c926a3832d503c8534e90", -1},
-	{"sounds.cmp",	GAME_SOUNDFILE,		NULL, -1},
-	{"voices.cmp",	GAME_VOICEFILE,		NULL, -1},
-	{"music.cmp",	GAME_MUSICFILE,		NULL, -1},
-	{ NULL, 0, NULL, 0}
-			},
-			Common::EN_ANY,
-			Common::kPlatformPC,
-			Common::ADGF_NO_FLAGS
-		},
-		GType_ITE,
-		GID_ITE_CD_G2,
-		GF_CD_FX | GF_COMPRESSED_SOUNDS,
-		ITE_DEFAULT_SCENE,
-		&ITE_Resources,
-		ARRAYSIZE(ITECD_GameFonts),
-		ITECD_GameFonts,
-		&ITECD_GameSound,
-		&ITECD_GameSound,
-		&ITEMACCD_GameMusic,
-		0,
-		NULL,
-	},
-
 	// Inherit the earth - DOS CD German version
 	// reported by mld. Bestsellergamers cover disk
 	{
@@ -960,8 +601,8 @@
 			{
 	{"ite.rsc",		GAME_RESOURCEFILE,	"869fc23c8f38f575979ec67152914fee", -1},
 	{"scripts.rsc",	GAME_SCRIPTFILE,	"a891405405edefc69c9d6c420c868b84", -1},
-	{"sounds.rsc",	GAME_SOUNDFILE,		"e2ccb61c325d6d1ead3be0e731fe29fe", -1},
-	{"voices.rsc",	GAME_VOICEFILE,		"2fbad5d10b9b60a3415dc4aebbb11718", -1},
+	//{"sounds.rsc",	GAME_SOUNDFILE,		"e2ccb61c325d6d1ead3be0e731fe29fe", -1},
+	//{"voices.rsc",	GAME_VOICEFILE,		"2fbad5d10b9b60a3415dc4aebbb11718", -1},
 	{ NULL, 0, NULL, 0}
 			},
 			Common::DE_DEU,
@@ -982,159 +623,8 @@
 		NULL,
 	},
 
-	// Inherit the earth - DOS CD German version (compressed sound)
-	// reported by mld. Bestsellergamers cover disk
-	{
-		{
-			"ite",
-			"CD Version",
-			{
-	{"ite.rsc",		GAME_RESOURCEFILE,	"869fc23c8f38f575979ec67152914fee", -1},
-	{"scripts.rsc",	GAME_SCRIPTFILE,	"a891405405edefc69c9d6c420c868b84", -1},
-	{"sounds.cmp",	GAME_SOUNDFILE,		NULL, -1},
-	{"voices.cmp",	GAME_VOICEFILE,		NULL, -1},
-	{ NULL, 0, NULL, 0}
-			},
-			Common::DE_DEU,
-			Common::kPlatformPC,
-			Common::ADGF_NO_FLAGS
-		},
-		GType_ITE,
-		GID_ITE_CD_DE,
-		GF_CD_FX | GF_COMPRESSED_SOUNDS,
-		ITE_DEFAULT_SCENE,
-		&ITE_Resources,
-		ARRAYSIZE(ITECD_GameFonts),
-		ITECD_GameFonts,
-		&ITECD_GameSound,
-		&ITECD_GameSound,
-		NULL,
-		0,
-		NULL,
-	},
+	// ITE floppy versions ////////////////////////////////////////////////////////////////////////////////////
 
-	// Inherit the earth - DOS CD German version with digital music
-	{
-		{
-			"ite",
-			"CD Version",
-			{
-	{"ite.rsc",		GAME_RESOURCEFILE,	"869fc23c8f38f575979ec67152914fee", -1},
-	{"scripts.rsc",	GAME_SCRIPTFILE,	"a891405405edefc69c9d6c420c868b84", -1},
-	{"sounds.rsc",	GAME_SOUNDFILE,		"e2ccb61c325d6d1ead3be0e731fe29fe", -1},
-	{"voices.rsc",	GAME_VOICEFILE,		"2fbad5d10b9b60a3415dc4aebbb11718", -1},
-	{"music.rsc",	GAME_MUSICFILE,		"d6454756517f042f01210458abe8edd4", -1},
-	{ NULL, 0, NULL, 0}
-			},
-			Common::DE_DEU,
-			Common::kPlatformPC,
-			Common::ADGF_NO_FLAGS
-		},
-		GType_ITE,
-		GID_ITE_CD_DE2,
-		GF_CD_FX,
-		ITE_DEFAULT_SCENE,
-		&ITE_Resources,
-		ARRAYSIZE(ITECD_GameFonts),
-		ITECD_GameFonts,
-		&ITECD_GameSound,
-		&ITECD_GameSound,
-		&ITEMACCD_GameMusic,
-		0,
-		NULL,
-	},
-
-	// Inherit the earth - DOS CD German version with digital music (compressed sound)
-	{
-		{
-			"ite",
-			"CD Version",
-			{
-	{"ite.rsc",		GAME_RESOURCEFILE,	"869fc23c8f38f575979ec67152914fee", -1},
-	{"scripts.rsc",	GAME_SCRIPTFILE,	"a891405405edefc69c9d6c420c868b84", -1},
-	{"sounds.cmp",	GAME_SOUNDFILE,		NULL, -1},
-	{"voices.cmp",	GAME_VOICEFILE,		NULL, -1},
-	{"music.cmp",	GAME_MUSICFILE,		NULL, -1},
-	{ NULL, 0, NULL, 0}
-			},
-			Common::DE_DEU,
-			Common::kPlatformPC,
-			Common::ADGF_NO_FLAGS
-		},
-		GType_ITE,
-		GID_ITE_CD_DE2,
-		GF_CD_FX | GF_COMPRESSED_SOUNDS,
-		ITE_DEFAULT_SCENE,
-		&ITE_Resources,
-		ARRAYSIZE(ITECD_GameFonts),
-		ITECD_GameFonts,
-		&ITECD_GameSound,
-		&ITECD_GameSound,
-		&ITEMACCD_GameMusic,
-		0,
-		NULL,
-	},
-
-	// Inherit the earth - CD version
-	{
-		{
-			"ite",
-			"CD Version",
-			{
-	{"ite.rsc",		GAME_RESOURCEFILE,	"8f4315a9bb10ec839253108a032c8b54", -1},
-	{"scripts.rsc",	GAME_SCRIPTFILE,	"a891405405edefc69c9d6c420c868b84", -1},
-	{"sounds.rsc",	GAME_SOUNDFILE,		"e2ccb61c325d6d1ead3be0e731fe29fe", -1},
-	{"voices.rsc",	GAME_VOICEFILE,		"41bb6b95d792dde5196bdb78740895a6", -1},
-	{ NULL, 0, NULL, 0}
-			},
-			Common::EN_ANY,
-			Common::kPlatformPC,
-			Common::ADGF_NO_FLAGS
-		},
-		GType_ITE,
-		GID_ITE_CD,
-		GF_CD_FX,
-		ITE_DEFAULT_SCENE,
-		&ITE_Resources,
-		ARRAYSIZE(ITECD_GameFonts),
-		ITECD_GameFonts,
-		&ITECD_GameSound,
-		&ITECD_GameSound,
-		NULL,
-		0,
-		NULL,
-	},
-
-	// Inherit the earth - CD version (compressed sound)
-	{
-		{
-			"ite",
-			"CD Version",
-			{
-	{"ite.rsc",		GAME_RESOURCEFILE,	"8f4315a9bb10ec839253108a032c8b54", -1},
-	{"scripts.rsc",	GAME_SCRIPTFILE,	"a891405405edefc69c9d6c420c868b84", -1},
-	{"sounds.cmp",	GAME_SOUNDFILE,		NULL, -1},
-	{"voices.cmp",	GAME_VOICEFILE,		NULL, -1},
-	{ NULL, 0, NULL, 0}
-			},
-			Common::EN_ANY,
-			Common::kPlatformPC,
-			Common::ADGF_NO_FLAGS
-		},
-		GType_ITE,
-		GID_ITE_CD,
-		GF_CD_FX | GF_COMPRESSED_SOUNDS,
-		ITE_DEFAULT_SCENE,
-		&ITE_Resources,
-		ARRAYSIZE(ITECD_GameFonts),
-		ITECD_GameFonts,
-		&ITECD_GameSound,
-		&ITECD_GameSound,
-		NULL,
-		0,
-		NULL,
-	},
-
 	// Inherit the earth - German Floppy version
 	{
 		{
@@ -1143,7 +633,7 @@
 			{
 	{"ite.rsc",		GAME_RESOURCEFILE,					"869fc23c8f38f575979ec67152914fee", -1},
 	{"scripts.rsc",	GAME_SCRIPTFILE,					"516f7330f8410057b834424ea719d1ef", -1},
-	{"voices.rsc",	GAME_SOUNDFILE | GAME_VOICEFILE,	"0c9113e630f97ef0996b8c3114badb08", -1},
+	//{"voices.rsc",	GAME_SOUNDFILE | GAME_VOICEFILE,	"0c9113e630f97ef0996b8c3114badb08", -1},
 	{ NULL, 0, NULL, 0}
 			},
 			Common::DE_DEU,
@@ -1164,95 +654,6 @@
 		NULL,
 	},
 
-	// Inherit the earth - German Floppy version (compressed sound)
-	{
-		{
-			"ite",
-			"Floppy",
-			{
-	{"ite.rsc",		GAME_RESOURCEFILE,					"869fc23c8f38f575979ec67152914fee", -1},
-	{"scripts.rsc",	GAME_SCRIPTFILE,					"516f7330f8410057b834424ea719d1ef", -1},
-	{"voices.cmp",	GAME_SOUNDFILE | GAME_VOICEFILE,	NULL, -1},
-	{ NULL, 0, NULL, 0}
-			},
-			Common::DE_DEU,
-			Common::kPlatformPC,
-			Common::ADGF_NO_FLAGS
-		},
-		GType_ITE,
-		GID_ITE_DISK_DE,
-		GF_COMPRESSED_SOUNDS,
-		ITE_DEFAULT_SCENE,
-		&ITE_Resources,
-		ARRAYSIZE(ITEDISK_GameFonts),
-		ITEDISK_GameFonts,
-		&ITEDISK_GameSound,
-		&ITEDISK_GameSound,
-		NULL,
-		0,
-		NULL,
-	},
-
-	// Inherit the earth - German Floppy version with digital music
-	{
-		{
-			"ite",
-			"Floppy",
-			{
-	{"ite.rsc",		GAME_RESOURCEFILE,					"869fc23c8f38f575979ec67152914fee", -1},
-	{"scripts.rsc",	GAME_SCRIPTFILE,					"516f7330f8410057b834424ea719d1ef", -1},
-	{"voices.rsc",	GAME_SOUNDFILE | GAME_VOICEFILE,	"0c9113e630f97ef0996b8c3114badb08", -1},
-	{"music.rsc",	GAME_MUSICFILE,						"d6454756517f042f01210458abe8edd4", -1},
-	{ NULL, 0, NULL, 0}
-			},
-			Common::DE_DEU,
-			Common::kPlatformPC,
-			Common::ADGF_NO_FLAGS
-		},
-		GType_ITE,
-		GID_ITE_DISK_DE2,
-		0,
-		ITE_DEFAULT_SCENE,
-		&ITE_Resources,
-		ARRAYSIZE(ITEDISK_GameFonts),
-		ITEDISK_GameFonts,
-		&ITEDISK_GameSound,
-		&ITEDISK_GameSound,
-		&ITEMACCD_GameMusic,
-		0,
-		NULL,
-	},
-
-	// Inherit the earth - German Floppy version with digital music (compressed sound)
-	{
-		{
-			"ite",
-			"Floppy",
-			{
-	{"ite.rsc",		GAME_RESOURCEFILE,					"869fc23c8f38f575979ec67152914fee", -1},
-	{"scripts.rsc",	GAME_SCRIPTFILE,					"516f7330f8410057b834424ea719d1ef", -1},
-	{"voices.cmp",	GAME_SOUNDFILE | GAME_VOICEFILE,	NULL, -1},
-	{"music.cmp",	GAME_MUSICFILE,						NULL, -1},
-	{ NULL, 0, NULL, 0}
-			},
-			Common::DE_DEU,
-			Common::kPlatformPC,
-			Common::ADGF_NO_FLAGS
-		},
-		GType_ITE,
-		GID_ITE_DISK_DE2,
-		GF_COMPRESSED_SOUNDS,
-		ITE_DEFAULT_SCENE,
-		&ITE_Resources,
-		ARRAYSIZE(ITEDISK_GameFonts),
-		ITEDISK_GameFonts,
-		&ITEDISK_GameSound,
-		&ITEDISK_GameSound,
-		&ITEMACCD_GameMusic,
-		0,
-		NULL,
-	},
-
 	// Inherit the earth - Disk version
 	{
 		{
@@ -1261,7 +662,7 @@
 			{
 	{"ite.rsc",		GAME_RESOURCEFILE,					"8f4315a9bb10ec839253108a032c8b54", -1},
 	{"scripts.rsc",	GAME_SCRIPTFILE,					"516f7330f8410057b834424ea719d1ef", -1},
-	{"voices.rsc",	GAME_SOUNDFILE | GAME_VOICEFILE,	"c46e4392fcd2e89bc91e5567db33b62d", -1},
+	//{"voices.rsc",	GAME_SOUNDFILE | GAME_VOICEFILE,	"c46e4392fcd2e89bc91e5567db33b62d", -1},
 	{ NULL, 0, NULL, 0}
 			},
 			Common::EN_ANY,
@@ -1282,95 +683,8 @@
 		NULL,
 	},
 
-	// Inherit the earth - Disk version (compressed sound)
-	{
-		{
-			"ite",
-			"Floppy",
-			{
-	{"ite.rsc",		GAME_RESOURCEFILE,					"8f4315a9bb10ec839253108a032c8b54", -1},
-	{"scripts.rsc",	GAME_SCRIPTFILE,					"516f7330f8410057b834424ea719d1ef", -1},
-	{"voices.cmp",	GAME_SOUNDFILE | GAME_VOICEFILE,	NULL, -1},
-	{ NULL, 0, NULL, 0}
-			},
-			Common::EN_ANY,
-			Common::kPlatformPC,
-			Common::ADGF_NO_FLAGS
-		},
-		GType_ITE,
-		GID_ITE_DISK_G,
-		GF_COMPRESSED_SOUNDS,
-		ITE_DEFAULT_SCENE,
-		&ITE_Resources,
-		ARRAYSIZE(ITEDISK_GameFonts),
-		ITEDISK_GameFonts,
-		&ITEDISK_GameSound,
-		&ITEDISK_GameSound,
-		NULL,
-		0,
-		NULL,
-	},
+	// IHNM Section ///////////////////////////////////////////////////////////////////////////////////////////
 
-	// Inherit the earth - Disk version with digital music
-	{
-		{
-			"ite",
-			"Floppy",
-			{
-	{"ite.rsc",		GAME_RESOURCEFILE,					"8f4315a9bb10ec839253108a032c8b54", -1},
-	{"scripts.rsc",	GAME_SCRIPTFILE,					"516f7330f8410057b834424ea719d1ef", -1},
-	{"voices.rsc",	GAME_SOUNDFILE | GAME_VOICEFILE,	"c46e4392fcd2e89bc91e5567db33b62d", -1},
-	{"music.rsc",	GAME_MUSICFILE,						"d6454756517f042f01210458abe8edd4", -1},
-	{ NULL, 0, NULL, 0}
-			},
-			Common::EN_ANY,
-			Common::kPlatformPC,
-			Common::ADGF_NO_FLAGS
-		},
-		GType_ITE,
-		GID_ITE_DISK_G2,
-		0,
-		ITE_DEFAULT_SCENE,
-		&ITE_Resources,
-		ARRAYSIZE(ITEDISK_GameFonts),
-		ITEDISK_GameFonts,
-		&ITEDISK_GameSound,
-		&ITEDISK_GameSound,
-		&ITEMACCD_GameMusic,
-		0,
-		NULL,
-	},
-
-	// Inherit the earth - Disk version with digital music (compressed sound)
-	{
-		{
-			"ite",
-			"Floppy",
-			{
-	{"ite.rsc",		GAME_RESOURCEFILE,					"8f4315a9bb10ec839253108a032c8b54", -1},
-	{"scripts.rsc",	GAME_SCRIPTFILE,					"516f7330f8410057b834424ea719d1ef", -1},
-	{"voices.cmp",	GAME_SOUNDFILE | GAME_VOICEFILE,	NULL, -1},
-	{"music.cmp",	GAME_MUSICFILE,						NULL, -1},
-	{ NULL, 0, NULL, 0}
-			},
-			Common::EN_ANY,
-			Common::kPlatformPC,
-			Common::ADGF_NO_FLAGS
-		},
-		GType_ITE,
-		GID_ITE_DISK_G2,
-		GF_COMPRESSED_SOUNDS,
-		ITE_DEFAULT_SCENE,
-		&ITE_Resources,
-		ARRAYSIZE(ITEDISK_GameFonts),
-		ITEDISK_GameFonts,
-		&ITEDISK_GameSound,
-		&ITEDISK_GameSound,
-		&ITEMACCD_GameMusic,
-		0,
-		NULL,
-	},
-
 	// I Have No Mouth And I Must Scream - Demo version
 	{
 		{

Modified: scummvm/trunk/engines/saga/rscfile.cpp
===================================================================
--- scummvm/trunk/engines/saga/rscfile.cpp	2007-07-13 16:30:04 UTC (rev 28057)
+++ scummvm/trunk/engines/saga/rscfile.cpp	2007-07-13 16:37:37 UTC (rev 28058)
@@ -343,18 +343,136 @@
 bool Resource::createContexts() {
 	int i;
 	ResourceContext *context;
+	char musicFileName[256];
+	char soundFileName[256];
+	char voicesFileName[256];
+	int soundFileIndex = 0;
+	int voicesFileIndex = 0;
+	bool digitalMusic = false;
+	bool soundFileInArray = false;
+	bool voicesFileInArray = false;
+	uint16 voiceFileType = GAME_VOICEFILE;
 
 	_contextsCount = 0;
-	for (i = 0; _vm->getFilesDescriptions()[i].fileName; i++)
+	for (i = 0; _vm->getFilesDescriptions()[i].fileName; i++) {
 		_contextsCount++;
+		if (_vm->getFilesDescriptions()[i].fileType == GAME_SOUNDFILE)
+			soundFileInArray = true;
+		if (_vm->getFilesDescriptions()[i].fileType == GAME_VOICEFILE)
+			voicesFileInArray = true;
+	}
 
+	if (_vm->getGameType() == GType_ITE) {
+		if (!soundFileInArray) {
+			// If the sound file is not specified in the detector table, add it here
+			if (Common::File::exists("sounds.rsc") || Common::File::exists("sounds.cmp")) {
+				_contextsCount++;
+				soundFileIndex = _contextsCount - 1;
+				if (_vm->getFeatures() & GF_COMPRESSED_SOUNDS)
+					sprintf(soundFileName, "sounds.cmp");
+				else
+					sprintf(soundFileName, "sounds.rsc");
+			} else if (Common::File::exists("soundsd.rsc") || Common::File::exists("soundsd.cmp")) {
+				_contextsCount++;
+				soundFileIndex = _contextsCount - 1;
+				if (_vm->getFeatures() & GF_COMPRESSED_SOUNDS)
+					sprintf(soundFileName, "soundsd.cmp");
+				else
+					sprintf(soundFileName, "soundsd.rsc");
+			} else {
+				// No sound file found, don't add any file to the array
+				soundFileInArray = true;
+				// ITE floppy versions have both voices and sounds in voices.rsc
+				voiceFileType = GAME_SOUNDFILE | GAME_VOICEFILE;
+			}
+		}
+
+		if (!voicesFileInArray) {
+			// If the voices file is not specified in the detector table, add it here
+			if (Common::File::exists("voices.rsc") || Common::File::exists("voices.cmp")) {
+				_contextsCount++;
+				voicesFileIndex = _contextsCount - 1;
+				if (_vm->getFeatures() & GF_COMPRESSED_SOUNDS)
+					sprintf(voicesFileName, "voices.cmp");
+				else
+					sprintf(voicesFileName, "voices.rsc");
+			} else if (Common::File::exists("voicesd.rsc") || Common::File::exists("voicesd.cmp")) {
+				_contextsCount++;
+				voicesFileIndex = _contextsCount - 1;
+				if (_vm->getFeatures() & GF_COMPRESSED_SOUNDS)
+					sprintf(voicesFileName, "voicesd.cmp");
+				else
+					sprintf(voicesFileName, "voicesd.rsc");
+			} else if (Common::File::exists("inherit the earth voices") || 
+					   Common::File::exists("inherit the earth voices.cmp")) {
+				_contextsCount++;
+				voicesFileIndex = _contextsCount - 1;
+				if (_vm->getFeatures() & GF_COMPRESSED_SOUNDS)
+					sprintf(voicesFileName, "inherit the earth voices.cmp");
+				else
+					sprintf(voicesFileName, "inherit the earth voices");
+
+				// The resources in the Wyrmkeep combined Windows/Mac/Linux CD version are little endian, but
+				// the voice file is big endian. If we got such a version with mixed files, mark this voice file
+				// as big endian
+				if (!_vm->isBigEndian())
+					voiceFileType = GAME_VOICEFILE | GAME_SWAPENDIAN;	// This file is big endian
+			} else {
+				// No voice file found, don't add any file to the array
+				voicesFileInArray = true;
+			}
+		}
+
+		// Check for digital music in ITE
+		if (Common::File::exists("music.rsc") || Common::File::exists("music.cmp")) {
+			_contextsCount++;
+			digitalMusic = true;
+			if (_vm->getFeatures() & GF_COMPRESSED_SOUNDS)
+				sprintf(musicFileName, "music.cmp");
+			else
+				sprintf(musicFileName, "music.rsc");
+		} else if (Common::File::exists("musicd.rsc") || Common::File::exists("musicd.cmp")) {
+			_contextsCount++;
+			digitalMusic = true;
+			if (_vm->getFeatures() & GF_COMPRESSED_SOUNDS)
+				sprintf(musicFileName, "musicd.cmp");
+			else
+				sprintf(musicFileName, "musicd.rsc");
+		} else {
+			digitalMusic = false;
+		}
+	}
+
 	_contexts = (ResourceContext*)calloc(_contextsCount, sizeof(*_contexts));
 
 	for (i = 0; i < _contextsCount; i++) {
 		context = &_contexts[i];
 		context->file = new Common::File();
-		context->fileName = _vm->getFilesDescriptions()[i].fileName;
-		context->fileType = _vm->getFilesDescriptions()[i].fileType;
+
+		// For ITE, add the digital music file and sfx file information here
+		if (_vm->getGameType() == GType_ITE && digitalMusic && i == _contextsCount - 1) {
+			if (_vm->getFeatures() & GF_COMPRESSED_SOUNDS)
+				context->fileName = musicFileName;
+			else
+				context->fileName = musicFileName;
+			context->fileType = GAME_MUSICFILE;
+		} else if (_vm->getGameType() == GType_ITE && !soundFileInArray && i == soundFileIndex) {
+			if (_vm->getFeatures() & GF_COMPRESSED_SOUNDS)
+				context->fileName = soundFileName;
+			else
+				context->fileName = soundFileName;
+			context->fileType = GAME_SOUNDFILE;	
+		} else if (_vm->getGameType() == GType_ITE && !voicesFileInArray && i == voicesFileIndex) {
+			if (_vm->getFeatures() & GF_COMPRESSED_SOUNDS)
+				context->fileName = voicesFileName;
+			else
+				context->fileName = voicesFileName;
+			// can be GAME_VOICEFILE or GAME_SOUNDFILE | GAME_VOICEFILE or GAME_VOICEFILE | GAME_SWAPENDIAN
+			context->fileType = voiceFileType;
+		} else {
+			context->fileName = _vm->getFilesDescriptions()[i].fileName;
+			context->fileType = _vm->getFilesDescriptions()[i].fileType;
+		}
 		context->serial = 0;
 
 		// IHNM has serveral different voice files, so we need to allow

Modified: scummvm/trunk/engines/saga/saga.cpp
===================================================================
--- scummvm/trunk/engines/saga/saga.cpp	2007-07-13 16:30:04 UTC (rev 28057)
+++ scummvm/trunk/engines/saga/saga.cpp	2007-07-13 16:37:37 UTC (rev 28058)
@@ -107,7 +107,6 @@
 	// Mac CD Wyrmkeep
 	Common::File::addDefaultDirectory(_gameDataPath + "patch/");
 
-
 	// Setup mixer
 	if (!_mixer->isReady()) {
 		warning("Sound initialization failed.");
@@ -150,6 +149,8 @@
 	_subtitlesEnabled = ConfMan.getBool("subtitles");
 	_readingSpeed = getTalkspeed();
 	_copyProtection = ConfMan.getBool("copy_protection");
+	_gf_wyrmkeep = false;
+	_gf_compressed_sounds = false;
 
 	if (_readingSpeed > 3)
 		_readingSpeed = 0;

Modified: scummvm/trunk/engines/saga/saga.h
===================================================================
--- scummvm/trunk/engines/saga/saga.h	2007-07-13 16:30:04 UTC (rev 28057)
+++ scummvm/trunk/engines/saga/saga.h	2007-07-13 16:37:37 UTC (rev 28058)
@@ -527,6 +527,8 @@
 	int _readingSpeed;
 
 	bool _copyProtection;
+	bool _gf_wyrmkeep;
+	bool _gf_compressed_sounds;
 
 	SndRes *_sndRes;
 	Sound *_sound;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list