From 0236036c17bdedcbbb73042d76805bc444a7515b Mon Sep 17 00:00:00 2001 From: Stephen McGranahan Date: Sat, 27 Feb 2021 18:45:39 -0600 Subject: [PATCH] Remove 'wall' global --- source/render.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/source/render.cpp b/source/render.cpp index 05bc1d3..91899d0 100644 --- a/source/render.cpp +++ b/source/render.cpp @@ -177,7 +177,7 @@ void flyCamera(float delta) } -struct +struct wall_t { int x1, x2; @@ -201,11 +201,11 @@ struct bool markfloor, markceiling; visplane_t *floorp, *ceilingp; -} wall; +}; -void renderWall1s(void) +void renderWall1s(wall_t wall) { float basescale, yscale, xscale; int t, b; @@ -288,7 +288,7 @@ void renderWall1s(void) } -void renderWall2s(void) +void renderWall2s(wall_t wall) { float basescale, yscale, xscale; int h, l, t, b, m; @@ -603,6 +603,7 @@ void projectWall(mapline_t *line) else istep = 1.0f; + wall_t wall; wall.length = (t2 - t1).getLength(); wall.dist = i1; @@ -923,9 +924,9 @@ void projectWall(mapline_t *line) wall.yscale = side->yscale; if(!backsector) - renderWall1s(); + renderWall1s(wall); else - renderWall2s(); + renderWall2s(wall); }