Renamed Clip3DFloors to Clip3D to fix gcc compile error

This commit is contained in:
Magnus Norddahl 2017-02-06 16:04:27 +01:00
parent 7e6c91d73c
commit 58495ea714
10 changed files with 30 additions and 30 deletions

View file

@ -123,7 +123,7 @@ namespace swrenderer
WallT.InitFromLine(Thread, v1->fPos() - ViewPos, v2->fPos() - ViewPos); WallT.InitFromLine(Thread, v1->fPos() - ViewPos, v2->fPos() - ViewPos);
} }
Clip3DFloors *clip3d = Thread->Clip3DFloors.get(); Clip3DFloors *clip3d = Thread->Clip3D.get();
if (!(clip3d->fake3D & FAKE3D_FAKEBACK)) if (!(clip3d->fake3D & FAKE3D_FAKEBACK))
{ {
@ -352,7 +352,7 @@ namespace swrenderer
draw_segment->bFakeBoundary = false; draw_segment->bFakeBoundary = false;
draw_segment->foggy = foggy; draw_segment->foggy = foggy;
Clip3DFloors *clip3d = Thread->Clip3DFloors.get(); Clip3DFloors *clip3d = Thread->Clip3D.get();
if (clip3d->fake3D & FAKE3D_FAKEMASK) draw_segment->fake = 1; if (clip3d->fake3D & FAKE3D_FAKEMASK) draw_segment->fake = 1;
else draw_segment->fake = 0; else draw_segment->fake = 0;
@ -955,7 +955,7 @@ namespace swrenderer
} }
} }
Clip3DFloors *clip3d = Thread->Clip3DFloors.get(); Clip3DFloors *clip3d = Thread->Clip3D.get();
// mark ceiling areas // mark ceiling areas
if (markceiling) if (markceiling)

View file

