[Scummvm-cvs-logs] SF.net SVN: scummvm:[44162] scummvm/trunk/tools/create_kyradat

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Thu Sep 17 17:59:46 CEST 2009


Revision: 44162
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44162&view=rev
Author:   lordhoto
Date:     2009-09-17 15:59:45 +0000 (Thu, 17 Sep 2009)

Log Message:
-----------
Further cleanup of special id use.

Modified Paths:
--------------
    scummvm/trunk/tools/create_kyradat/create_kyradat.cpp
    scummvm/trunk/tools/create_kyradat/create_kyradat.h
    scummvm/trunk/tools/create_kyradat/extract.cpp
    scummvm/trunk/tools/create_kyradat/games.cpp

Modified: scummvm/trunk/tools/create_kyradat/create_kyradat.cpp
===================================================================
--- scummvm/trunk/tools/create_kyradat/create_kyradat.cpp	2009-09-17 14:54:11 UTC (rev 44161)
+++ scummvm/trunk/tools/create_kyradat/create_kyradat.cpp	2009-09-17 15:59:45 UTC (rev 44162)
@@ -322,13 +322,8 @@
 	{ kTalkieFile1, "CD" },
 	{ kTalkieFile2, "CD" },
 
-	{ k2CDDemoE, "CD" },
-	{ k2CDDemoF, "CD" },
-	{ k2CDDemoG, "CD" },
+	{ k2CDDemo, "CD" },
 
-	{ k2DemoVersion, "DEM" },
-	{ k2DemoLol, "DEM" },
-
 	{ -1, 0 }
 };
 
@@ -371,10 +366,9 @@
 	uint32 features = 0;
 
 	if (g->special == kTalkieVersion || g->special == kTalkieFile1 || g->special == kTalkieFile2
-			|| g->special == k2CDDemoE || g->special == k2CDDemoF || g->special == k2CDDemoG
-			|| g->game == kKyra3)
+			|| g->special == k2CDDemo || g->game == kKyra3)
 		features |= GF_TALKIE;
-	else if (g->special == kDemoVersion || g->special == k2DemoVersion || g->special == k2DemoLol)
+	else if (g->special == kDemoVersion)
 		features |= GF_DEMO;
 	else if (g->special == kDemoCDVersion)
 		features |= (GF_DEMO | GF_TALKIE);

Modified: scummvm/trunk/tools/create_kyradat/create_kyradat.h
===================================================================
--- scummvm/trunk/tools/create_kyradat/create_kyradat.h	2009-09-17 14:54:11 UTC (rev 44161)
+++ scummvm/trunk/tools/create_kyradat/create_kyradat.h	2009-09-17 15:59:45 UTC (rev 44162)
@@ -285,24 +285,14 @@
 	kTalkieVersion = 0,
 	kDemoVersion,
 
-	k2CDDemoE,
-	k2CDDemoF,
-	k2CDDemoG,
-
 	kFile1,
 	kFile2,
 	kTalkieFile1,
 	kTalkieFile2,
 
-	k2FloppyFile1,
-	k2FloppyFile2,
+	k2DemoVersionTlk,
+	k2CDDemo,
 
-	k2DemoVersion,
-	k2DemoVersionTlkE,
-	k2DemoVersionTlkF,
-	k2DemoVersionTlkG,
-	k2DemoLol,
-
 	// special case for Kyrandia 1 CD demo
 	kDemoCDVersion
 };

Modified: scummvm/trunk/tools/create_kyradat/extract.cpp
===================================================================
--- scummvm/trunk/tools/create_kyradat/extract.cpp	2009-09-17 14:54:11 UTC (rev 44161)
+++ scummvm/trunk/tools/create_kyradat/extract.cpp	2009-09-17 15:59:45 UTC (rev 44162)
@@ -172,9 +172,7 @@
 			fmtPatch = 2;
 		else if (id == k2SeqplayStrings)
 			fmtPatch = 3;
-	}
-
-	if (g->special == k2FloppyFile2) {
+	} else if (g->platform == kPlatformPC && g->special == kFile2) {
 		if (id == k2IngamePakFiles)
 			fmtPatch = 4;
 	}
@@ -446,7 +444,7 @@
 		const byte *ptr = data;
 		hdout++;
 
