Add some helpers on DrawSegmentClipInfo
This commit is contained in:
parent
5cc75af295
commit
88848f1d59
12 changed files with 122 additions and 75 deletions
|
|
@ -168,6 +168,22 @@ namespace swrenderer
|
|||
}
|
||||
}
|
||||
|
||||
void ProjectedWallLine::ClipTop(int x1, int x2, const DrawSegmentClipInfo& clip)
|
||||
{
|
||||
for (int i = x1; i < x2; i++)
|
||||
{
|
||||
ScreenY[i] = std::max(ScreenY[i], clip.sprtopclip[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void ProjectedWallLine::ClipBottom(int x1, int x2, const DrawSegmentClipInfo& clip)
|
||||
{
|
||||
for (int i = x1; i < x2; i++)
|
||||
{
|
||||
ScreenY[i] = std::min(ScreenY[i], clip.sprbottomclip[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void FWallTmapVals::InitFromWallCoords(RenderThread* thread, const FWallCoords* wallc)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue