Move software renderer into its own namespace to isolate its globals and make

any access explicit. This reveals the places in the code where they are being
accessed where they shouldn't and prevents accidental usage.
This commit is contained in:
Magnus Norddahl 2016-12-01 02:38:32 +01:00
commit 9416d436fe
37 changed files with 231 additions and 157 deletions

View file

@ -58,6 +58,12 @@
#include "po_man.h"
#include "r_data/colormaps.h"
CVAR (Bool, r_drawflat, false, 0) // [RH] Don't texture segs?
EXTERN_CVAR(Bool, r_fullbrightignoresectorcolor);
namespace swrenderer
{
seg_t* curline;
side_t* sidedef;
line_t* linedef;
@ -104,8 +110,6 @@ TArray<PortalDrawseg> WallPortals(1000); // note: this array needs to go away as
subsector_t *InSubsector;
CVAR (Bool, r_drawflat, false, 0) // [RH] Don't texture segs?
EXTERN_CVAR(Bool, r_fullbrightignoresectorcolor);
void R_StoreWallRange (int start, int stop);
@ -1396,3 +1400,5 @@ void R_RenderBSPNode (void *node)
}
R_Subsector ((subsector_t *)((BYTE *)node - 1));
}
}