@ -110,7 +110,7 @@ namespace swrenderer
rw_lightstep = ds->lightstep; rw_lightstep = ds->lightstep;
rw_light = ds->light + (x1 - ds->x1) * rw_lightstep; rw_light = ds->light + (x1 - ds->x1) * rw_lightstep;
Clip3DFloors *clip3d = Thread->Clip3DFloors.get(); Clip3DFloors *clip3d = Thread->Clip3D.get();
CameraLight *cameraLight = CameraLight::Instance(); CameraLight *cameraLight = CameraLight::Instance();
if (cameraLight->FixedLightLevel() < 0) if (cameraLight->FixedLightLevel() < 0)
@ -478,7 +478,7 @@ namespace swrenderer
WallC.tright.Y = ds->cy + ds->cdy; WallC.tright.Y = ds->cy + ds->cdy;
WallT = ds->tmapvals; WallT = ds->tmapvals;
Clip3DFloors *clip3d = Thread->Clip3DFloors.get(); Clip3DFloors *clip3d = Thread->Clip3D.get();
wallupper.Project(clip3d->sclipTop - ViewPos.Z, &WallC); wallupper.Project(clip3d->sclipTop - ViewPos.Z, &WallC);
walllower.Project(clip3d->sclipBottom - ViewPos.Z, &WallC); walllower.Project(clip3d->sclipBottom - ViewPos.Z, &WallC);
@ -532,7 +532,7 @@ namespace swrenderer
floorHeight = backsector->CenterFloor(); floorHeight = backsector->CenterFloor();
ceilingHeight = backsector->CenterCeiling(); ceilingHeight = backsector->CenterCeiling();
Clip3DFloors *clip3d = Thread->Clip3DFloors.get(); Clip3DFloors *clip3d = Thread->Clip3D.get();
// maybe fix clipheights // maybe fix clipheights
if (!(clip3d->fake3D & FAKE3D_CLIPBOTTOM)) clip3d->sclipBottom = floorHeight; if (!(clip3d->fake3D & FAKE3D_CLIPBOTTOM)) clip3d->sclipBottom = floorHeight;
@ -938,7 +938,7 @@ namespace swrenderer
top = MAX(frontcz1, frontcz2); top = MAX(frontcz1, frontcz2);
bot = MIN(frontfz1, frontfz2); bot = MIN(frontfz1, frontfz2);
Clip3DFloors *clip3d = Thread->Clip3DFloors.get(); Clip3DFloors *clip3d = Thread->Clip3D.get();
if (clip3d->fake3D & FAKE3D_CLIPTOP) if (clip3d->fake3D & FAKE3D_CLIPTOP)
{ {
top = MIN(top, clip3d->sclipTop); top = MIN(top, clip3d->sclipTop);

View file

@ -129,7 +129,7 @@ namespace swrenderer
// kg3D - hack, store alpha in sky // kg3D - hack, store alpha in sky
// i know there is ->alpha, but this also allows to identify fake plane // i know there is ->alpha, but this also allows to identify fake plane
// and ->alpha is for stacked sectors // and ->alpha is for stacked sectors
Clip3DFloors *clip3d = Thread->Clip3DFloors.get(); Clip3DFloors *clip3d = Thread->Clip3D.get();
if (clip3d->fake3D & (FAKE3D_FAKEFLOOR | FAKE3D_FAKECEILING)) sky = 0x80000000 | clip3d->fakeAlpha; if (clip3d->fake3D & (FAKE3D_FAKEFLOOR | FAKE3D_FAKECEILING)) sky = 0x80000000 | clip3d->fakeAlpha;
else sky = 0; // not skyflatnum so it can't be a sky else sky = 0; // not skyflatnum so it can't be a sky
portal = nullptr; portal = nullptr;
@ -190,7 +190,7 @@ namespace swrenderer
sky == check->sky && sky == check->sky &&
renderportal->CurrentPortalUniq == check->CurrentPortalUniq && renderportal->CurrentPortalUniq == check->CurrentPortalUniq &&
renderportal->MirrorFlags == check->MirrorFlags && renderportal->MirrorFlags == check->MirrorFlags &&
Thread->Clip3DFloors->CurrentSkybox == check->CurrentSkybox && Thread->Clip3D->CurrentSkybox == check->CurrentSkybox &&
ViewPos == check->viewpos ViewPos == check->viewpos
) )
{ {
@ -215,7 +215,7 @@ namespace swrenderer
check->Additive = additive; check->Additive = additive;
check->CurrentPortalUniq = renderportal->CurrentPortalUniq; check->CurrentPortalUniq = renderportal->CurrentPortalUniq;
check->MirrorFlags = renderportal->MirrorFlags; check->MirrorFlags = renderportal->MirrorFlags;
check->CurrentSkybox = Thread->Clip3DFloors->CurrentSkybox; check->CurrentSkybox = Thread->Clip3D->CurrentSkybox;
return check; return check;
} }
@ -333,7 +333,7 @@ namespace swrenderer
for (pl = visplanes[i]; pl; pl = pl->next) for (pl = visplanes[i]; pl; pl = pl->next)
{ {
// kg3D - draw only correct planes // kg3D - draw only correct planes
if (pl->CurrentPortalUniq != renderportal->CurrentPortalUniq || pl->CurrentSkybox != Thread->Clip3DFloors->CurrentSkybox) if (pl->CurrentPortalUniq != renderportal->CurrentPortalUniq || pl->CurrentSkybox != Thread->Clip3D->CurrentSkybox)
continue; continue;
// kg3D - draw only real planes now // kg3D - draw only real planes now
if (pl->sky >= 0) { if (pl->sky >= 0) {
@ -359,7 +359,7 @@ namespace swrenderer
{ {
for (pl = visplanes[i]; pl; pl = pl->next) for (pl = visplanes[i]; pl; pl = pl->next)
{ {
if (pl->CurrentSkybox != Thread->Clip3DFloors->CurrentSkybox || pl->CurrentPortalUniq != renderportal->CurrentPortalUniq) if (pl->CurrentSkybox != Thread->Clip3D->CurrentSkybox || pl->CurrentPortalUniq != renderportal->CurrentPortalUniq)
continue; continue;
if (pl->sky < 0 && pl->height.Zat0() == height) if (pl->sky < 0 && pl->height.Zat0() == height)

View file

@ -66,7 +66,7 @@ namespace swrenderer
TranslucentPass = std::make_unique<RenderTranslucentPass>(this); TranslucentPass = std::make_unique<RenderTranslucentPass>(this);
SpriteList = std::make_unique<VisibleSpriteList>(); SpriteList = std::make_unique<VisibleSpriteList>();
Portal = std::make_unique<RenderPortal>(this); Portal = std::make_unique<RenderPortal>(this);
Clip3DFloors = std::make_unique<swrenderer::Clip3DFloors>(this); Clip3D = std::make_unique<Clip3DFloors>(this);
PlayerSprites = std::make_unique<RenderPlayerSprites>(this); PlayerSprites = std::make_unique<RenderPlayerSprites>(this);
PlaneList = std::make_unique<VisiblePlaneList>(this); PlaneList = std::make_unique<VisiblePlaneList>(this);
DrawSegments = std::make_unique<DrawSegmentList>(this); DrawSegments = std::make_unique<DrawSegmentList>(this);

View file

@ -61,7 +61,7 @@ namespace swrenderer
std::unique_ptr<RenderTranslucentPass> TranslucentPass; std::unique_ptr<RenderTranslucentPass> TranslucentPass;
std::unique_ptr<VisibleSpriteList> SpriteList; std::unique_ptr<VisibleSpriteList> SpriteList;
std::unique_ptr<RenderPortal> Portal; std::unique_ptr<RenderPortal> Portal;
std::unique_ptr<Clip3DFloors> Clip3DFloors; std::unique_ptr<Clip3DFloors> Clip3D;
std::unique_ptr<RenderPlayerSprites> PlayerSprites; std::unique_ptr<RenderPlayerSprites> PlayerSprites;
std::unique_ptr<VisiblePlaneList> PlaneList; std::unique_ptr<VisiblePlaneList> PlaneList;
std::unique_ptr<DrawSegmentList> DrawSegments; std::unique_ptr<DrawSegmentList> DrawSegments;

View file

@ -568,7 +568,7 @@ namespace swrenderer
backupfp = floorplane; backupfp = floorplane;
backupcp = ceilingplane; backupcp = ceilingplane;
Clip3DFloors *clip3d = Thread->Clip3DFloors.get(); Clip3DFloors *clip3d = Thread->Clip3D.get();
// first check all floors // first check all floors
for (int i = 0; i < (int)frontsector->e->XFloor.ffloors.Size(); i++) for (int i = 0; i < (int)frontsector->e->XFloor.ffloors.Size(); i++)
@ -738,7 +738,7 @@ namespace swrenderer
backupcp = ceilingplane; backupcp = ceilingplane;
floorplane = nullptr; floorplane = nullptr;
ceilingplane = nullptr; ceilingplane = nullptr;
Clip3DFloors *clip3d = Thread->Clip3DFloors.get(); Clip3DFloors *clip3d = Thread->Clip3D.get();
for (unsigned int i = 0; i < line->backsector->e->XFloor.ffloors.Size(); i++) for (unsigned int i = 0; i < line->backsector->e->XFloor.ffloors.Size(); i++)
{ {
clip3d->SetFakeFloor(line->backsector->e->XFloor.ffloors[i]); clip3d->SetFakeFloor(line->backsector->e->XFloor.ffloors[i]);

View file

@ -98,7 +98,7 @@ namespace swrenderer
if (!planes->HasPortalPlanes()) if (!planes->HasPortalPlanes())
return; return;
Thread->Clip3DFloors->EnterSkybox(); Thread->Clip3D->EnterSkybox();
CurrentPortalInSkybox = true; CurrentPortalInSkybox = true;
int savedextralight = extralight; int savedextralight = extralight;
@ -213,7 +213,7 @@ namespace swrenderer
visplaneStack.Push(pl); visplaneStack.Push(pl);
Thread->OpaquePass->RenderScene(); Thread->OpaquePass->RenderScene();
Thread->Clip3DFloors->ResetClip(); // reset clips (floor/ceiling) Thread->Clip3D->ResetClip(); // reset clips (floor/ceiling)
planes->Render(); planes->Render();
port->mFlags &= ~PORTSF_INSKYBOX; port->mFlags &= ~PORTSF_INSKYBOX;
@ -250,9 +250,9 @@ namespace swrenderer
R_SetViewAngle(); R_SetViewAngle();
CurrentPortalInSkybox = false; CurrentPortalInSkybox = false;
Thread->Clip3DFloors->LeaveSkybox(); Thread->Clip3D->LeaveSkybox();
if (Thread->Clip3DFloors->fakeActive) return; if (Thread->Clip3D->fakeActive) return;
planes->ClearPortalPlanes(); planes->ClearPortalPlanes();
} }
@ -411,7 +411,7 @@ namespace swrenderer
} }
// some portals have height differences, account for this here // some portals have height differences, account for this here
Thread->Clip3DFloors->EnterSkybox(); // push 3D floor height map Thread->Clip3D->EnterSkybox(); // push 3D floor height map
CurrentPortalInSkybox = false; // first portal in a skybox should set this variable to false for proper clipping in skyboxes. CurrentPortalInSkybox = false; // first portal in a skybox should set this variable to false for proper clipping in skyboxes.
// first pass, set clipping // first pass, set clipping
@ -421,7 +421,7 @@ namespace swrenderer
memcpy(floorclip + pds->x1, &pds->floorclip[0], pds->len * sizeof(*floorclip)); memcpy(floorclip + pds->x1, &pds->floorclip[0], pds->len * sizeof(*floorclip));
Thread->OpaquePass->RenderScene(); Thread->OpaquePass->RenderScene();
Thread->Clip3DFloors->ResetClip(); // reset clips (floor/ceiling) Thread->Clip3D->ResetClip(); // reset clips (floor/ceiling)
if (!savedvisibility && camera) camera->renderflags &= ~RF_INVISIBLE; if (!savedvisibility && camera) camera->renderflags &= ~RF_INVISIBLE;
PlaneCycles.Clock(); PlaneCycles.Clock();
@ -451,7 +451,7 @@ namespace swrenderer
if (Thread->MainThread) if (Thread->MainThread)
NetUpdate(); NetUpdate();
Thread->Clip3DFloors->LeaveSkybox(); // pop 3D floor height map Thread->Clip3D->LeaveSkybox(); // pop 3D floor height map
CurrentPortalUniq = prevuniq2; CurrentPortalUniq = prevuniq2;
// draw a red line around a portal if it's being highlighted // draw a red line around a portal if it's being highlighted

View file

@ -215,8 +215,8 @@ namespace swrenderer
void RenderScene::RenderThreadSlice(RenderThread *thread) void RenderScene::RenderThreadSlice(RenderThread *thread)
{ {
thread->FrameMemory->Clear(); thread->FrameMemory->Clear();
thread->Clip3DFloors->Cleanup(); thread->Clip3D->Cleanup();
thread->Clip3DFloors->ResetClip(); // reset clips (floor/ceiling) thread->Clip3D->ResetClip(); // reset clips (floor/ceiling)
thread->Portal->CopyStackedViewParameters(); thread->Portal->CopyStackedViewParameters();
thread->ClipSegments->Clear(0, viewwidth); thread->ClipSegments->Clear(0, viewwidth);
thread->DrawSegments->Clear(); thread->DrawSegments->Clear();
@ -237,7 +237,7 @@ namespace swrenderer
WallCycles.Clock(); WallCycles.Clock();
thread->OpaquePass->RenderScene(); thread->OpaquePass->RenderScene();
thread->Clip3DFloors->ResetClip(); // reset clips (floor/ceiling) thread->Clip3D->ResetClip(); // reset clips (floor/ceiling)
if (thread == MainThread()) if (thread == MainThread())
WallCycles.Unclock(); WallCycles.Unclock();
@ -375,7 +375,7 @@ namespace swrenderer
void RenderScene::Deinit() void RenderScene::Deinit()
{ {
MainThread()->TranslucentPass->Deinit(); MainThread()->TranslucentPass->Deinit();
MainThread()->Clip3DFloors->Cleanup(); MainThread()->Clip3D->Cleanup();
} }
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////

View file

@ -140,7 +140,7 @@ namespace swrenderer
if (renew) if (renew)
{ {
Thread->Clip3DFloors->fake3D |= FAKE3D_REFRESHCLIP; Thread->Clip3D->fake3D |= FAKE3D_REFRESHCLIP;
} }
DrawSegmentList *drawseglist = Thread->DrawSegments.get(); DrawSegmentList *drawseglist = Thread->DrawSegments.get();
@ -167,7 +167,7 @@ namespace swrenderer
Thread->SpriteList->Sort(); Thread->SpriteList->Sort();
Thread->DrawSegments->BuildSegmentGroups(); Thread->DrawSegments->BuildSegmentGroups();
Clip3DFloors *clip3d = Thread->Clip3DFloors.get(); Clip3DFloors *clip3d = Thread->Clip3D.get();
if (clip3d->height_top == nullptr) if (clip3d->height_top == nullptr)
{ // kg3D - no visible 3D floors, normal rendering { // kg3D - no visible 3D floors, normal rendering
DrawMaskedSingle(false); DrawMaskedSingle(false);

View file

@ -57,7 +57,7 @@ namespace swrenderer
int colormapnum = spr->Light.ColormapNum; int colormapnum = spr->Light.ColormapNum;
F3DFloor *rover; F3DFloor *rover;
Clip3DFloors *clip3d = thread->Clip3DFloors.get(); Clip3DFloors *clip3d = thread->Clip3D.get();
// [RH] Check for particles // [RH] Check for particles
if (spr->IsParticle()) if (spr->IsParticle())