From 1546e4fa8aee194f46c89bd07a221dcd6db061c0 Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Fri, 31 Aug 2018 10:26:08 +0200 Subject: [PATCH] Revert a change in the previous commit which breaks sprite stripping. Fixes sparks glitch in Sonic Adventure 2 --- core/hw/pvr/ta_vtx.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/hw/pvr/ta_vtx.cpp b/core/hw/pvr/ta_vtx.cpp index 354472ffd..5c2a960cb 100644 --- a/core/hw/pvr/ta_vtx.cpp +++ b/core/hw/pvr/ta_vtx.cpp @@ -1243,15 +1243,17 @@ public: __forceinline static void AppendSpriteVertexA(TA_Sprite1A* sv) { - u16* idx=vdrc.idx.Append(4); + u16* idx=vdrc.idx.Append(6); u32 vbase=vdrc.verts.used(); idx[0]=vbase+0; idx[1]=vbase+1; idx[2]=vbase+2; idx[3]=vbase+3; + idx[4]=vbase+3; + idx[5]=vbase+4; - CurrentPP->count=vdrc.idx.used()-CurrentPP->first; + CurrentPP->count=vdrc.idx.used()-CurrentPP->first-2; Vertex* cv = vdrc.verts.Append(4);