Skip to content

Commit

Permalink
Remove 'wall' global
Browse files Browse the repository at this point in the history
  • Loading branch information
somtwo committed Feb 28, 2021
1 parent a2aa6d1 commit 0236036
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions source/render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ void flyCamera(float delta)
}


struct
struct wall_t
{
int x1, x2;

Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -603,6 +603,7 @@ void projectWall(mapline_t *line)
else
istep = 1.0f;

wall_t wall;
wall.length = (t2 - t1).getLength();

wall.dist = i1;
Expand Down Expand Up @@ -923,9 +924,9 @@ void projectWall(mapline_t *line)
wall.yscale = side->yscale;

if(!backsector)
renderWall1s();
renderWall1s(wall);
else
renderWall2s();
renderWall2s(wall);
}


Expand Down

0 comments on commit 0236036

Please sign in to comment.