[Scummvm-cvs-logs] SF.net SVN: scummvm: [29028] scummvm/trunk/engines/agi

sev at users.sourceforge.net sev at users.sourceforge.net
Sat Sep 22 22:19:55 CEST 2007


Revision: 29028
          http://scummvm.svn.sourceforge.net/scummvm/?rev=29028&view=rev
Author:   sev
Date:     2007-09-22 13:19:55 -0700 (Sat, 22 Sep 2007)

Log Message:
-----------
Switch Troll's Tale to booter image

Modified Paths:
--------------
    scummvm/trunk/engines/agi/detection.cpp
    scummvm/trunk/engines/agi/preagi_troll.cpp
    scummvm/trunk/engines/agi/preagi_troll.h

Modified: scummvm/trunk/engines/agi/detection.cpp
===================================================================
--- scummvm/trunk/engines/agi/detection.cpp	2007-09-22 20:16:24 UTC (rev 29027)
+++ scummvm/trunk/engines/agi/detection.cpp	2007-09-22 20:19:55 UTC (rev 29028)
@@ -1622,7 +1622,7 @@
 		{
 			"troll",
 			"",
-			AD_ENTRY1s("troll.exe", "c594b4d6791e9580d8d5dc9d71760027", 59120),
+			AD_ENTRY1s("troll.img", "62903f264b3d849be4214b3a5c42a2fa", 184320),
 			Common::EN_ANY,
 			Common::kPlatformPC,
 			Common::ADGF_NO_FLAGS

Modified: scummvm/trunk/engines/agi/preagi_troll.cpp
===================================================================
--- scummvm/trunk/engines/agi/preagi_troll.cpp	2007-09-22 20:16:24 UTC (rev 29027)
+++ scummvm/trunk/engines/agi/preagi_troll.cpp	2007-09-22 20:19:55 UTC (rev 29028)
@@ -726,13 +726,38 @@
    	_vm->_picture->setPictureVersion(AGIPIC_V15);
 	//SetScreenPar(320, 200, (char*)ibm_fontdata);
 
+	const int gaps[] = { 0x3A40,  0x4600,  0x4800,  0x5800,  0x5a00,  0x6a00,
+						 0x6c00,  0x7400,  0x7600,  0x7c00,  0x7e00,  0x8e00,
+						 0x9000,  0xa000,  0xa200,  0xb200,  0xb400,  0xc400,
+						 0xc600,  0xd600,  0xd800,  0xe800,  0xea00,  0xfa00,
+						 0xfc00,  0x10c00, 0x10e00, 0x11e00, 0x12000, 0x13000 };
+
 	Common::File infile;
 	if (!infile.open(IDA_TRO_BINNAME))
 		return;
 
-	_gameData = (byte *)malloc(infile.size());
-	infile.seek(IDO_TRO_DATA_START);
-	infile.read(_gameData, infile.size() - IDO_TRO_DATA_START);
+	_gameData = (byte *)malloc(0xD9C0);
+
+	bool flip = true;
+	byte *ptr = _gameData;
+	int diff;
+
+	for (int i = 0; i < ARRAYSIZE(gaps) - 1; i++) {
+		diff = gaps[i + 1] - gaps[i];
+
+		if (flip) {
+			infile.seek(gaps[i]);
+			infile.read(ptr, diff);
+			ptr += diff;
+		} else {
+		}
+		flip = !flip;
+	}
+
+	// One sector is off
+	infile.seek(0x18470);
+	infile.read(_gameData + 15632, 592);
+
 	infile.close();
 
 	fillOffsets();

Modified: scummvm/trunk/engines/agi/preagi_troll.h
===================================================================
--- scummvm/trunk/engines/agi/preagi_troll.h	2007-09-22 20:16:24 UTC (rev 29027)
+++ scummvm/trunk/engines/agi/preagi_troll.h	2007-09-22 20:19:55 UTC (rev 29028)
@@ -122,9 +122,9 @@
 
 // offsets
 
-#define IDA_TRO_BINNAME "troll.exe"
+#define IDA_TRO_BINNAME "troll.img"
 
-#define IDO_TRO_DATA_START    0x1960
+#define IDO_TRO_DATA_START    0x3A40
 #define IDO_TRO_PIC_START	  0x3EF5
 #define IDO_TRO_LOCMESSAGES   0x1F7C
 #define IDO_TRO_USERMESSAGES  0x34A4


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