-		const byte * endOffs = (const byte *)(data + size);
+		const byte *endOffs = (const byte *)(data + size);
 
 		// detect sequence structs
 		while (ptr < endOffs) {
@@ -459,7 +457,7 @@
 			int v = extractHofSeqData_isSequence(ptr, g, endOffs - ptr);
 
 			if (cycle == 0 && v == 1) {
-				if ((g->special == k2FloppyFile1 && *ptr == 5) || (g->special == k2DemoVersion && (ptr - data == 312))) {
+				if ((g->platform == kPlatformPC && g->special == kFile1 && *ptr == 5) || (g->special == kDemoVersion && (ptr - data == 312))) {
 					// patch for floppy version: skips invalid ferb sequence
 					// patch for demo: skips invalid title sequence
 					ptr += 54;
@@ -516,7 +514,7 @@
 
 					ctrSize = (uint16)(ptr - ctrStart);
 
-					if (g->special != k2DemoVersion &&
+					if (g->special != kDemoVersion &&
 						extractHofSeqData_isControl(ctrStart, ctrSize)) {
 						controlOffs = (uint16) (output - buffer);
 						*output++ = ctrSize >> 2;
@@ -567,11 +565,11 @@
 					controlOffs = 0;
 
 				WRITE_BE_UINT16(output, controlOffs);
-				if (g->special != k2DemoVersion && g->special != k2DemoLol)
+				if (g->special != kDemoVersion)
 					ptr += 4;
 				output += 2;
 
-				if (g->special != k2DemoVersion && g->special != k2DemoLol) {
+				if (g->special != kDemoVersion) {
 					for (int w = 0; w < 2; w++) { //startupCommand, finalCommand
 						WRITE_BE_UINT16(output, READ_LE_UINT16(ptr));
 						ptr += 2;

Modified: scummvm/trunk/tools/create_kyradat/games.cpp
===================================================================
--- scummvm/trunk/tools/create_kyradat/games.cpp	2009-09-17 14:54:11 UTC (rev 44161)
+++ scummvm/trunk/tools/create_kyradat/games.cpp	2009-09-17 15:59:45 UTC (rev 44162)
@@ -56,20 +56,20 @@
 
 const Game kyra2Games[] = {
 	// demos
-	{ kKyra2, EN_ANY, kPlatformPC, k2DemoVersion, "a620a37579dd44ab0403482285e3897f" },
-	{ kKyra2, EN_ANY, kPlatformPC, k2CDDemoE, "fa54d8abfe05f9186c05f7de7eaf1480" },
-	{ kKyra2, FR_FRA, kPlatformPC, k2CDDemoF, "fa54d8abfe05f9186c05f7de7eaf1480" },
-	{ kKyra2, DE_DEU, kPlatformPC, k2CDDemoG, "fa54d8abfe05f9186c05f7de7eaf1480" },
+	{ kKyra2, EN_ANY, kPlatformPC, kDemoVersion, "a620a37579dd44ab0403482285e3897f" },
+	{ kKyra2, EN_ANY, kPlatformPC, k2CDDemo, "fa54d8abfe05f9186c05f7de7eaf1480" },
+	{ kKyra2, FR_FRA, kPlatformPC, k2CDDemo, "fa54d8abfe05f9186c05f7de7eaf1480" },
+	{ kKyra2, DE_DEU, kPlatformPC, k2CDDemo, "fa54d8abfe05f9186c05f7de7eaf1480" },
 
 	// floppy games
-	{ kKyra2, EN_ANY, kPlatformPC, k2FloppyFile1, "9b0f5e57b5a2ed88b5b989cbb402b6c7" },
-	{ kKyra2, FR_FRA, kPlatformPC, k2FloppyFile1, "df31cc9e37e1cf68df2fdc75ddf2d87b" },
-	{ kKyra2, DE_DEU, kPlatformPC, k2FloppyFile1, "0ca4f9a1438264a4c63c3218e064ed3b" },
-	{ kKyra2, IT_ITA, kPlatformPC, k2FloppyFile1, "178d3ab913f61bfba21d2fb196405e8c" },
-	{ kKyra2, EN_ANY, kPlatformPC, k2FloppyFile2, "7c3eadbe5122722cf2e5e1611e19dfb9" },
-	{ kKyra2, FR_FRA, kPlatformPC, k2FloppyFile2, "fc2c6782778e6c6d5a553d1cb73c98ad" },
-	{ kKyra2, DE_DEU, kPlatformPC, k2FloppyFile2, "0d9b0eb7b0ad889ec942d74d80dde1bf" },
-	{ kKyra2, IT_ITA, kPlatformPC, k2FloppyFile2, "3a61ed6b7c00ddae383a0361799e2ba6" },
+	{ kKyra2, EN_ANY, kPlatformPC, kFile1, "9b0f5e57b5a2ed88b5b989cbb402b6c7" },
+	{ kKyra2, FR_FRA, kPlatformPC, kFile1, "df31cc9e37e1cf68df2fdc75ddf2d87b" },
+	{ kKyra2, DE_DEU, kPlatformPC, kFile1, "0ca4f9a1438264a4c63c3218e064ed3b" },
+	{ kKyra2, IT_ITA, kPlatformPC, kFile1, "178d3ab913f61bfba21d2fb196405e8c" },
+	{ kKyra2, EN_ANY, kPlatformPC, kFile2, "7c3eadbe5122722cf2e5e1611e19dfb9" },
+	{ kKyra2, FR_FRA, kPlatformPC, kFile2, "fc2c6782778e6c6d5a553d1cb73c98ad" },
+	{ kKyra2, DE_DEU, kPlatformPC, kFile2, "0d9b0eb7b0ad889ec942d74d80dde1bf" },
+	{ kKyra2, IT_ITA, kPlatformPC, kFile2, "3a61ed6b7c00ddae383a0361799e2ba6" },
 
 	// talkie games
 	{ kKyra2, EN_ANY, kPlatformPC, kTalkieFile1, "85bbc1cc6c4cef6ad31fc6ee79518efb" },
@@ -98,7 +98,7 @@
 
 const Game lolGames[] = {
 	// DOS demo
-	{ kLol, EN_ANY, kPlatformPC, k2DemoLol, "30bb5af87d38adb47d3e6ce06b1cb042" },
+	{ kLol, EN_ANY, kPlatformPC, kDemoVersion, "30bb5af87d38adb47d3e6ce06b1cb042" },
 
 	// DOS floppy (no language specifc strings)
 	{ kLol, DE_DEU, kPlatformPC, -1, "6b843869772c1b779e1386be868c15dd" },
@@ -772,26 +772,22 @@
 
 	{ kKyra1, kPlatformPC, kDemoCDVersion, kyra1DemoCDNeed },
 
-	{ kKyra2, kPlatformPC, k2FloppyFile1, kyra2FloppyFile1Need },
-	{ kKyra2, kPlatformPC, k2FloppyFile2, kyra2FloppyFile2Need },
+	{ kKyra2, kPlatformPC, kFile1, kyra2FloppyFile1Need },
+	{ kKyra2, kPlatformPC, kFile2, kyra2FloppyFile2Need },
 
 	{ kKyra2, kPlatformPC, kTalkieFile1, kyra2CDFile1Need },
 	{ kKyra2, kPlatformPC, kTalkieFile2, kyra2CDFile2Need },
 
-	{ kKyra2, kPlatformPC, k2CDDemoE, kyra2CDDemoNeed },
-	{ kKyra2, kPlatformPC, k2CDDemoF, kyra2CDDemoNeed },
-	{ kKyra2, kPlatformPC, k2CDDemoG, kyra2CDDemoNeed },
+	{ kKyra2, kPlatformPC, k2CDDemo, kyra2CDDemoNeed },
 
 	{ kKyra2, kPlatformFMTowns, kFile1, kyra2TownsFile1Need },
 	{ kKyra2, kPlatformFMTowns, kFile2, kyra2TownsFile2Need },
 
-	{ kKyra2, kPlatformPC, k2DemoVersion, kyra2DemoNeed },
+	{ kKyra2, kPlatformPC, kDemoVersion, kyra2DemoNeed },
 
-	{ kKyra2, kPlatformPC, k2DemoVersionTlkE, kyra2TlkDemoNeed },
-	{ kKyra2, kPlatformPC, k2DemoVersionTlkF, kyra2TlkDemoNeed },
-	{ kKyra2, kPlatformPC, k2DemoVersionTlkG, kyra2TlkDemoNeed },
+	{ kKyra2, kPlatformPC, k2DemoVersionTlk, kyra2TlkDemoNeed },
 
-	{ kLol, kPlatformPC, k2DemoLol, lolDemoNeed },
+	{ kLol, kPlatformPC, kDemoVersion, lolDemoNeed },
 
 	{ kKyra3, kPlatformPC, -1, kyra3Need },
 


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