From 8b0304c1e3075ff8d32c557d6cb0551737c3fde9 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Thu, 26 Jan 2017 08:24:44 +0100 Subject: [PATCH] Remove static from RenderFogBoundary --- src/swrenderer/line/r_fogboundary.cpp | 2 -- src/swrenderer/line/r_fogboundary.h | 7 +++---- src/swrenderer/line/r_renderdrawsegment.cpp | 3 ++- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/swrenderer/line/r_fogboundary.cpp b/src/swrenderer/line/r_fogboundary.cpp index 18cf94055..d0a36f948 100644 --- a/src/swrenderer/line/r_fogboundary.cpp +++ b/src/swrenderer/line/r_fogboundary.cpp @@ -145,6 +145,4 @@ namespace swrenderer R_Drawers()->DrawFogBoundaryLine(y, x1, spanend[y]); } } - - short RenderFogBoundary::spanend[MAXHEIGHT]; } diff --git a/src/swrenderer/line/r_fogboundary.h b/src/swrenderer/line/r_fogboundary.h index ba7cd0044..cfa0e139a 100644 --- a/src/swrenderer/line/r_fogboundary.h +++ b/src/swrenderer/line/r_fogboundary.h @@ -18,12 +18,11 @@ namespace swrenderer class RenderFogBoundary { public: - static void Render(int x1, int x2, short *uclip, short *dclip, int wallshade, float lightleft, float lightstep, FDynamicColormap *basecolormap); + void Render(int x1, int x2, short *uclip, short *dclip, int wallshade, float lightleft, float lightstep, FDynamicColormap *basecolormap); private: - static void RenderSection(int y, int y2, int x1); + void RenderSection(int y, int y2, int x1); - static short spanend[MAXHEIGHT]; + short spanend[MAXHEIGHT]; }; - } diff --git a/src/swrenderer/line/r_renderdrawsegment.cpp b/src/swrenderer/line/r_renderdrawsegment.cpp index 8e6160693..07a781795 100644 --- a/src/swrenderer/line/r_renderdrawsegment.cpp +++ b/src/swrenderer/line/r_renderdrawsegment.cpp @@ -48,6 +48,7 @@ namespace swrenderer { void RenderDrawSegment::Render(DrawSegment *ds, int x1, int x2) { + RenderFogBoundary renderfog; float *MaskedSWall = nullptr, MaskedScaleY = 0, rw_scalestep = 0; fixed_t *maskedtexturecol = nullptr; @@ -121,7 +122,7 @@ namespace swrenderer // [RH] Draw fog partition if (ds->bFogBoundary) { - RenderFogBoundary::Render(x1, x2, mceilingclip, mfloorclip, wallshade, rw_light, rw_lightstep, basecolormap); + renderfog.Render(x1, x2, mceilingclip, mfloorclip, wallshade, rw_light, rw_lightstep, basecolormap); if (ds->maskedtexturecol == nullptr) { goto clearfog;