From 6256de8013ea558fc41973f98840419340736d78 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sun, 22 Aug 2021 11:23:29 +1000 Subject: [PATCH] - Blood: Extend interpolation repair for `kQAVBUNUP` (res_id: 16) to add missing tile in first frame. --- source/games/blood/src/qav.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/games/blood/src/qav.cpp b/source/games/blood/src/qav.cpp index f3b492bd3..81deecd46 100644 --- a/source/games/blood/src/qav.cpp +++ b/source/games/blood/src/qav.cpp @@ -503,6 +503,11 @@ static void qavRepairTileData(QAV* pQAV) pQAV->frames[0].tiles[3] = pQAV->frames[0].tiles[0]; pQAV->frames[0].tiles[0].picnum = -1; + // Clone 2nd frame's tile index 2 into 1st frame and adjust x/y coordinates using difference between 1st and 2nd frame's tile index 3. + pQAV->frames[0].tiles[2] = pQAV->frames[1].tiles[2]; + pQAV->frames[0].tiles[2].x += pQAV->frames[0].tiles[3].x - pQAV->frames[1].tiles[3].x; + pQAV->frames[0].tiles[2].y += pQAV->frames[0].tiles[3].y - pQAV->frames[1].tiles[3].y; + // Shift every tile up one index to leave more room at the end, should it be needed in the future. for (i = 0; i < pQAV->nFrames; i++) {