From abdc7f9ff11a044186056feca1f7ae4e975399a6 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Tue, 3 Jan 2017 19:25:00 +0100 Subject: [PATCH] Move WindowLeft, WindowRight, MirrorFlags to r_portal --- src/swrenderer/line/r_walldraw.cpp | 1 + src/swrenderer/scene/r_bsp.cpp | 3 --- src/swrenderer/scene/r_bsp.h | 3 --- src/swrenderer/scene/r_portal.cpp | 3 +++ src/swrenderer/scene/r_portal.h | 3 +++ src/swrenderer/segments/r_drawsegment.cpp | 1 + 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/swrenderer/line/r_walldraw.cpp b/src/swrenderer/line/r_walldraw.cpp index 26f8e923d1..e486ffbcb7 100644 --- a/src/swrenderer/line/r_walldraw.cpp +++ b/src/swrenderer/line/r_walldraw.cpp @@ -44,6 +44,7 @@ #include "swrenderer/segments/r_drawsegment.h" #include "swrenderer/scene/r_bsp.h" #include "swrenderer/scene/r_3dfloors.h" +#include "swrenderer/scene/r_portal.h" #include "swrenderer/line/r_walldraw.h" #include "swrenderer/line/r_wallsetup.h" diff --git a/src/swrenderer/scene/r_bsp.cpp b/src/swrenderer/scene/r_bsp.cpp index 20b04ebaff..dc7747ec35 100644 --- a/src/swrenderer/scene/r_bsp.cpp +++ b/src/swrenderer/scene/r_bsp.cpp @@ -71,9 +71,6 @@ bool r_fakingunderwater; static BYTE FakeSide; -int WindowLeft, WindowRight; -WORD MirrorFlags; - visplane_t *floorplane; visplane_t *ceilingplane; diff --git a/src/swrenderer/scene/r_bsp.h b/src/swrenderer/scene/r_bsp.h index d45075ba78..e39b760955 100644 --- a/src/swrenderer/scene/r_bsp.h +++ b/src/swrenderer/scene/r_bsp.h @@ -46,9 +46,6 @@ enum FAKED_AboveCeiling }; -extern int WindowLeft, WindowRight; -extern WORD MirrorFlags; - void R_RenderScene(); void R_RenderBSPNode (void *node); diff --git a/src/swrenderer/scene/r_portal.cpp b/src/swrenderer/scene/r_portal.cpp index 7d5a85f916..dd8342a683 100644 --- a/src/swrenderer/scene/r_portal.cpp +++ b/src/swrenderer/scene/r_portal.cpp @@ -62,6 +62,9 @@ CVAR(Bool, r_skyboxes, true, 0) namespace swrenderer { + int WindowLeft, WindowRight; + uint16_t MirrorFlags; + PortalDrawseg *CurrentPortal = nullptr; int CurrentPortalUniq = 0; bool CurrentPortalInSkybox = false; diff --git a/src/swrenderer/scene/r_portal.h b/src/swrenderer/scene/r_portal.h index e31cc9f2fb..f7b1fb74c4 100644 --- a/src/swrenderer/scene/r_portal.h +++ b/src/swrenderer/scene/r_portal.h @@ -17,6 +17,9 @@ namespace swrenderer { + extern int WindowLeft, WindowRight; + extern uint16_t MirrorFlags; + extern PortalDrawseg* CurrentPortal; extern int CurrentPortalUniq; extern bool CurrentPortalInSkybox; diff --git a/src/swrenderer/segments/r_drawsegment.cpp b/src/swrenderer/segments/r_drawsegment.cpp index 633eae15bb..ca20dd0dbf 100644 --- a/src/swrenderer/segments/r_drawsegment.cpp +++ b/src/swrenderer/segments/r_drawsegment.cpp @@ -34,6 +34,7 @@ #include "swrenderer/scene/r_things.h" #include "swrenderer/scene/r_3dfloors.h" #include "swrenderer/scene/r_bsp.h" +#include "swrenderer/scene/r_portal.h" #include "swrenderer/line/r_wallsetup.h" #include "swrenderer/line/r_walldraw.h" #include "swrenderer/line/r_fogboundary.h"