mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-13 16:07:45 +00:00
Split Clear into two functions
This commit is contained in:
parent
e94cb3f114
commit
112085ebff
4 changed files with 23 additions and 25 deletions
|
@ -64,10 +64,13 @@ namespace swrenderer
|
||||||
return newplane;
|
return newplane;
|
||||||
}
|
}
|
||||||
|
|
||||||
void VisiblePlaneList::Clear(bool fullclear)
|
void VisiblePlaneList::Clear()
|
||||||
{
|
{
|
||||||
// Don't clear fake planes if not doing a full clear.
|
for (int i = 0; i <= MAXVISPLANES; i++)
|
||||||
if (!fullclear)
|
visplanes[i] = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
void VisiblePlaneList::ClearKeepFakePlanes()
|
||||||
{
|
{
|
||||||
for (int i = 0; i <= MAXVISPLANES - 1; i++)
|
for (int i = 0; i <= MAXVISPLANES - 1; i++)
|
||||||
{
|
{
|
||||||
|
@ -86,12 +89,6 @@ namespace swrenderer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
for (int i = 0; i <= MAXVISPLANES; i++)
|
|
||||||
visplanes[i] = nullptr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
VisiblePlane *VisiblePlaneList::FindPlane(const secplane_t &height, FTextureID picnum, int lightlevel, double Alpha, bool additive, const FTransform &xxform, int sky, FSectorPortal *portal, FDynamicColormap *basecolormap)
|
VisiblePlane *VisiblePlaneList::FindPlane(const secplane_t &height, FTextureID picnum, int lightlevel, double Alpha, bool additive, const FTransform &xxform, int sky, FSectorPortal *portal, FDynamicColormap *basecolormap)
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,7 +27,8 @@ namespace swrenderer
|
||||||
public:
|
public:
|
||||||
static VisiblePlaneList *Instance();
|
static VisiblePlaneList *Instance();
|
||||||
|
|
||||||
void Clear(bool fullclear);
|
void Clear();
|
||||||
|
void ClearKeepFakePlanes();
|
||||||
|
|
||||||
VisiblePlane *FindPlane(const secplane_t &height, FTextureID picnum, int lightlevel, double Alpha, bool additive, const FTransform &xxform, int sky, FSectorPortal *portal, FDynamicColormap *basecolormap);
|
VisiblePlane *FindPlane(const secplane_t &height, FTextureID picnum, int lightlevel, double Alpha, bool additive, const FTransform &xxform, int sky, FSectorPortal *portal, FDynamicColormap *basecolormap);
|
||||||
VisiblePlane *GetRange(VisiblePlane *pl, int start, int stop);
|
VisiblePlane *GetRange(VisiblePlane *pl, int start, int stop);
|
||||||
|
|
|
@ -165,7 +165,7 @@ namespace swrenderer
|
||||||
R_SetViewAngle();
|
R_SetViewAngle();
|
||||||
validcount++; // Make sure we see all sprites
|
validcount++; // Make sure we see all sprites
|
||||||
|
|
||||||
planes->Clear(false);
|
planes->ClearKeepFakePlanes();
|
||||||
RenderClipSegment::Instance()->Clear(pl->left, pl->right);
|
RenderClipSegment::Instance()->Clear(pl->left, pl->right);
|
||||||
WindowLeft = pl->left;
|
WindowLeft = pl->left;
|
||||||
WindowRight = pl->right;
|
WindowRight = pl->right;
|
||||||
|
@ -408,7 +408,7 @@ namespace swrenderer
|
||||||
PortalDrawseg* prevpds = CurrentPortal;
|
PortalDrawseg* prevpds = CurrentPortal;
|
||||||
CurrentPortal = pds;
|
CurrentPortal = pds;
|
||||||
|
|
||||||
VisiblePlaneList::Instance()->Clear(false);
|
VisiblePlaneList::Instance()->ClearKeepFakePlanes();
|
||||||
RenderClipSegment::Instance()->Clear(pds->x1, pds->x2);
|
RenderClipSegment::Instance()->Clear(pds->x1, pds->x2);
|
||||||
|
|
||||||
WindowLeft = pds->x1;
|
WindowLeft = pds->x1;
|
||||||
|
|
|
@ -133,7 +133,7 @@ namespace swrenderer
|
||||||
// Clear buffers.
|
// Clear buffers.
|
||||||
RenderClipSegment::Instance()->Clear(0, viewwidth);
|
RenderClipSegment::Instance()->Clear(0, viewwidth);
|
||||||
R_ClearDrawSegs();
|
R_ClearDrawSegs();
|
||||||
VisiblePlaneList::Instance()->Clear(true);
|
VisiblePlaneList::Instance()->Clear();
|
||||||
RenderTranslucentPass::Clear();
|
RenderTranslucentPass::Clear();
|
||||||
|
|
||||||
// opening / clipping determination
|
// opening / clipping determination
|
||||||
|
|
Loading…
Reference in a new issue