From 95878bcea17c19763fd5b7cc87dd3e80f8cede21 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Fri, 13 Aug 2021 16:40:50 +1000 Subject: [PATCH] - Blood: Add interpolation repair for `kQAVVDFIRE4` (res_id: 106) and `kQAVVDFIRE5` (res_id: 107). --- source/games/blood/src/qav.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/source/games/blood/src/qav.cpp b/source/games/blood/src/qav.cpp index 539c46d30..3efea35a2 100644 --- a/source/games/blood/src/qav.cpp +++ b/source/games/blood/src/qav.cpp @@ -1239,6 +1239,22 @@ static void qavRepairTileData(QAV* pQAV) pQAV->frames[i].tiles[0] = backup; } break; + case kQAVVDFIRE4: + case kQAVVDFIRE5: + // VDFIRE4 and requires several index swaps to repair interpolations. + // For frame 1, swap tile indices 0 and 1. + backup = pQAV->frames[1].tiles[1]; + pQAV->frames[1].tiles[1] = pQAV->frames[1].tiles[0]; + pQAV->frames[1].tiles[0] = backup; + + // For the last two frames, swap tile indices 0 and 1. + for (i = (pQAV->nFrames - 2); i < pQAV->nFrames; i++) + { + backup = pQAV->frames[i].tiles[1]; + pQAV->frames[i].tiles[1] = pQAV->frames[i].tiles[0]; + pQAV->frames[i].tiles[0] = backup; + } + break; default: return; }