mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 13:01:47 +00:00
- mpved all software renderer specific code for the portals into the render sources.
This commit is contained in:
parent
01b075660d
commit
00895c245e
6 changed files with 25 additions and 25 deletions
|
@ -10,10 +10,6 @@
|
|||
// simulation recurions maximum
|
||||
CVAR(Int, sv_portal_recursions, 4, CVAR_ARCHIVE|CVAR_SERVERINFO)
|
||||
|
||||
PortalDrawseg* CurrentPortal = NULL;
|
||||
int CurrentPortalUniq = 0;
|
||||
bool CurrentPortalInSkybox = false;
|
||||
|
||||
// [ZZ] lots of floats here to avoid overflowing a lot
|
||||
bool R_IntersectLines(fixed_t o1x, fixed_t o1y, fixed_t p1x, fixed_t p1y,
|
||||
fixed_t o2x, fixed_t o2y, fixed_t p2x, fixed_t p2y,
|
||||
|
|
19
src/portal.h
19
src/portal.h
|
@ -8,25 +8,6 @@
|
|||
#include "p_local.h"
|
||||
#include "m_bbox.h"
|
||||
|
||||
/* portal structure, this is used in r_ code in order to store drawsegs with portals (and mirrors) */
|
||||
struct PortalDrawseg
|
||||
{
|
||||
line_t* src; // source line (the one drawn) this doesn't change over render loops
|
||||
line_t* dst; // destination line (the one that the portal is linked with, equals 'src' for mirrors)
|
||||
|
||||
int x1; // drawseg x1
|
||||
int x2; // drawseg x2
|
||||
|
||||
int len;
|
||||
TArray<short> ceilingclip;
|
||||
TArray<short> floorclip;
|
||||
|
||||
bool mirror; // true if this is a mirror (src should equal dst)
|
||||
};
|
||||
|
||||
extern PortalDrawseg* CurrentPortal;
|
||||
extern int CurrentPortalUniq;
|
||||
extern bool CurrentPortalInSkybox;
|
||||
|
||||
/* code ported from prototype */
|
||||
bool P_ClipLineToPortal(line_t* line, line_t* portal, fixed_t viewx, fixed_t viewy, bool partial = true, bool samebehind = true);
|
||||
|
|
|
@ -107,8 +107,6 @@ extern size_t FirstInterestingDrawseg;
|
|||
extern int WindowLeft, WindowRight;
|
||||
extern WORD MirrorFlags;
|
||||
|
||||
extern TArray<PortalDrawseg> WallPortals;
|
||||
|
||||
typedef void (*drawfunc_t) (int start, int stop);
|
||||
|
||||
EXTERN_CVAR (Bool, r_drawflat) // [RH] Don't texture segs?
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#include "r_local.h"
|
||||
#include "r_plane.h"
|
||||
#include "r_bsp.h"
|
||||
#include "r_segs.h"
|
||||
#include "r_3dfloors.h"
|
||||
#include "r_sky.h"
|
||||
#include "st_stuff.h"
|
||||
|
|
|
@ -67,6 +67,9 @@ CVAR(Bool, r_np2, true, 0)
|
|||
|
||||
extern fixed_t globaluclip, globaldclip;
|
||||
|
||||
PortalDrawseg* CurrentPortal = NULL;
|
||||
int CurrentPortalUniq = 0;
|
||||
bool CurrentPortalInSkybox = false;
|
||||
|
||||
// OPTIMIZE: closed two sided lines as single sided
|
||||
|
||||
|
|
21
src/r_segs.h
21
src/r_segs.h
|
@ -49,4 +49,25 @@ extern fixed_t rw_lightstep;
|
|||
extern fixed_t rw_lightleft;
|
||||
extern fixed_t rw_offset;
|
||||
|
||||
/* portal structure, this is used in r_ code in order to store drawsegs with portals (and mirrors) */
|
||||
struct PortalDrawseg
|
||||
{
|
||||
line_t* src; // source line (the one drawn) this doesn't change over render loops
|
||||
line_t* dst; // destination line (the one that the portal is linked with, equals 'src' for mirrors)
|
||||
|
||||
int x1; // drawseg x1
|
||||
int x2; // drawseg x2
|
||||
|
||||
int len;
|
||||
TArray<short> ceilingclip;
|
||||
TArray<short> floorclip;
|
||||
|
||||
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;
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue