mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 13:47:58 +03:00
Added mohaas/mohaab variables
This commit is contained in:
parent
0f58b5780a
commit
9315cfa488
3 changed files with 27 additions and 11 deletions
|
@ -102,7 +102,6 @@ typedef enum {
|
|||
|
||||
typedef struct {
|
||||
struct mnode_s* cntNode;
|
||||
qboolean inUse;
|
||||
struct msurface_s* skySurfs[32];
|
||||
int numSurfs;
|
||||
vec3_t offset;
|
||||
|
@ -236,7 +235,6 @@ typedef struct image_s {
|
|||
int wrapClampModeX;
|
||||
int wrapClampModeY;
|
||||
int r_sequence;
|
||||
int UseCount;
|
||||
|
||||
struct image_s* next;
|
||||
} image_t;
|
||||
|
@ -662,7 +660,12 @@ typedef struct {
|
|||
qboolean sky_portal;
|
||||
float sky_alpha;
|
||||
vec3_t sky_origin;
|
||||
vec3_t sky_axis[3];
|
||||
vec3_t sky_axis[3];
|
||||
// added in 2.0
|
||||
//==
|
||||
qboolean skybox_farplane;
|
||||
qboolean render_terrain;
|
||||
//==
|
||||
|
||||
} trRefdef_t;
|
||||
|
||||
|
@ -708,6 +711,7 @@ typedef struct {
|
|||
vec3_t pvsOrigin; // may be different than or.origin for portals
|
||||
qboolean isPortal; // true if this view is through a portal
|
||||
qboolean isMirror; // the portal is a mirror, invert the face culling
|
||||
qboolean isPortalSky; // since 2.0 whether or not this view is a portal sky
|
||||
int frameSceneNum; // copied from tr.frameSceneNum
|
||||
int frameCount; // copied from tr.frameCount
|
||||
cplane_t portalPlane; // clip anything behind this if mirroring
|
||||
|
@ -718,9 +722,11 @@ typedef struct {
|
|||
vec3_t visBounds[2];
|
||||
float zFar;
|
||||
depthfog_t fog;
|
||||
float farplane_distance;
|
||||
float farplane_distance;
|
||||
float farplane_bias; // added in 2.0
|
||||
float farplane_color[3];
|
||||
qboolean farplane_cull;
|
||||
qboolean farplane_cull;
|
||||
qboolean renderTerrain; // added in 2.0
|
||||
} viewParms_t;
|
||||
|
||||
|
||||
|
@ -1365,6 +1371,8 @@ typedef struct {
|
|||
int frame_skel_index;
|
||||
int skel_index[1024];
|
||||
fontheader_t* pFontDebugStrings;
|
||||
|
||||
qboolean farclip;
|
||||
} trGlobals_t;
|
||||
|
||||
extern backEndState_t backEnd;
|
||||
|
|
|
@ -26,13 +26,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
|
||||
void R_Sky_Init()
|
||||
{
|
||||
tr.portalsky.inUse = qfalse;
|
||||
tr.viewParms.isPortalSky = qfalse;
|
||||
tr.portalsky.numSurfs = 0;
|
||||
}
|
||||
|
||||
void R_Sky_Reset()
|
||||
{
|
||||
if (tr.portalsky.inUse) {
|
||||
if (tr.viewParms.isPortalSky) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ void R_Sky_Reset()
|
|||
|
||||
void R_Sky_AddSurf(msurface_t* surf)
|
||||
{
|
||||
if (tr.portalsky.inUse)
|
||||
if (tr.viewParms.isPortalSky)
|
||||
{
|
||||
static int last_sky_warning = 0;
|
||||
|
||||
|
@ -99,7 +99,7 @@ void R_Sky_Render() {
|
|||
return;
|
||||
}
|
||||
|
||||
if (tr.portalsky.inUse)
|
||||
if (tr.viewParms.isPortalSky)
|
||||
{
|
||||
ri.Printf(PRINT_WARNING, "WARNING: Recursive skies found! Make that not happen!\n");
|
||||
return;
|
||||
|
@ -133,7 +133,7 @@ void R_Sky_Render() {
|
|||
MatrixMultiply(newParms.ori.axis, tr.refdef.sky_axis, newParms.ori.axis);
|
||||
}
|
||||
|
||||
tr.portalsky.inUse = qtrue;
|
||||
tr.viewParms.isPortalSky = qtrue;
|
||||
VectorCopy(newParms.ori.origin, newParms.pvsOrigin);
|
||||
|
||||
leaf = R_PointInLeaf(newParms.pvsOrigin);
|
||||
|
@ -143,7 +143,7 @@ void R_Sky_Render() {
|
|||
|
||||
tr.viewParms = oldParms;
|
||||
|
||||
tr.portalsky.inUse = qfalse;
|
||||
tr.viewParms.isPortalSky = qfalse;
|
||||
tr.portalsky.numSurfs = 0;
|
||||
R_RotateForViewer();
|
||||
R_SetupFrustum();
|
||||
|
|
|
@ -182,8 +182,16 @@ typedef struct {
|
|||
|
||||
// fog stuff
|
||||
float farplane_distance;
|
||||
float farplane_bias; // added in 2.0
|
||||
vec3_t farplane_color;
|
||||
qboolean farplane_cull;
|
||||
// added in 2.0
|
||||
//==
|
||||
qboolean skybox_farplane;
|
||||
qboolean renderTerrain;
|
||||
float farclipOverride;
|
||||
vec3_t farplaneColorOverride;
|
||||
//==
|
||||
|
||||
// sky portal stuff
|
||||
qboolean sky_portal;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue