From cdff574ef65c99637ef1f9410feba4ffb1774c67 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sun, 8 Aug 2021 14:34:12 +1000 Subject: [PATCH] - Blood: Add interpolation repair for `kQAV2SHOTF2` (res_id: 61). --- source/games/blood/src/qav.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/source/games/blood/src/qav.cpp b/source/games/blood/src/qav.cpp index b597dcf8f..8b7f8c3c4 100644 --- a/source/games/blood/src/qav.cpp +++ b/source/games/blood/src/qav.cpp @@ -873,6 +873,25 @@ static void qavRepairTileData(QAV* pQAV) } } break; + case kQAV2SHOTF2: + // 2SHOTF2 has tiles 2630 and 2631 applied when it doesn't need to, + // and is missing a preceding frame of tile 2632 which the non-akimbo version has. + + // Patch left and right side respectively. + pQAV->frames[0].tiles[6] = pQAV->frames[1].tiles[6]; + pQAV->frames[0].tiles[6].x -= pQAV->frames[1].tiles[5].x - pQAV->frames[0].tiles[5].x; + pQAV->frames[0].tiles[6].y -= pQAV->frames[1].tiles[5].y - pQAV->frames[0].tiles[5].y; + pQAV->frames[3].tiles[3] = pQAV->frames[4].tiles[3]; + pQAV->frames[3].tiles[3].x -= pQAV->frames[4].tiles[2].x - pQAV->frames[3].tiles[2].x; + pQAV->frames[3].tiles[3].y -= pQAV->frames[4].tiles[2].y - pQAV->frames[3].tiles[2].y; + + // Stabilise frame 2 tile 2 by using x/y coordindates from next frame. + pQAV->frames[2].tiles[2].x = pQAV->frames[3].tiles[2].x; + pQAV->frames[2].tiles[2].y = pQAV->frames[3].tiles[2].y; + + // Disable frame 0 tile 7. + pQAV->frames[0].tiles[7].picnum = -1; + break; default: return; }