mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-03-01 06:31:13 +00:00
- fixed wall sprite rendering.
This commit is contained in:
parent
efe0d57fca
commit
d1c23d1ad0
3 changed files with 11 additions and 11 deletions
|
@ -215,13 +215,13 @@ void GetWallSpritePosition(const spritetype* spr, vec2_t pos, vec2_t* out, bool
|
|||
int width, leftofs;
|
||||
if (render && hw_hightile && TileFiles.tiledata[spr->picnum].h_xsize)
|
||||
{
|
||||
width = TileFiles.tiledata[spr->picnum].h_xsize * spr->xrepeat;
|
||||
leftofs = (TileFiles.tiledata[spr->picnum].h_xoffs + spr->xoffset) * spr->xrepeat;
|
||||
width = TileFiles.tiledata[spr->picnum].h_xsize;
|
||||
leftofs = (TileFiles.tiledata[spr->picnum].h_xoffs + spr->xoffset);
|
||||
}
|
||||
else
|
||||
{
|
||||
width = tex->GetTexelWidth() * spr->xrepeat;
|
||||
leftofs = (tex->GetTexelLeftOffset() + spr->xoffset) * spr->xrepeat;
|
||||
width = tex->GetTexelWidth();
|
||||
leftofs = (tex->GetTexelLeftOffset() + spr->xoffset);
|
||||
}
|
||||
|
||||
int x = bsin(spr->ang) * spr->xrepeat;
|
||||
|
|
|
@ -283,10 +283,6 @@ void HWDrawInfo::DispatchSprites()
|
|||
|
||||
setgotpic(tilenum);
|
||||
|
||||
if ((tspr->cstat & CSTAT_SPRITE_ALIGNMENT) != CSTAT_SPRITE_ALIGNMENT_SLAB)
|
||||
tileUpdatePicnum(&tilenum, spritenum + 32768, 0);
|
||||
|
||||
|
||||
while (!(spriteext[spritenum].flags & SPREXT_NOTMD))
|
||||
{
|
||||
int pt = Ptile2tile(tspr->picnum, tspr->pal);
|
||||
|
@ -326,6 +322,9 @@ void HWDrawInfo::DispatchSprites()
|
|||
tspr->pos.y -= bsin(tspr->ang, -13);
|
||||
}
|
||||
|
||||
tileUpdatePicnum(&tilenum, sprite->owner + 32768, 0);
|
||||
tspr->picnum = tilenum;
|
||||
|
||||
switch (tspr->cstat & CSTAT_SPRITE_ALIGNMENT)
|
||||
{
|
||||
case CSTAT_SPRITE_ALIGNMENT_FACING:
|
||||
|
|
|
@ -1128,10 +1128,10 @@ void HWWall::ProcessWallSprite(HWDrawInfo* di, spritetype* spr, sectortype* sect
|
|||
glseg.y2 = pos[1].y * (1 / -16.f);
|
||||
tcs[LOLFT].u = tcs[UPLFT].u = (spr->cstat & CSTAT_SPRITE_XFLIP) ? 1.f : 0.f;
|
||||
tcs[LORGT].u = tcs[UPRGT].u = (spr->cstat & CSTAT_SPRITE_XFLIP) ? 0.f : 1.f;
|
||||
tcs[UPLFT].v = tcs[UPRGT].u = (spr->cstat & CSTAT_SPRITE_YFLIP) ? 0.f : 1.f;
|
||||
tcs[LOLFT].v = tcs[LORGT].u = (spr->cstat & CSTAT_SPRITE_YFLIP) ? 0.f : 1.f;
|
||||
ztop[0] = ztop[1] = (sprz - height) * (1 / -256.);
|
||||
tcs[UPLFT].v = tcs[UPRGT].v = (spr->cstat & CSTAT_SPRITE_YFLIP) ? 1.f : 0.f;
|
||||
tcs[LOLFT].v = tcs[LORGT].v = (spr->cstat & CSTAT_SPRITE_YFLIP) ? 0.f : 1.f;
|
||||
zbottom[0] = zbottom[1] = (sprz) * (1 / -256.);
|
||||
ztop[0] = ztop[1] = (sprz - ((height * spr->yrepeat) << 2)) * (1 / -256.);
|
||||
|
||||
|
||||
// Clip sprites to ceilings/floors
|
||||
|
@ -1157,4 +1157,5 @@ void HWWall::ProcessWallSprite(HWDrawInfo* di, spritetype* spr, sectortype* sect
|
|||
zbottom[0] = zbottom[1] = floorz;
|
||||
}
|
||||
}
|
||||
PutWall(di, trans);
|
||||
}
|
Loading…
Reference in a new issue