From 44adff459abb6d49581db91ad99e913be4c33ced Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Wed, 27 Apr 2016 22:49:36 -0500 Subject: [PATCH] Remove halfviewwidth - Why I thought I needed this variable in addition to centerx has long ago left my memory. --- src/doomstat.h | 1 - src/r_draw.cpp | 1 - src/r_main.cpp | 1 - src/r_plane.cpp | 2 +- 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/doomstat.h b/src/doomstat.h index b7b922aca..cfdca5e5a 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -121,7 +121,6 @@ extern int viewwindowx; extern int viewwindowy; extern "C" int viewheight; extern "C" int viewwidth; -extern "C" int halfviewwidth; // [RH] Half view width, for plane drawing diff --git a/src/r_draw.cpp b/src/r_draw.cpp index c58175912..80b91ed2d 100644 --- a/src/r_draw.cpp +++ b/src/r_draw.cpp @@ -60,7 +60,6 @@ extern int ST_Y; BYTE* viewimage; extern "C" { -int halfviewwidth; int ylookup[MAXHEIGHT]; BYTE *dc_destorg; } diff --git a/src/r_main.cpp b/src/r_main.cpp index b87119b88..0249544eb 100644 --- a/src/r_main.cpp +++ b/src/r_main.cpp @@ -351,7 +351,6 @@ void R_SWRSetWindow(int windowSize, int fullWidth, int fullHeight, int stHeight, } fuzzviewheight = viewheight - 2; // Maximum row the fuzzer can draw to - halfviewwidth = (viewwidth >> 1) - 1; lastcenteryfrac = 1<<30; CenterX = centerx; diff --git a/src/r_plane.cpp b/src/r_plane.cpp index 30e11a123..61ada5243 100644 --- a/src/r_plane.cpp +++ b/src/r_plane.cpp @@ -1525,7 +1525,7 @@ void R_DrawNormalPlane (visplane_t *pl, double _xscale, double _yscale, fixed_t ystepscale = (DWORD)(-(SDWORD)ystepscale); } - int x = pl->right - halfviewwidth - 1; + int x = pl->right - centerx; planeang += 90; basexfrac = xs_RoundToInt(xscale * planeang.Cos()) + x*xstepscale; baseyfrac = xs_RoundToInt(yscale * -planeang.Sin()) + x*ystepscale;