From ba915900289445823585bab2a0609c492a804f86 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Thu, 12 Aug 2021 13:15:34 +1000 Subject: [PATCH] - Blood: Add interpolation repair for `kQAVSHOTUP` (res_id: 50). --- source/games/blood/src/qav.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/source/games/blood/src/qav.cpp b/source/games/blood/src/qav.cpp index 4382eab03..b26559643 100644 --- a/source/games/blood/src/qav.cpp +++ b/source/games/blood/src/qav.cpp @@ -852,6 +852,19 @@ static void qavRepairTileData(QAV* pQAV) pQAV->frames[i].tiles[1].picnum = -1; } break; + case kQAVSHOTUP: + // SHOTUP is missing tiles for the first two frames. + // Clone from 3rd frame and amend x/y coordinates for tile indices 1 and 2 on frames 0 and 1. + for (i = 0; i < 2; i++) + { + for (j = 1; j < 3; j++) + { + pQAV->frames[i].tiles[j] = pQAV->frames[2].tiles[j]; + pQAV->frames[i].tiles[j].x += pQAV->frames[i].tiles[0].x - pQAV->frames[2].tiles[0].x; + pQAV->frames[i].tiles[j].y += pQAV->frames[i].tiles[0].y - pQAV->frames[2].tiles[0].y; + } + } + break; default: return; }