diff --git a/src/swrenderer/line/r_line.cpp b/src/swrenderer/line/r_line.cpp index 51eeb76ff..95adff8aa 100644 --- a/src/swrenderer/line/r_line.cpp +++ b/src/swrenderer/line/r_line.cpp @@ -56,7 +56,7 @@ EXTERN_CVAR(Bool, r_fullbrightignoresectorcolor); namespace swrenderer { - void SWRenderLine::Render(seg_t *line, subsector_t *subsector, sector_t *sector, sector_t *fakebacksector, visplane_t *linefloorplane, visplane_t *lineceilingplane, bool infog, FDynamicColormap *colormap) + void SWRenderLine::Render(seg_t *line, subsector_t *subsector, sector_t *sector, sector_t *fakebacksector, VisiblePlane *linefloorplane, VisiblePlane *lineceilingplane, bool infog, FDynamicColormap *colormap) { static sector_t tempsec; // killough 3/8/98: ceiling/water hack bool solid; diff --git a/src/swrenderer/line/r_line.h b/src/swrenderer/line/r_line.h index c1ee23898..cb48eb4bb 100644 --- a/src/swrenderer/line/r_line.h +++ b/src/swrenderer/line/r_line.h @@ -24,7 +24,7 @@ struct FDynamicColormap; namespace swrenderer { - struct visplane_t; + struct VisiblePlane; struct FWallCoords { @@ -49,7 +49,7 @@ namespace swrenderer class SWRenderLine { public: - void Render(seg_t *line, subsector_t *subsector, sector_t *sector, sector_t *fakebacksector, visplane_t *floorplane, visplane_t *ceilingplane, bool foggy, FDynamicColormap *basecolormap); + void Render(seg_t *line, subsector_t *subsector, sector_t *sector, sector_t *fakebacksector, VisiblePlane *floorplane, VisiblePlane *ceilingplane, bool foggy, FDynamicColormap *basecolormap); private: bool RenderWallSegment(int x1, int x2); @@ -62,8 +62,8 @@ namespace swrenderer subsector_t *InSubsector; sector_t *frontsector; sector_t *backsector; - visplane_t *floorplane; - visplane_t *ceilingplane; + VisiblePlane *floorplane; + VisiblePlane *ceilingplane; seg_t *curline; side_t *sidedef; diff --git a/src/swrenderer/plane/r_flatplane.cpp b/src/swrenderer/plane/r_flatplane.cpp index 4c020468e..72e25dc1e 100644 --- a/src/swrenderer/plane/r_flatplane.cpp +++ b/src/swrenderer/plane/r_flatplane.cpp @@ -44,7 +44,7 @@ namespace swrenderer { - void RenderFlatPlane::Render(visplane_t *pl, double _xscale, double _yscale, fixed_t alpha, bool additive, bool masked, FDynamicColormap *colormap) + void RenderFlatPlane::Render(VisiblePlane *pl, double _xscale, double _yscale, fixed_t alpha, bool additive, bool masked, FDynamicColormap *colormap) { using namespace drawerargs; @@ -260,7 +260,7 @@ namespace swrenderer // Setup lights for row dc_num_lights = 0; dc_lights = lightbuffer + nextlightindex; - visplane_light *cur_node = light_list; + VisiblePlaneLight *cur_node = light_list; while (cur_node && nextlightindex < 64 * 1024) { double lightX = cur_node->lightsource->X() - ViewPos.X; @@ -363,7 +363,7 @@ namespace swrenderer ///////////////////////////////////////////////////////////////////////// - void RenderColoredPlane::Render(visplane_t *pl) + void RenderColoredPlane::Render(VisiblePlane *pl) { RenderLines(pl); } diff --git a/src/swrenderer/plane/r_flatplane.h b/src/swrenderer/plane/r_flatplane.h index c4077a908..249fe7f72 100644 --- a/src/swrenderer/plane/r_flatplane.h +++ b/src/swrenderer/plane/r_flatplane.h @@ -17,12 +17,12 @@ namespace swrenderer { - struct visplane_light; + struct VisiblePlaneLight; class RenderFlatPlane : PlaneRenderer { public: - void Render(visplane_t *pl, double _xscale, double _yscale, fixed_t alpha, bool additive, bool masked, FDynamicColormap *basecolormap); + void Render(VisiblePlane *pl, double _xscale, double _yscale, fixed_t alpha, bool additive, bool masked, FDynamicColormap *basecolormap); static void SetupSlope(); @@ -39,7 +39,7 @@ namespace swrenderer fixed_t xscale, yscale; double xstepscale, ystepscale; double basexfrac, baseyfrac; - visplane_light *light_list; + VisiblePlaneLight *light_list; static float yslope[MAXHEIGHT]; }; @@ -47,7 +47,7 @@ namespace swrenderer class RenderColoredPlane : PlaneRenderer { public: - void Render(visplane_t *pl); + void Render(VisiblePlane *pl); private: void RenderLine(int y, int x1, int x2) override; diff --git a/src/swrenderer/plane/r_planerenderer.cpp b/src/swrenderer/plane/r_planerenderer.cpp index 0a6d511bf..a3f47c5ea 100644 --- a/src/swrenderer/plane/r_planerenderer.cpp +++ b/src/swrenderer/plane/r_planerenderer.cpp @@ -33,7 +33,7 @@ namespace swrenderer { - void PlaneRenderer::RenderLines(visplane_t *pl) + void PlaneRenderer::RenderLines(VisiblePlane *pl) { // t1/b1 are at x // t2/b2 are at x+1 diff --git a/src/swrenderer/plane/r_planerenderer.h b/src/swrenderer/plane/r_planerenderer.h index a13fb14e2..97bc17f2b 100644 --- a/src/swrenderer/plane/r_planerenderer.h +++ b/src/swrenderer/plane/r_planerenderer.h @@ -18,12 +18,12 @@ namespace swrenderer { - struct visplane_t; + struct VisiblePlane; class PlaneRenderer { public: - void RenderLines(visplane_t *pl); + void RenderLines(VisiblePlane *pl); virtual void RenderLine(int y, int x1, int x2) = 0; virtual void StepColumn() { } diff --git a/src/swrenderer/plane/r_skyplane.cpp b/src/swrenderer/plane/r_skyplane.cpp index f2602eb1b..451d894b6 100644 --- a/src/swrenderer/plane/r_skyplane.cpp +++ b/src/swrenderer/plane/r_skyplane.cpp @@ -49,7 +49,7 @@ EXTERN_CVAR(Int, r_skymode) namespace swrenderer { - void RenderSkyPlane::Render(visplane_t *pl) + void RenderSkyPlane::Render(VisiblePlane *pl) { FTextureID sky1tex, sky2tex; double frontdpos = 0, backdpos = 0; @@ -252,7 +252,7 @@ namespace swrenderer } } - void RenderSkyPlane::DrawSky(visplane_t *pl) + void RenderSkyPlane::DrawSky(VisiblePlane *pl) { int x1 = pl->left; int x2 = pl->right; diff --git a/src/swrenderer/plane/r_skyplane.h b/src/swrenderer/plane/r_skyplane.h index 8deacaf18..8ea638a27 100644 --- a/src/swrenderer/plane/r_skyplane.h +++ b/src/swrenderer/plane/r_skyplane.h @@ -20,10 +20,10 @@ namespace swrenderer class RenderSkyPlane { public: - void Render(visplane_t *pl); + void Render(VisiblePlane *pl); private: - void DrawSky(visplane_t *pl); + void DrawSky(VisiblePlane *pl); void DrawSkyColumnStripe(int start_x, int y1, int y2, int columns, double scale, double texturemid, double yrepeat); void DrawSkyColumn(int start_x, int y1, int y2, int columns); diff --git a/src/swrenderer/plane/r_slopeplane.cpp b/src/swrenderer/plane/r_slopeplane.cpp index 9857dc11b..115b689ba 100644 --- a/src/swrenderer/plane/r_slopeplane.cpp +++ b/src/swrenderer/plane/r_slopeplane.cpp @@ -48,7 +48,7 @@ namespace swrenderer { - void RenderSlopePlane::Render(visplane_t *pl, double _xscale, double _yscale, fixed_t alpha, bool additive, bool masked, FDynamicColormap *colormap) + void RenderSlopePlane::Render(VisiblePlane *pl, double _xscale, double _yscale, fixed_t alpha, bool additive, bool masked, FDynamicColormap *colormap) { using namespace drawerargs; diff --git a/src/swrenderer/plane/r_slopeplane.h b/src/swrenderer/plane/r_slopeplane.h index 7dc6e7838..253e3b7cc 100644 --- a/src/swrenderer/plane/r_slopeplane.h +++ b/src/swrenderer/plane/r_slopeplane.h @@ -20,7 +20,7 @@ namespace swrenderer class RenderSlopePlane : PlaneRenderer { public: - void Render(visplane_t *pl, double _xscale, double _yscale, fixed_t alpha, bool additive, bool masked, FDynamicColormap *basecolormap); + void Render(VisiblePlane *pl, double _xscale, double _yscale, fixed_t alpha, bool additive, bool masked, FDynamicColormap *basecolormap); private: void RenderLine(int y, int x1, int x2) override; diff --git a/src/swrenderer/plane/r_visibleplane.cpp b/src/swrenderer/plane/r_visibleplane.cpp index 755af3461..3a7df8300 100644 --- a/src/swrenderer/plane/r_visibleplane.cpp +++ b/src/swrenderer/plane/r_visibleplane.cpp @@ -43,7 +43,7 @@ CVAR(Bool, tilt, false, 0); namespace swrenderer { - visplane_t::visplane_t() + VisiblePlane::VisiblePlane() { picnum.SetNull(); height.set(0.0, 0.0, 1.0, 0.0); @@ -55,7 +55,7 @@ namespace swrenderer fillshort(top, viewwidth, 0x7fff); } - void visplane_t::AddLights(FLightNode *node) + void VisiblePlane::AddLights(FLightNode *node) { if (!r_dynlights) return; @@ -65,7 +65,7 @@ namespace swrenderer if (!(node->lightsource->flags2&MF2_DORMANT)) { bool found = false; - visplane_light *light_node = lights; + VisiblePlaneLight *light_node = lights; while (light_node) { if (light_node->lightsource == node->lightsource) @@ -77,7 +77,7 @@ namespace swrenderer } if (!found) { - visplane_light *newlight = RenderMemory::NewObject(); + VisiblePlaneLight *newlight = RenderMemory::NewObject(); newlight->next = lights; newlight->lightsource = node->lightsource; lights = newlight; @@ -87,7 +87,7 @@ namespace swrenderer } } - void visplane_t::Render(fixed_t alpha, bool additive, bool masked) + void VisiblePlane::Render(fixed_t alpha, bool additive, bool masked) { if (left >= right) return; diff --git a/src/swrenderer/plane/r_visibleplane.h b/src/swrenderer/plane/r_visibleplane.h index 6c06fc802..d26f0fdfd 100644 --- a/src/swrenderer/plane/r_visibleplane.h +++ b/src/swrenderer/plane/r_visibleplane.h @@ -25,24 +25,24 @@ struct FSectorPortal; namespace swrenderer { - struct visplane_light + struct VisiblePlaneLight { ADynamicLight *lightsource; - visplane_light *next; + VisiblePlaneLight *next; }; - struct visplane_t + struct VisiblePlane { - visplane_t(); + VisiblePlane(); void AddLights(FLightNode *node); void Render(fixed_t alpha, bool additive, bool masked); - visplane_t *next = nullptr; // Next visplane in hash chain -- killough + VisiblePlane *next = nullptr; // Next visplane in hash chain -- killough FDynamicColormap *colormap = nullptr; // [RH] Support multiple colormaps FSectorPortal *portal = nullptr; // [RH] Support sky boxes - visplane_light *lights = nullptr; + VisiblePlaneLight *lights = nullptr; FTransform xform; secplane_t height; diff --git a/src/swrenderer/plane/r_visibleplanelist.cpp b/src/swrenderer/plane/r_visibleplanelist.cpp index d9849f2cc..966329e97 100644 --- a/src/swrenderer/plane/r_visibleplanelist.cpp +++ b/src/swrenderer/plane/r_visibleplanelist.cpp @@ -56,9 +56,9 @@ namespace swrenderer plane = nullptr; } - visplane_t *VisiblePlaneList::Add(unsigned hash) + VisiblePlane *VisiblePlaneList::Add(unsigned hash) { - visplane_t *newplane = RenderMemory::NewObject(); + VisiblePlane *newplane = RenderMemory::NewObject(); newplane->next = visplanes[hash]; visplanes[hash] = newplane; return newplane; @@ -71,7 +71,7 @@ namespace swrenderer { for (int i = 0; i <= MAXVISPLANES - 1; i++) { - for (visplane_t **probe = &visplanes[i]; *probe != nullptr; ) + for (VisiblePlane **probe = &visplanes[i]; *probe != nullptr; ) { if ((*probe)->sky < 0) { // fake: move past it @@ -79,7 +79,7 @@ namespace swrenderer } else { // not fake: move from list - visplane_t *vis = *probe; + VisiblePlane *vis = *probe; *probe = vis->next; vis->next = nullptr; } @@ -93,10 +93,10 @@ namespace swrenderer } } - visplane_t *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) { secplane_t plane; - visplane_t *check; + VisiblePlane *check; unsigned hash; // killough bool isskybox; const FTransform *xform = &xxform; @@ -223,7 +223,7 @@ namespace swrenderer return check; } - visplane_t *VisiblePlaneList::GetRange(visplane_t *pl, int start, int stop) + VisiblePlane *VisiblePlaneList::GetRange(VisiblePlane *pl, int start, int stop) { int intrl, intrh; int unionl, unionh; @@ -276,7 +276,7 @@ namespace swrenderer { hash = CalcHash(pl->picnum.GetIndex(), pl->lightlevel, pl->height); } - visplane_t *new_pl = Add(hash); + VisiblePlane *new_pl = Add(hash); new_pl->height = pl->height; new_pl->picnum = pl->picnum; @@ -307,9 +307,9 @@ namespace swrenderer return visplanes[MAXVISPLANES] != nullptr; } - visplane_t *VisiblePlaneList::PopFirstPortalPlane() + VisiblePlane *VisiblePlaneList::PopFirstPortalPlane() { - visplane_t *pl = visplanes[VisiblePlaneList::MAXVISPLANES]; + VisiblePlane *pl = visplanes[VisiblePlaneList::MAXVISPLANES]; if (pl) { visplanes[VisiblePlaneList::MAXVISPLANES] = pl->next; @@ -325,7 +325,7 @@ namespace swrenderer int VisiblePlaneList::Render() { - visplane_t *pl; + VisiblePlane *pl; int i; int vpcount = 0; @@ -352,7 +352,7 @@ namespace swrenderer void VisiblePlaneList::RenderHeight(double height) { - visplane_t *pl; + VisiblePlane *pl; int i; drawerargs::ds_color = 3; diff --git a/src/swrenderer/plane/r_visibleplanelist.h b/src/swrenderer/plane/r_visibleplanelist.h index 64266c80d..92f3609e9 100644 --- a/src/swrenderer/plane/r_visibleplanelist.h +++ b/src/swrenderer/plane/r_visibleplanelist.h @@ -20,7 +20,7 @@ struct FSectorPortal; namespace swrenderer { - struct visplane_t; + struct VisiblePlane; class VisiblePlaneList { @@ -29,11 +29,11 @@ namespace swrenderer void Clear(bool fullclear); - visplane_t *FindPlane(const secplane_t &height, FTextureID picnum, int lightlevel, double Alpha, bool additive, const FTransform &xxform, int sky, FSectorPortal *portal, FDynamicColormap *basecolormap); - visplane_t *GetRange(visplane_t *pl, int start, int stop); + 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); bool HasPortalPlanes() const; - visplane_t *PopFirstPortalPlane(); + VisiblePlane *PopFirstPortalPlane(); void ClearPortalPlanes(); int Render(); @@ -41,10 +41,10 @@ namespace swrenderer private: VisiblePlaneList(); - visplane_t *Add(unsigned hash); + VisiblePlane *Add(unsigned hash); enum { MAXVISPLANES = 128 }; // must be a power of 2 - visplane_t *visplanes[MAXVISPLANES + 1]; + VisiblePlane *visplanes[MAXVISPLANES + 1]; static unsigned CalcHash(int picnum, int lightlevel, const secplane_t &height) { return (unsigned)((picnum) * 3 + (lightlevel)+(FLOAT2FIXED((height).fD())) * 7) & (MAXVISPLANES - 1); } }; diff --git a/src/swrenderer/scene/r_opaque_pass.cpp b/src/swrenderer/scene/r_opaque_pass.cpp index 05ebc1b1a..2018fe38f 100644 --- a/src/swrenderer/scene/r_opaque_pass.cpp +++ b/src/swrenderer/scene/r_opaque_pass.cpp @@ -398,7 +398,7 @@ namespace swrenderer } // kg3D - add fake segs, never rendered - void RenderOpaquePass::FakeDrawLoop(subsector_t *sub, visplane_t *floorplane, visplane_t *ceilingplane, bool foggy, FDynamicColormap *basecolormap) + void RenderOpaquePass::FakeDrawLoop(subsector_t *sub, VisiblePlane *floorplane, VisiblePlane *ceilingplane, bool foggy, FDynamicColormap *basecolormap) { int count; seg_t* line; @@ -432,8 +432,8 @@ namespace swrenderer FSectorPortal *portal; // kg3D - fake floor stuff - visplane_t *backupfp; - visplane_t *backupcp; + VisiblePlane *backupfp; + VisiblePlane *backupcp; //secplane_t templane; lightlist_t *light; @@ -498,7 +498,7 @@ namespace swrenderer portal = frontsector->ValidatePortal(sector_t::ceiling); - visplane_t *ceilingplane = frontsector->ceilingplane.PointOnSide(ViewPos) > 0 || + VisiblePlane *ceilingplane = frontsector->ceilingplane.PointOnSide(ViewPos) > 0 || frontsector->GetTexture(sector_t::ceiling) == skyflatnum || portal != nullptr || (frontsector->heightsec && @@ -539,7 +539,7 @@ namespace swrenderer // killough 10/98: add support for skies transferred from sidedefs portal = frontsector->ValidatePortal(sector_t::floor); - visplane_t *floorplane = frontsector->floorplane.PointOnSide(ViewPos) > 0 || // killough 3/7/98 + VisiblePlane *floorplane = frontsector->floorplane.PointOnSide(ViewPos) > 0 || // killough 3/7/98 frontsector->GetTexture(sector_t::floor) == skyflatnum || portal != nullptr || (frontsector->heightsec && diff --git a/src/swrenderer/scene/r_opaque_pass.h b/src/swrenderer/scene/r_opaque_pass.h index e0a244092..a009cc772 100644 --- a/src/swrenderer/scene/r_opaque_pass.h +++ b/src/swrenderer/scene/r_opaque_pass.h @@ -23,7 +23,7 @@ struct FVoxelDef; namespace swrenderer { - struct visplane_t; + struct VisiblePlane; // The 3072 below is just an arbitrary value picked to avoid // drawing lines the player is too close to that would overflow @@ -68,7 +68,7 @@ namespace swrenderer bool CheckBBox(float *bspcoord); void AddPolyobjs(subsector_t *sub); - void FakeDrawLoop(subsector_t *sub, visplane_t *floorplane, visplane_t *ceilingplane, bool foggy, FDynamicColormap *basecolormap); + void FakeDrawLoop(subsector_t *sub, VisiblePlane *floorplane, VisiblePlane *ceilingplane, bool foggy, FDynamicColormap *basecolormap); void AddSprites(sector_t *sec, int lightlevel, WaterFakeSide fakeside, bool foggy, FDynamicColormap *basecolormap); diff --git a/src/swrenderer/scene/r_portal.cpp b/src/swrenderer/scene/r_portal.cpp index d05a8c4ca..158ef7062 100644 --- a/src/swrenderer/scene/r_portal.cpp +++ b/src/swrenderer/scene/r_portal.cpp @@ -109,7 +109,7 @@ namespace swrenderer AActor *savedcamera = camera; sector_t *savedsector = viewsector; - for (visplane_t *pl = planes->PopFirstPortalPlane(); pl != nullptr; pl = planes->PopFirstPortalPlane()) + for (VisiblePlane *pl = planes->PopFirstPortalPlane(); pl != nullptr; pl = planes->PopFirstPortalPlane()) { if (pl->right < pl->left || !r_skyboxes || numskyboxes == MAX_SKYBOX_PLANES || pl->portal == nullptr) { @@ -244,7 +244,7 @@ namespace swrenderer VisibleSpriteList::Instance()->PopPortal(); - visplane_t *pl; + VisiblePlane *pl; visplaneStack.Pop(pl); if (pl->Alpha > 0 && pl->picnum != skyflatnum) { diff --git a/src/swrenderer/scene/r_portal.h b/src/swrenderer/scene/r_portal.h index 654468d72..74bd4e349 100644 --- a/src/swrenderer/scene/r_portal.h +++ b/src/swrenderer/scene/r_portal.h @@ -17,7 +17,7 @@ namespace swrenderer { - struct visplane_t; + struct VisiblePlane; class RenderPortal { @@ -56,6 +56,6 @@ namespace swrenderer TArray interestingStack; TArray drawsegStack; TArray viewposStack; - TArray visplaneStack; + TArray visplaneStack; }; }