From df3bc4d90ae7f873cf5846b5561c464517c5723c Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sat, 14 Aug 2021 11:45:51 +1000 Subject: [PATCH] - Blood: Add interpolation repair for `kQAVSGUNPRE` (res_id: 79). Thanks again to @Phredreeke for the tiles with overlays baked in for this to work properly. --- source/games/blood/src/qav.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/games/blood/src/qav.cpp b/source/games/blood/src/qav.cpp index 1d950eab8..0b185b6b4 100644 --- a/source/games/blood/src/qav.cpp +++ b/source/games/blood/src/qav.cpp @@ -1007,6 +1007,17 @@ static void qavRepairTileData(QAV* pQAV) pQAV->frames[46].tiles[1] = backup; break; } + case kQAVSGUNPRE: + // SGUNPRE's overlay sizes vary from tile to tile and don't interpolate properly. + // Use repaired tiles from Phredreeke where the overlays are baked in. + + // For the two last frames, change tile index 0 picnum from 3227 to 9300. + for (i = pQAV->nFrames - 2; i < pQAV->nFrames; i++) + { + pQAV->frames[i].tiles[0].picnum = 9300; + pQAV->frames[i].tiles[2].picnum = -1; + } + break; default: return; }