Compress visualthinker bools into a flags field

This commit is contained in:
Ricardo Luís Vaz Silva 2024-11-12 16:00:41 -03:00
commit 3622e2bb2a
5 changed files with 49 additions and 39 deletions

View file

@ -1599,7 +1599,7 @@ void HWSprite::AdjustVisualThinker(HWDrawInfo* di, DVisualThinker* spr, sector_t
? TexAnim.UpdateStandaloneAnimation(spr->PT.animData, di->Level->maptime + timefrac)
: spr->PT.texture, !custom_anim);
if (spr->bDontInterpolate)
if (spr->flags & VTF_DontInterpolate)
timefrac = 0.;
FVector3 interp = spr->InterpolatedPosition(timefrac);
@ -1629,13 +1629,12 @@ void HWSprite::AdjustVisualThinker(HWDrawInfo* di, DVisualThinker* spr, sector_t
double mult = 1.0 / sqrt(ps); // shrink slightly
r.Scale(mult * ps, mult);
}
if (spr->bXFlip)
if (spr->flags & VTF_FlipX)
{
std::swap(ul,ur);
r.left = -r.width - r.left; // mirror the sprite's x-offset
}
if (spr->bYFlip) std::swap(vt,vb);
if (spr->flags & VTF_FlipY) std::swap(vt,vb);
float viewvecX = vp.ViewVector.X;
float viewvecY = vp.ViewVector.Y;