Move variables closer to their correct location

This commit is contained in:
Magnus Norddahl 2016-12-30 06:15:10 +01:00
parent 41d0e7c663
commit 775deeb151
8 changed files with 12 additions and 11 deletions

View file

@ -38,7 +38,7 @@
#include "r_things.h" #include "r_things.h"
#include "r_3dfloors.h" #include "r_3dfloors.h"
#include "r_clip_segment.h" #include "r_clip_segment.h"
#include "r_portal_segment.h" #include "r_portal.h"
#include "a_sharedglobal.h" #include "a_sharedglobal.h"
#include "g_level.h" #include "g_level.h"
#include "p_effect.h" #include "p_effect.h"

View file

@ -64,7 +64,7 @@
#include "r_walldraw.h" #include "r_walldraw.h"
#include "r_clip_segment.h" #include "r_clip_segment.h"
#include "r_draw_segment.h" #include "r_draw_segment.h"
#include "r_portal_segment.h" #include "r_portal.h"
#include "swrenderer\r_memory.h" #include "swrenderer\r_memory.h"
#ifdef _MSC_VER #ifdef _MSC_VER

View file

@ -49,6 +49,10 @@ CVAR(Bool, r_skyboxes, true, 0)
namespace swrenderer namespace swrenderer
{ {
PortalDrawseg *CurrentPortal = nullptr;
int CurrentPortalUniq = 0;
bool CurrentPortalInSkybox = false;
namespace namespace
{ {
int numskyboxes; // For ADD_STAT(skyboxes) int numskyboxes; // For ADD_STAT(skyboxes)

View file

@ -5,6 +5,10 @@
namespace swrenderer namespace swrenderer
{ {
extern PortalDrawseg* CurrentPortal;
extern int CurrentPortalUniq;
extern bool CurrentPortalInSkybox;
void R_DrawPortals(); void R_DrawPortals();
void R_DrawWallPortals(); void R_DrawWallPortals();
void R_EnterPortal(PortalDrawseg* pds, int depth); void R_EnterPortal(PortalDrawseg* pds, int depth);

View file

@ -26,9 +26,5 @@
namespace swrenderer namespace swrenderer
{ {
PortalDrawseg *CurrentPortal = nullptr;
int CurrentPortalUniq = 0;
bool CurrentPortalInSkybox = false;
TArray<PortalDrawseg> WallPortals(1000); // note: this array needs to go away as reallocation can cause crashes. TArray<PortalDrawseg> WallPortals(1000); // note: this array needs to go away as reallocation can cause crashes.
} }

View file

@ -19,8 +19,5 @@ namespace swrenderer
bool mirror; // true if this is a mirror (src should equal dst) bool mirror; // true if this is a mirror (src should equal dst)
}; };
extern PortalDrawseg* CurrentPortal;
extern int CurrentPortalUniq;
extern bool CurrentPortalInSkybox;
extern TArray<PortalDrawseg> WallPortals; extern TArray<PortalDrawseg> WallPortals;
} }

View file

@ -50,7 +50,7 @@
#include "r_data/colormaps.h" #include "r_data/colormaps.h"
#include "r_walldraw.h" #include "r_walldraw.h"
#include "r_draw_segment.h" #include "r_draw_segment.h"
#include "r_portal_segment.h" #include "r_portal.h"
#include "swrenderer\r_memory.h" #include "swrenderer\r_memory.h"
#define WALLYREPEAT 8 #define WALLYREPEAT 8

View file

@ -69,7 +69,7 @@
#include "p_maputl.h" #include "p_maputl.h"
#include "r_voxel.h" #include "r_voxel.h"
#include "r_draw_segment.h" #include "r_draw_segment.h"
#include "r_portal_segment.h" #include "r_portal.h"
#include "swrenderer\r_memory.h" #include "swrenderer\r_memory.h"
EXTERN_CVAR(Bool, st_scale) EXTERN_CVAR(Bool, st_scale)