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

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Sun Jan 27 03:06:59 CET 2008


Revision: 30646
          http://scummvm.svn.sourceforge.net/scummvm/?rev=30646&view=rev
Author:   lordhoto
Date:     2008-01-26 18:06:59 -0800 (Sat, 26 Jan 2008)

Log Message:
-----------
Commit patch #1870149 "KYRA: kyradat tool update (hof ingame sfx)". (slightly modified)

Modified Paths:
--------------
    scummvm/trunk/tools/create_kyradat/create_kyradat.cpp
    scummvm/trunk/tools/create_kyradat/create_kyradat.h
    scummvm/trunk/tools/create_kyradat/hof_cd.h
    scummvm/trunk/tools/create_kyradat/hof_floppy.h
    scummvm/trunk/tools/create_kyradat/hof_towns.h
    scummvm/trunk/tools/create_kyradat/misc.h

Modified: scummvm/trunk/tools/create_kyradat/create_kyradat.cpp
===================================================================
--- scummvm/trunk/tools/create_kyradat/create_kyradat.cpp	2008-01-27 02:05:37 UTC (rev 30645)
+++ scummvm/trunk/tools/create_kyradat/create_kyradat.cpp	2008-01-27 02:06:59 UTC (rev 30646)
@@ -31,7 +31,7 @@
 #include "md5.h"
 
 enum {
-	kKyraDatVersion = 18,
+	kKyraDatVersion = 19,
 	kIndexSize = 12
 };
 
@@ -199,6 +199,7 @@
 	// Sequence Player
 	{ k2SeqplayPakFiles, kTypeStringList, "S_PAKFILES.TXT" },
 	{ k2SeqplayCredits, kTypeRawData, "S_CREDITS.TXT" },
+	{ k2SeqplayCreditsSpecial, kTypeStringList, "S_CREDITS2.TXT" },
 	{ k2SeqplayStrings, kTypeLanguageList, "S_STRINGS" },
 	{ k2SeqplaySfxFiles, kTypeStringList, "S_SFXFILES.TXT" },
 	{ k2SeqplayTlkFiles, kTypeLanguageList, "S_TLKFILES" },
@@ -210,6 +211,8 @@
 
 	// Ingame
 	{ k2IngamePakFiles, kTypeStringList, "I_PAKFILES.TXT" },
+	{ k2IngameSfxFiles, kTypeStringList, "I_SFXFILES.TXT" },
+	{ k2IngameSfxIndex, kTypeRawData, "I_SFXINDEX.TRA" },	
 	{ k2IngameTracks, kTypeStringList, "I_TRACKS.TRA" },
 	{ k2IngameCDA, kTypeRawData, "I_TRACKS.CDA" },
 
