diff options
-rw-r--r-- | engines/agos/agos.cpp | 11 | ||||
-rw-r--r-- | engines/agos/vga.cpp | 11 |
2 files changed, 20 insertions, 2 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp index 92eb3e8a1a..a62dc86cee 100644 --- a/engines/agos/agos.cpp +++ b/engines/agos/agos.cpp @@ -1623,6 +1623,16 @@ void AGOSEngine::set_video_mode_internal(uint16 mode, uint16 vga_res_id) { assert(READ_BE_UINT16(&((ImageHeader_WW *) b)->id) == vga_res_id); } + if (_startVgaScript) { + if (getGameType() == GType_FF || getGameType() == GType_PP) { + dump_vga_script(_curVgaFile1 + READ_LE_UINT16(&((ImageHeader_Feeble*)b)->scriptOffs), num, vga_res_id); + } else if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) { + dump_vga_script(_curVgaFile1 + READ_BE_UINT16(&((ImageHeader_Simon*)b)->scriptOffs), num, vga_res_id); + } else { + dump_vga_script(_curVgaFile1 + READ_BE_UINT16(&((ImageHeader_WW*)b)->scriptOffs), num, vga_res_id); + } + } + if (getGameType() == GType_SIMON1) { if (vga_res_id == 16300) { clearBackFromTop(134); @@ -1654,7 +1664,6 @@ void AGOSEngine::set_video_mode_internal(uint16 mode, uint16 vga_res_id) { _vcPtr = _curVgaFile1 + READ_BE_UINT16(&((ImageHeader_WW *) b)->scriptOffs); } - //dump_vga_script(_vcPtr, num, vga_res_id); runVgaScript(); _vcPtr = vc_ptr_org; diff --git a/engines/agos/vga.cpp b/engines/agos/vga.cpp index bc50d86758..fac6b817d7 100644 --- a/engines/agos/vga.cpp +++ b/engines/agos/vga.cpp @@ -480,6 +480,16 @@ void AGOSEngine::vc2_call() { assert(READ_BE_UINT16(&((ImageHeader_WW *) b)->id) == num); } + if (_startVgaScript) { + if (getGameType() == GType_FF || getGameType() == GType_PP) { + dump_vga_script(_curVgaFile1 + READ_LE_UINT16(&((ImageHeader_Feeble*)b)->scriptOffs), res, num); + } else if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) { + dump_vga_script(_curVgaFile1 + READ_BE_UINT16(&((ImageHeader_Simon*)b)->scriptOffs), res, num); + } else { + dump_vga_script(_curVgaFile1 + READ_BE_UINT16(&((ImageHeader_WW*)b)->scriptOffs), res, num); + } + } + vcPtrOrg = _vcPtr; if (getGameType() == GType_FF || getGameType() == GType_PP) { @@ -490,7 +500,6 @@ void AGOSEngine::vc2_call() { _vcPtr = _curVgaFile1 + READ_BE_UINT16(&((ImageHeader_WW *) b)->scriptOffs); } - //dump_vga_script(_vcPtr, res, num); runVgaScript(); _curVgaFile1 = old_file_1; |