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

@ -15,6 +15,11 @@
#include "c_cvars.h"
#include "r_3dfloors.h"
CVAR(Int, r_3dfloors, true, 0);
namespace swrenderer
{
// external variables
int fake3D;
F3DFloor *fakeFloor;
@ -28,8 +33,6 @@ HeightLevel *height_cur = NULL;
int CurrentMirror = 0;
int CurrentSkybox = 0;
CVAR(Int, r_3dfloors, true, 0);
// private variables
int height_max = -1;
TArray<HeightStack> toplist;
@ -160,3 +163,4 @@ void R_3D_LeaveSkybox()
CurrentSkybox--;
}
}