aboutsummaryrefslogtreecommitdiff
path: root/engines/agos
diff options
context:
space:
mode:
authorTravis Howell2006-10-28 13:31:30 +0000
committerTravis Howell2006-10-28 13:31:30 +0000
commit2714741606eceefbc811c595852d15b58486d08d (patch)
treee004e9ceade337bd94ff2a078b8d57d0068b5826 /engines/agos
parent71763c3630523952f5e70ef72ac6bc7f1291cada (diff)
downloadscummvm-rg350-2714741606eceefbc811c595852d15b58486d08d.tar.gz
scummvm-rg350-2714741606eceefbc811c595852d15b58486d08d.tar.bz2
scummvm-rg350-2714741606eceefbc811c595852d15b58486d08d.zip
Correct dump of VGA file in FF
svn-id: r24555
Diffstat (limited to 'engines/agos')
-rw-r--r--engines/agos/debug.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/engines/agos/debug.cpp b/engines/agos/debug.cpp
index b2e5d5cacf..8e03db0255 100644
--- a/engines/agos/debug.cpp
+++ b/engines/agos/debug.cpp
@@ -281,6 +281,17 @@ void AGOSEngine::dumpVideoScript(const byte *src, bool one_opcode_only) {
} 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 @@ void AGOSEngine::dumpVgaFile(const byte *vga) {
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::dumpVgaBitmaps(const byte *vga, byte *vga1, int res) {
}
}
-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