From 7bbf47885916a1b51682b47b4e8d6651b05213f1 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sat, 14 Aug 2021 11:49:24 +1000 Subject: [PATCH] - Blood: Add interpolation repair for `kQAVSGUNPOST` (res_id: 80). Thanks again to @Phredreeke for the tiles with overlays baked in for this to work properly. --- source/games/blood/src/qav.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/source/games/blood/src/qav.cpp b/source/games/blood/src/qav.cpp index 0b185b6b4..62aa56f1d 100644 --- a/source/games/blood/src/qav.cpp +++ b/source/games/blood/src/qav.cpp @@ -1018,6 +1018,21 @@ static void qavRepairTileData(QAV* pQAV) pQAV->frames[i].tiles[2].picnum = -1; } break; + case kQAVSGUNPOST: + { + // SGUNPOST's overlay sizes vary from tile to tile and don't interpolate properly. + // Use repaired tiles from Phredreeke where the overlays are baked in. + constexpr int tilearray[8] = { 9301, 9301, 9302, 9302, 9303, 9303, 9304, 9304 }; + + // Loop through each frame to remove overlay and replace use of 3227 with that from tilearray. + for (i = 0; i < pQAV->nFrames; i++) + { + pQAV->frames[i].tiles[1].picnum = tilearray[i]; + pQAV->frames[i].tiles[2].picnum = -1; + + } + break; + } default: return; }