[Scummvm-cvs-logs] SF.net SVN: scummvm: [24555] scummvm/trunk/engines/agos/debug.cpp
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Sat Oct 28 15:31:35 CEST 2006
Revision: 24555
http://svn.sourceforge.net/scummvm/?rev=24555&view=rev
Author: kirben
Date: 2006-10-28 06:31:30 -0700 (Sat, 28 Oct 2006)
Log Message:
-----------
Correct dump of VGA file in FF
Modified Paths:
--------------
scummvm/trunk/engines/agos/debug.cpp
Modified: scummvm/trunk/engines/agos/debug.cpp
===================================================================
--- scummvm/trunk/engines/agos/debug.cpp 2006-10-28 13:21:43 UTC (rev 24554)
+++ scummvm/trunk/engines/agos/debug.cpp 2006-10-28 13:31:30 UTC (rev 24555)
@@ -281,6 +281,17 @@
} while (!one_opcode_only);
}
+void AGOSEngine::dumpVgaScript(const byte *ptr, uint res, uint sprite_id) {
+ dumpVgaScriptAlways(ptr, res, sprite_id);
+}
+
+void AGOSEngine::dumpVgaScriptAlways(const byte *ptr, uint res, uint sprite_id) {
+ printf("; address=%x, vgafile=%d vgasprite=%d\n",
+ (unsigned int)(ptr - _vgaBufferPointers[res].vgaFile1), res, sprite_id);
+ dumpVideoScript(ptr, false);
+ printf("; end\n");
+}
+
void AGOSEngine::dumpVgaFile(const byte *vga) {
const byte *pp;
const byte *p;
@@ -324,14 +335,14 @@
pp = vga;
if (getGameType() == GType_FF || getGameType() == GType_PP) {
- p = pp + READ_BE_UINT16(pp + 2);;
- count = READ_BE_UINT16(&((const VgaFileHeader2_Common *) p)->imageCount);
- p = pp + READ_BE_UINT16(&((const VgaFileHeader2_Common *) p)->imageTable);
+ p = pp + READ_LE_UINT16(pp + 2);;
+ count = READ_LE_UINT16(&((const VgaFileHeader2_Feeble *) p)->imageCount);
+ p = pp + READ_LE_UINT16(&((const VgaFileHeader2_Feeble *) p)->imageTable);
while (--count >= 0) {
- int id = READ_BE_UINT16(&((const ImageHeader_Feeble *) p)->id);
+ int id = READ_LE_UINT16(&((const ImageHeader_Feeble *) p)->id);
- dumpVgaScriptAlways(vga + READ_BE_UINT16(&((const ImageHeader_Feeble *) p)->scriptOffs), id / 100, id);
+ dumpVgaScriptAlways(vga + READ_LE_UINT16(&((const ImageHeader_Feeble *) p)->scriptOffs), id / 100, id);
p += sizeof(ImageHeader_Feeble);
}
} else if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) {
@@ -538,15 +549,4 @@
}
}
-void AGOSEngine::dumpVgaScriptAlways(const byte *ptr, uint res, uint sprite_id) {
- printf("; address=%x, vgafile=%d vgasprite=%d\n",
- (unsigned int)(ptr - _vgaBufferPointers[res].vgaFile1), res, sprite_id);
- dumpVideoScript(ptr, false);
- printf("; end\n");
-}
-
-void AGOSEngine::dumpVgaScript(const byte *ptr, uint res, uint sprite_id) {
- dumpVgaScriptAlways(ptr, res, sprite_id);
-}
-
} // End of namespace AGOS
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