[Scummvm-cvs-logs] SF.net SVN: scummvm:[43208] scummvm/trunk

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Mon Aug 10 18:42:39 CEST 2009


Revision: 43208
          http://scummvm.svn.sourceforge.net/scummvm/?rev=43208&view=rev
Author:   lordhoto
Date:     2009-08-10 16:42:39 +0000 (Mon, 10 Aug 2009)

Log Message:
-----------
- Fix extraction of Kyra 1 amiga string tables in kyra.dat
- Fix "taken" string offsets in kyra.dat
- Add temporary workaround for only one "taken" string being present in Kyra 1 amiga.
- Update kyra.dat

Modified Paths:
--------------
    scummvm/trunk/dists/engine-data/kyra.dat
    scummvm/trunk/engines/kyra/gui_lok.cpp
    scummvm/trunk/tools/create_kyradat/amiga.h
    scummvm/trunk/tools/create_kyradat/create_kyradat.cpp

Modified: scummvm/trunk/dists/engine-data/kyra.dat
===================================================================
(Binary files differ)

Modified: scummvm/trunk/engines/kyra/gui_lok.cpp
===================================================================
--- scummvm/trunk/engines/kyra/gui_lok.cpp	2009-08-10 14:35:28 UTC (rev 43207)
+++ scummvm/trunk/engines/kyra/gui_lok.cpp	2009-08-10 16:42:39 UTC (rev 43208)
@@ -71,7 +71,11 @@
 			_screen->fillRect(_itemPosX[itemOffset], _itemPosY[itemOffset], _itemPosX[itemOffset] + 15, _itemPosY[itemOffset] + 15, _flags.platform == Common::kPlatformAmiga ? 19 : 12);
 			_screen->drawShape(0, _shapes[216+_itemInHand], _itemPosX[itemOffset], _itemPosY[itemOffset], 0, 0);
 			setMouseItem(inventoryItem);
-			updateSentenceCommand(_itemList[inventoryItem], _takenList[1], 179);
+			// TODO: Proper support for both taken strings in Amiga version
+			if (_flags.platform == Common::kPlatformAmiga)
+				updateSentenceCommand(_itemList[inventoryItem], _takenList[0], 179);
+			else
+				updateSentenceCommand(_itemList[inventoryItem], _takenList[1], 179);
 			_screen->showMouse();
 			_currentCharacter->inventoryItems[itemOffset] = _itemInHand;
 			_itemInHand = inventoryItem;

Modified: scummvm/trunk/tools/create_kyradat/amiga.h
===================================================================
--- scummvm/trunk/tools/create_kyradat/amiga.h	2009-08-10 14:35:28 UTC (rev 43207)
+++ scummvm/trunk/tools/create_kyradat/amiga.h	2009-08-10 16:42:39 UTC (rev 43208)
@@ -14,7 +14,7 @@
 	{ kCharacterImageFilenames, 0x0000C814, 0x0000C904 },
 	{ kDefaultShapes, 0x00039230, 0x000396BA },
 	{ kItemNames, 0x0001A3B8, 0x0001A738 },
-	{ kTakenStrings, 0x0000F9F4, 0x0000FAF0 },
+	{ kTakenStrings, 0x0000FAE8, 0x0000FAF0 },
 	{ kPlacedStrings, 0x0000FAF0, 0x0000FAFA },
 	{ kDroppedStrings, 0x000101F2, 0x000101FC },
 	{ kNoDropStrings, 0x0000C98E, 0x0000C9D6 },

Modified: scummvm/trunk/tools/create_kyradat/create_kyradat.cpp
===================================================================
--- scummvm/trunk/tools/create_kyradat/create_kyradat.cpp	2009-08-10 14:35:28 UTC (rev 43207)
+++ scummvm/trunk/tools/create_kyradat/create_kyradat.cpp	2009-08-10 16:42:39 UTC (rev 43208)
@@ -498,8 +498,12 @@
 	for (uint32 i = 0; i < size; ++i) {
 		if (!data[i]) {
 			if (g->special == kAmigaVersion) {
-				if (!((i + 1) & 0x1))
+				if (i + 1 >= size)
 					++entries;
+				else if (!data[i+1])
+					continue;
+				else
+					++entries;
 			} else {
 				++entries;
 			}
@@ -554,6 +558,7 @@
 
 	uint8 *buffer = new uint8[targetsize];
 	assert(buffer);
+	memset(buffer, 0, targetsize);
 	uint8 *output = buffer;
 	const uint8 *input = (const uint8*) data;
 
@@ -561,7 +566,7 @@
 	if (g->special == kFMTownsVersionE || g->special == kFMTownsVersionJ ||
 		g->special == k2TownsFile1E || g->special == k2TownsFile1J ||
 		g->special == k2TownsFile2E || g->special == k2TownsFile2J || fmtPatch == 5) {
-		const byte * c = data + size;
+		const byte *c = data + size;
 		do {
 			if (fmtPatch == 2 && input - data == 0x3C0 && input[0x10] == 0x32) {
 				memcpy(output, input, 0x0F);
@@ -611,8 +616,13 @@
 		// we need to strip some aligment zeros out here
 		int dstPos = 0;
 		for (uint32 i = 0; i < size; ++i) {
-			if (!data[i] && ((i+1) & 0x1))
-				continue;
+			if (!data[i]) {
+				if (i + 1 > size)
+					continue;
+				else if (i + 1 < size && !data[i+1])
+					continue;
+			}
+
 			*output++ = data[i];
 			++dstPos;
 		}


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