Add missing segment clipping clamps for decals, sprites and wall sprites
This commit is contained in:
parent
9daec9dc46
commit
920b322d72
5 changed files with 17 additions and 15 deletions
|
|
@ -218,14 +218,6 @@ namespace swrenderer
|
|||
}
|
||||
}
|
||||
|
||||
// Clip sprite to drawseg
|
||||
x1 = MAX<int>(clipper->x1, x1);
|
||||
x2 = MIN<int>(clipper->x2, x2);
|
||||
if (x1 >= x2)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Prepare lighting
|
||||
ProjectedWallLight light;
|
||||
light.SetColormap(lightsector, curline);
|
||||
|
|
@ -250,7 +242,7 @@ namespace swrenderer
|
|||
if (visible)
|
||||
{
|
||||
thread->PrepareTexture(WallSpriteTile, decal->RenderStyle);
|
||||
drawerargs.DrawMasked(thread, zpos + WallSpriteTile->GetTopOffset(0) * decal->ScaleY, decal->ScaleY, decal->RenderFlags & RF_XFLIP, decal->RenderFlags & RF_YFLIP, WallC, light, WallSpriteTile, mfloorclip, mceilingclip, decal->RenderStyle);
|
||||
drawerargs.DrawMasked(thread, zpos + WallSpriteTile->GetTopOffset(0) * decal->ScaleY, decal->ScaleY, decal->RenderFlags & RF_XFLIP, decal->RenderFlags & RF_YFLIP, WallC, clipper->x1, clipper->x2, light, WallSpriteTile, mfloorclip, mceilingclip, decal->RenderStyle);
|
||||
}
|
||||
|
||||
// If this sprite is RF_CLIPFULL on a two-sided line, needrepeat will
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ namespace swrenderer
|
|||
mlight.SetSpriteLight();
|
||||
|
||||
drawerargs.SetBaseColormap(Light.BaseColormap);
|
||||
drawerargs.DrawMasked(thread, gzt - floorclip, SpriteScale, renderflags & RF_XFLIP, renderflags & RF_YFLIP, wallc, mlight, pic, portalfloorclip, mceilingclip, RenderStyle);
|
||||
drawerargs.DrawMasked(thread, gzt - floorclip, SpriteScale, renderflags & RF_XFLIP, renderflags & RF_YFLIP, wallc, x1, x2, mlight, pic, portalfloorclip, mceilingclip, RenderStyle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -199,6 +199,6 @@ namespace swrenderer
|
|||
}
|
||||
|
||||
drawerargs.SetBaseColormap(spr->Light.BaseColormap);
|
||||
drawerargs.DrawMasked(thread, spr->gzt, spr->yscale, spr->renderflags & RF_XFLIP, spr->renderflags & RF_YFLIP, spr->wallc, mlight, WallSpriteTile, floorclip, mceilingclip, spr->RenderStyle);
|
||||
drawerargs.DrawMasked(thread, spr->gzt, spr->yscale, spr->renderflags & RF_XFLIP, spr->renderflags & RF_YFLIP, spr->wallc, x1, x2, mlight, WallSpriteTile, floorclip, mceilingclip, spr->RenderStyle);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue