mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 20:40:47 +00:00
- added y-off-by-one-fix for y-centered sprites.
This commit is contained in:
parent
ffb956749d
commit
b7bad558da
1 changed files with 5 additions and 1 deletions
|
@ -378,7 +378,11 @@ void HWSprite::Process(HWDrawInfo* di, spritetype* spr, sectortype* sector, int
|
||||||
float xoff = (tilexoff * spr->xrepeat) * (0.2f / 16.f);
|
float xoff = (tilexoff * spr->xrepeat) * (0.2f / 16.f);
|
||||||
float yoff = (tileyoff * spr->yrepeat) * (0.25f / 16.f);
|
float yoff = (tileyoff * spr->yrepeat) * (0.25f / 16.f);
|
||||||
|
|
||||||
if (spr->cstat & CSTAT_SPRITE_YCENTER) yoff -= height * 0.5f;
|
if (spr->cstat & CSTAT_SPRITE_YCENTER)
|
||||||
|
{
|
||||||
|
yoff -= height * 0.5;
|
||||||
|
if (ysize & 1) yoff -= spr->yrepeat * (0.125f / 16.f); // Odd yspans (taken from polymost as-is)
|
||||||
|
}
|
||||||
|
|
||||||
if (flags & CSTAT_SPRITE_XFLIP) xoff = -xoff;
|
if (flags & CSTAT_SPRITE_XFLIP) xoff = -xoff;
|
||||||
if (flags & CSTAT_SPRITE_YFLIP) yoff = -yoff;
|
if (flags & CSTAT_SPRITE_YFLIP) yoff = -yoff;
|
||||||
|
|
Loading…
Reference in a new issue