Move r_bsp into a class

This commit is contained in:
Magnus Norddahl 2017-01-04 15:39:47 +01:00
commit 28732d63d2
12 changed files with 678 additions and 697 deletions

View file

@ -170,7 +170,7 @@ namespace swrenderer
else if (pass == 0)
{
mceilingclip = walltop;
mfloorclip = ceilingclip;
mfloorclip = RenderBSP::Instance()->ceilingclip;
needrepeat = 1;
}
else
@ -186,7 +186,7 @@ namespace swrenderer
goto done;
}
mceilingclip = walltop;
mfloorclip = ceilingclip;
mfloorclip = RenderBSP::Instance()->ceilingclip;
break;
case RF_CLIPMID:
@ -203,7 +203,7 @@ namespace swrenderer
{
goto done;
}
mceilingclip = floorclip;
mceilingclip = RenderBSP::Instance()->floorclip;
mfloorclip = wallbottom;
break;
}
@ -296,7 +296,7 @@ namespace swrenderer
// If this sprite is RF_CLIPFULL on a two-sided line, needrepeat will
// be set 1 if we need to draw on the lower wall. In all other cases,
// needrepeat will be 0, and the while will fail.
mceilingclip = floorclip;
mceilingclip = RenderBSP::Instance()->floorclip;
mfloorclip = wallbottom;
R_FinishSetPatchStyle();
} while (needrepeat--);