@@ -372,7 +375,7 @@
 
 			if (g->special == kFMTownsVersionE || g->special == kFMTownsVersionJ ||
 				g->special == k2TownsFile1E || g->special == k2TownsFile1J ||
-				g->special == k2TownsFile2E || g->special == k2TownsFile2J) {
+				g->special == k2TownsFile2E || g->special == k2TownsFile2J || fmtPatch == 5) {
 				// prevents creation of empty entries (which we have mostly between all strings in the fm-towns version)
 				while (!data[++i]) {
 					if (i == size)
@@ -429,7 +432,7 @@
 	WRITE_BE_UINT32(output, entries); output += 4;
 	if (g->special == kFMTownsVersionE || g->special == kFMTownsVersionJ ||
 		g->special == k2TownsFile1E || g->special == k2TownsFile1J ||
-		g->special == k2TownsFile2E || g->special == k2TownsFile2J) {
+		g->special == k2TownsFile2E || g->special == k2TownsFile2J || fmtPatch == 5) {
 		const byte * c = data + size;
 		do {
 			if (fmtPatch == 2 && input - data == 0x3C0 && input[0x10] == 0x32) {
@@ -580,9 +583,9 @@
 			int v = extractHofSeqData_isSequence(ptr, g, endOffs - ptr);
 
 			if (cycle == 0 && v == 1) {
-				if (g->special == k2FloppyFile1 && *ptr == 5) {
-					// patch for floppy version
-					// skips invalid ferb sequence
+				if ((g->special == k2FloppyFile1 && *ptr == 5) || (g->special == k2DemoVersion && (ptr - data == 312))) {
+					// patch for floppy version: skips invalid ferb sequence
+					// patch for demo: skips invalid title sequence
 					ptr += 54;
 					continue;
 				}
@@ -815,12 +818,12 @@
 	// return values: 1 = possible frame control data; 0 = definitely not frame control data
 
 	const uint8 *s = (const uint8*)ptr;
-	for (uint i = 2; i < size; i += 4) {
+	for (uint32 i = 2; i < size; i += 4) {
 		if (!s[i])
 			return 0;
 	}
 
-	for (uint i = 1; i < size; i += 2) {
+	for (uint32 i = 1; i < size; i += 2) {
 		if (s[i])
 			return 0;
 	}
@@ -1090,6 +1093,11 @@
 			if (i->id == k2IngamePakFiles)
 				patch = 4;
 		}
+
+		if (g->special == k2FloppyFile2 || g->special == k2CDFile2E) {
+			if (i->id == k2IngameSfxFiles)
+				patch = 5;
+		}		
 		
 		if (!tDesc->extract(out, g, data + i->startOff, i->endOff - i->startOff, filename, patch)) {
 			fprintf(stderr, "ERROR: couldn't extract id %d\n", i->id);

Modified: scummvm/trunk/tools/create_kyradat/create_kyradat.h
===================================================================
--- scummvm/trunk/tools/create_kyradat/create_kyradat.h	2008-01-27 02:05:37 UTC (rev 30645)
+++ scummvm/trunk/tools/create_kyradat/create_kyradat.h	2008-01-27 02:06:59 UTC (rev 30646)
@@ -147,12 +147,15 @@
 	k2SeqplayTlkFiles,
 	k2SeqplaySeqData,
 	k2SeqplayCredits,
+	k2SeqplayCreditsSpecial,
 	k2SeqplayIntroTracks,
 	k2SeqplayFinaleTracks,
 	k2SeqplayIntroCDA,
 	k2SeqplayFinaleCDA,
 
 	k2IngamePakFiles,
+	k2IngameSfxFiles,
+	k2IngameSfxIndex,
 	k2IngameTracks,
 	k2IngameCDA,
 	

Modified: scummvm/trunk/tools/create_kyradat/hof_cd.h
===================================================================
--- scummvm/trunk/tools/create_kyradat/hof_cd.h	2008-01-27 02:05:37 UTC (rev 30645)
+++ scummvm/trunk/tools/create_kyradat/hof_cd.h	2008-01-27 02:06:59 UTC (rev 30646)
@@ -1,6 +1,7 @@
 const ExtractEntry kyra2File1CDE[] = {
 	{ k2SeqplayPakFiles, 0x00029FA4, 0x00029FEA },
 	{ k2SeqplayCredits, 0x00027920, 0x00028408 },
+	{ k2SeqplayCreditsSpecial, 0x00029E01, 0x00029E1B },
 	{ k2SeqplayStrings, 0x0002C566, 0x0002CE7C },
 	{ k2SeqplaySfxFiles, 0x0002E284, 0x0002E4B8 },
 	{ k2SeqplayTlkFiles, 0x0002A2AC, 0x0002A349 },
@@ -23,6 +24,8 @@
 };
 
 const ExtractEntry kyra2File2CDE[] = {
+	{ k2IngameSfxFiles, 0x0002CB30, 0x0002D221 },
+	{ k2IngameSfxIndex, 0x000294F0, 0x00029848 },
 	{ k2IngameTracks, 0x0002F2FE, 0x0002F37E },
 	{ -1, 0, 0 }
 };

Modified: scummvm/trunk/tools/create_kyradat/hof_floppy.h
===================================================================
--- scummvm/trunk/tools/create_kyradat/hof_floppy.h	2008-01-27 02:05:37 UTC (rev 30645)
+++ scummvm/trunk/tools/create_kyradat/hof_floppy.h	2008-01-27 02:06:59 UTC (rev 30646)
@@ -31,18 +31,24 @@
 
 const ExtractEntry kyra2File2E[] = {
 	{ k2IngamePakFiles, 0x0035E4E, 0x00362ED },
+	{ k2IngameSfxFiles, 0x00034700, 0x00034DF1 },
+	{ k2IngameSfxIndex, 0x0002A710, 0x0002AA68 },
 	{ k2IngameTracks, 0x0003B2F2, 0x0003B370 },
 	{ -1, 0, 0 }
 };
 
 const ExtractEntry kyra2File2F[] = {
 	{ k2IngamePakFiles, 0x0003AA9C, 0x0003AB1A },
+	{ k2IngameSfxFiles, 0x00033E24, 0x00034515 },
+	{ k2IngameSfxIndex, 0x000288B0, 0x00028C08 },
 	{ k2IngameTracks, 0x0003B2F2, 0x0003B370 },
 	{ -1, 0, 0 }
 };
 
 const ExtractEntry kyra2File2G[] = {
 	{ k2IngamePakFiles, 0x0035626, 0x0035AC5 },
+	{ k2IngameSfxFiles, 0x00033ED8, 0x000345C9 },
+	{ k2IngameSfxIndex, 0x000288E0, 0x00028C38 },
 	{ k2IngameTracks, 0x0003AA8C, 0x0003AB0A },
 	{ -1, 0, 0 }
 };

Modified: scummvm/trunk/tools/create_kyradat/hof_towns.h
===================================================================
--- scummvm/trunk/tools/create_kyradat/hof_towns.h	2008-01-27 02:05:37 UTC (rev 30645)
+++ scummvm/trunk/tools/create_kyradat/hof_towns.h	2008-01-27 02:06:59 UTC (rev 30646)
@@ -15,6 +15,8 @@
 
 const ExtractEntry kyra2File2FMTownsE[] = {
 	{ k2IngamePakFiles, 0x00000540, 0x0000065C },
+	{ k2IngameSfxFiles, 0x00003E3C, 0x000047A3 },
+	{ k2IngameSfxIndex, 0x00013980, 0x00013CD8 },
 	{ k2IngameCDA, 0x0001808C, 0x000181BC },	
 	{ -1, 0, 0 }
 };

Modified: scummvm/trunk/tools/create_kyradat/misc.h
===================================================================
--- scummvm/trunk/tools/create_kyradat/misc.h	2008-01-27 02:05:37 UTC (rev 30645)
+++ scummvm/trunk/tools/create_kyradat/misc.h	2008-01-27 02:06:59 UTC (rev 30646)
@@ -359,6 +359,7 @@
 const int kyra2CDFile1EngNeed[] = {
 	k2SeqplayPakFiles,
 	k2SeqplayCredits,
+	k2SeqplayCreditsSpecial,
 	k2SeqplayStrings,
 	k2SeqplaySfxFiles,
 	k2SeqplaySeqData,
@@ -378,6 +379,8 @@
 };
 
 const int kyra2CDFile2EngNeed[] = {
+	k2IngameSfxFiles,
+	k2IngameSfxIndex,
 	k2IngameTracks,
 	-1
 };
@@ -402,6 +405,8 @@
 
 const int kyra2FloppyFile2Need[] = {
 	k2IngamePakFiles,
+	k2IngameSfxFiles,
+	k2IngameSfxIndex,
 	k2IngameTracks,
 	-1
 };
@@ -423,6 +428,8 @@
 
 const int kyra2TownsFile2EngNeed[] = {
 	k2IngamePakFiles,
+	k2IngameSfxFiles,
+	k2IngameSfxIndex,
 	k2IngameCDA,
 	-1
 };


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