mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
- restored portal code that shouldn't have been deleted.
This commit is contained in:
parent
cdd60b1431
commit
f6af50fc74
4 changed files with 35 additions and 18 deletions
|
@ -702,6 +702,21 @@ void HWDrawInfo::DoSubsector(subsector_t * sub)
|
||||||
ss_renderflags[sub->Index()] =
|
ss_renderflags[sub->Index()] =
|
||||||
(sub->numlines > 2) ? SSRF_PROCESSED|SSRF_RENDERALL : SSRF_PROCESSED;
|
(sub->numlines > 2) ? SSRF_PROCESSED|SSRF_RENDERALL : SSRF_PROCESSED;
|
||||||
if (sub->hacked & 1) AddHackedSubsector(sub);
|
if (sub->hacked & 1) AddHackedSubsector(sub);
|
||||||
|
|
||||||
|
// This is for portal coverage.
|
||||||
|
FSectorPortalGroup *portal;
|
||||||
|
|
||||||
|
portal = fakesector->GetPortalGroup(sector_t::ceiling);
|
||||||
|
if (portal != nullptr)
|
||||||
|
{
|
||||||
|
AddSubsectorToPortal(portal, sub);
|
||||||
|
}
|
||||||
|
|
||||||
|
portal = fakesector->GetPortalGroup(sector_t::floor);
|
||||||
|
if (portal != nullptr)
|
||||||
|
{
|
||||||
|
AddSubsectorToPortal(portal, sub);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -655,3 +655,22 @@ void HWDrawInfo::ProcessScene(bool toscreen, const std::function<void(HWDrawInfo
|
||||||
DrawScene(this, toscreen ? DM_MAINVIEW : DM_OFFSCREEN);
|
DrawScene(this, toscreen ? DM_MAINVIEW : DM_OFFSCREEN);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//==========================================================================
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//==========================================================================
|
||||||
|
|
||||||
|
void HWDrawInfo::AddSubsectorToPortal(FSectorPortalGroup *ptg, subsector_t *sub)
|
||||||
|
{
|
||||||
|
auto portal = FindPortal(ptg);
|
||||||
|
if (!portal)
|
||||||
|
{
|
||||||
|
portal = new HWScenePortal(screen->mPortalState, new HWSectorStackPortal(ptg));
|
||||||
|
Portals.Push(portal);
|
||||||
|
}
|
||||||
|
auto ptl = static_cast<HWSectorStackPortal*>(static_cast<HWScenePortal*>(portal)->mScene);
|
||||||
|
ptl->AddSubsector(sub);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -300,6 +300,7 @@ public:
|
||||||
void DrawPlayerSprites(bool hudModelStep, FRenderState &state);
|
void DrawPlayerSprites(bool hudModelStep, FRenderState &state);
|
||||||
|
|
||||||
void ProcessLowerMinisegs(TArray<seg_t *> &lowersegs);
|
void ProcessLowerMinisegs(TArray<seg_t *> &lowersegs);
|
||||||
|
void AddSubsectorToPortal(FSectorPortalGroup *portal, subsector_t *sub);
|
||||||
|
|
||||||
void AddWall(GLWall *w);
|
void AddWall(GLWall *w);
|
||||||
void AddMirrorSurface(GLWall *w);
|
void AddMirrorSurface(GLWall *w);
|
||||||
|
|
|
@ -1393,22 +1393,4 @@ void HWDrawInfo::ProcessSectorStacks(area_t in_area)
|
||||||
CeilingStacks.Clear();
|
CeilingStacks.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//==========================================================================
|
|
||||||
|
|
||||||
void HWDrawInfo::AddSubsectorToPortal(FSectorPortalGroup *ptg, subsector_t *sub)
|
|
||||||
{
|
|
||||||
auto portal = FindPortal(ptg);
|
|
||||||
if (!portal)
|
|
||||||
{
|
|
||||||
portal = new HWScenePortal(screen->mPortalState, new HWSectorStackPortal(ptg));
|
|
||||||
Portals.Push(portal);
|
|
||||||
}
|
|
||||||
auto ptl = static_cast<HWSectorStackPortal*>(static_cast<HWScenePortal*>(portal)->mScene);
|
|
||||||
ptl->AddSubsector(sub);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue