diff options
Diffstat (limited to 'engines/agos/vga.cpp')
-rw-r--r-- | engines/agos/vga.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/engines/agos/vga.cpp b/engines/agos/vga.cpp index 436e0b82ad..d6a8637c2b 100644 --- a/engines/agos/vga.cpp +++ b/engines/agos/vga.cpp @@ -444,7 +444,7 @@ void AGOSEngine::vc2_call() { bb = _curVgaFile1; if (getGameType() == GType_FF || getGameType() == GType_PP) { - b = bb + READ_LE_UINT16(&((VgaFileHeader_Feeble *) bb)->hdr2_start); + b = bb + READ_LE_UINT16(bb + 2); count = READ_LE_UINT16(&((VgaFileHeader2_Feeble *) b)->imageCount); b = bb + READ_LE_UINT16(&((VgaFileHeader2_Feeble *) b)->imageTable); @@ -455,9 +455,9 @@ void AGOSEngine::vc2_call() { } assert(READ_LE_UINT16(&((ImageHeader_Feeble *) b)->id) == num); } else if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) { - b = bb + READ_BE_UINT16(&((VgaFileHeader_Simon *) bb)->hdr2_start); - count = READ_BE_UINT16(&((VgaFileHeader2_Simon *) b)->imageCount); - b = bb + READ_BE_UINT16(&((VgaFileHeader2_Simon *) b)->imageTable); + b = bb + READ_BE_UINT16(bb + 4); + count = READ_BE_UINT16(&((VgaFileHeader2_Common *) b)->imageCount); + b = bb + READ_BE_UINT16(&((VgaFileHeader2_Common *) b)->imageTable); while (count--) { if (READ_BE_UINT16(&((ImageHeader_Simon *) b)->id) == num) @@ -469,8 +469,8 @@ void AGOSEngine::vc2_call() { b = bb + READ_BE_UINT16(bb + 10); b += 20; - count = READ_BE_UINT16(&((VgaFileHeader2_WW *) b)->imageCount); - b = bb + READ_BE_UINT16(&((VgaFileHeader2_WW *) b)->imageTable); + count = READ_BE_UINT16(&((VgaFileHeader2_Common *) b)->imageCount); + b = bb + READ_BE_UINT16(&((VgaFileHeader2_Common *) b)->imageTable); while (count--) { if (READ_BE_UINT16(&((ImageHeader_WW *) b)->id) == num) @@ -571,7 +571,7 @@ void AGOSEngine::vc3_loadSprite() { pp = _curVgaFile1; if (getGameType() == GType_FF || getGameType() == GType_PP) { - p = pp + READ_LE_UINT16(&((VgaFileHeader_Feeble *) pp)->hdr2_start); + p = pp + READ_LE_UINT16(pp + 2); count = READ_LE_UINT16(&((VgaFileHeader2_Feeble *) p)->animationCount); p = pp + READ_LE_UINT16(&((VgaFileHeader2_Feeble *) p)->animationTable); @@ -582,9 +582,9 @@ void AGOSEngine::vc3_loadSprite() { } assert(READ_LE_UINT16(&((AnimationHeader_Feeble *) p)->id) == vgaSpriteId); } else if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) { - p = pp + READ_BE_UINT16(&((VgaFileHeader_Simon *) pp)->hdr2_start); - count = READ_BE_UINT16(&((VgaFileHeader2_Simon *) p)->animationCount); - p = pp + READ_BE_UINT16(&((VgaFileHeader2_Simon *) p)->animationTable); + p = pp + READ_BE_UINT16(pp + 4); + count = READ_BE_UINT16(&((VgaFileHeader2_Common *) p)->animationCount); + p = pp + READ_BE_UINT16(&((VgaFileHeader2_Common *) p)->animationTable); while (count--) { if (READ_BE_UINT16(&((AnimationHeader_Simon *) p)->id) == vgaSpriteId) @@ -596,8 +596,8 @@ void AGOSEngine::vc3_loadSprite() { p = pp + READ_BE_UINT16(pp + 10); p += 20; - count = READ_BE_UINT16(&((VgaFileHeader2_WW *) p)->animationCount); - p = pp + READ_BE_UINT16(&((VgaFileHeader2_WW *) p)->animationTable); + count = READ_BE_UINT16(&((VgaFileHeader2_Common *) p)->animationCount); + p = pp + READ_BE_UINT16(&((VgaFileHeader2_Common *) p)->animationTable); while (count--) { if (READ_BE_UINT16(&((AnimationHeader_WW *) p)->id) == vgaSpriteId) |