Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
/*
|
2000-01-07 21:36:15 +00:00
|
|
|
gl_rmain.c
|
2000-03-19 15:59:51 +00:00
|
|
|
|
2000-03-24 09:55:33 +00:00
|
|
|
(description)
|
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
Copyright (C) 1996-1997 Id Software, Inc.
|
|
|
|
Copyright (C) 1999,2000 contributors of the QuakeForge project
|
|
|
|
Please see the file "AUTHORS" for a list of contributors
|
2000-03-19 15:59:51 +00:00
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License
|
|
|
|
as published by the Free Software Foundation; either version 2
|
|
|
|
of the License, or (at your option) any later version.
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2000-03-19 15:59:51 +00:00
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
See the GNU General Public License for more details.
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to:
|
2000-03-19 15:59:51 +00:00
|
|
|
|
2000-03-24 09:55:33 +00:00
|
|
|
Free Software Foundation, Inc.
|
|
|
|
59 Temple Place - Suite 330
|
|
|
|
Boston, MA 02111-1307, USA
|
|
|
|
|
|
|
|
$Id$
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
*/
|
|
|
|
|
2000-02-04 04:01:23 +00:00
|
|
|
#include <qtypes.h>
|
|
|
|
#include <quakedef.h>
|
|
|
|
#include <glquake.h>
|
|
|
|
#include <mathlib.h>
|
|
|
|
#include <console.h>
|
|
|
|
#include <view.h>
|
|
|
|
#include <sound.h>
|
2000-01-29 18:46:26 +00:00
|
|
|
#include <cvar.h>
|
|
|
|
#include <sys.h>
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
2000-02-04 04:01:23 +00:00
|
|
|
#include <draw.h>
|
|
|
|
#include <sbar.h>
|
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
entity_t r_worldentity;
|
|
|
|
|
|
|
|
qboolean r_cache_thrash; // compatability
|
|
|
|
|
|
|
|
vec3_t modelorg, r_entorigin;
|
|
|
|
entity_t *currententity;
|
|
|
|
|
2000-03-02 19:57:24 +00:00
|
|
|
int r_visframecount; // bumped when going to a new PVS
|
|
|
|
int r_framecount; // used for dlight push checking
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
|
|
|
mplane_t frustum[4];
|
|
|
|
|
2000-03-02 19:57:24 +00:00
|
|
|
int c_brush_polys, c_alias_polys;
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
2000-03-19 15:59:51 +00:00
|
|
|
qboolean envmap; // true during envmap command capture
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
2000-03-02 19:57:24 +00:00
|
|
|
int currenttexture = -1; // to avoid unnecessary texture sets
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
2000-03-02 19:57:24 +00:00
|
|
|
int cnttextures[2] = {-1, -1}; // cached
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
2000-03-02 19:57:24 +00:00
|
|
|
int particletexture; // little dot for particles
|
|
|
|
int playertextures; // up to 16 color translated skins
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// view origin
|
|
|
|
//
|
|
|
|
vec3_t vup;
|
|
|
|
vec3_t vpn;
|
|
|
|
vec3_t vright;
|
|
|
|
vec3_t r_origin;
|
|
|
|
|
|
|
|
float r_world_matrix[16];
|
|
|
|
float r_base_world_matrix[16];
|
|
|
|
|
|
|
|
//
|
|
|
|
// screen size info
|
|
|
|
//
|
|
|
|
refdef_t r_refdef;
|
|
|
|
|
|
|
|
mleaf_t *r_viewleaf, *r_oldviewleaf;
|
|
|
|
|
|
|
|
texture_t *r_notexture_mip;
|
|
|
|
|
|
|
|
int d_lightstylevalue[256]; // 8.8 fraction of base light value
|
|
|
|
|
2000-02-27 07:13:32 +00:00
|
|
|
cvar_t *r_clearcolor;
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
|
|
|
void R_MarkLeaves (void);
|
|
|
|
|
2000-02-27 07:13:32 +00:00
|
|
|
cvar_t *r_norefresh;
|
|
|
|
cvar_t *r_drawentities;
|
|
|
|
cvar_t *r_drawviewmodel;
|
|
|
|
cvar_t *r_speeds;
|
|
|
|
cvar_t *r_fullbright;
|
|
|
|
cvar_t *r_lightmap;
|
|
|
|
cvar_t *r_shadows;
|
2000-05-05 08:56:55 +00:00
|
|
|
cvar_t *r_interpanimation;
|
|
|
|
cvar_t *r_interptransform;
|
2000-02-27 07:13:32 +00:00
|
|
|
cvar_t *r_wateralpha;
|
|
|
|
cvar_t *r_dynamic;
|
|
|
|
cvar_t *r_novis;
|
2000-01-01 06:26:03 +00:00
|
|
|
#ifdef QUAKEWORLD
|
2000-02-27 07:13:32 +00:00
|
|
|
cvar_t *r_netgraph;
|
2000-01-01 06:26:03 +00:00
|
|
|
#endif
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
2000-02-27 07:13:32 +00:00
|
|
|
cvar_t *r_fog;
|
2000-03-02 19:57:24 +00:00
|
|
|
cvar_t *r_volfog;
|
2000-02-27 07:13:32 +00:00
|
|
|
cvar_t *r_waterwarp;
|
|
|
|
cvar_t *r_waterripple;
|
2000-03-02 19:57:24 +00:00
|
|
|
cvar_t *r_sky;
|
|
|
|
cvar_t *r_skyname;
|
2000-02-27 07:13:32 +00:00
|
|
|
|
|
|
|
cvar_t *gl_finish;
|
|
|
|
cvar_t *gl_clear;
|
|
|
|
cvar_t *gl_cull;
|
|
|
|
cvar_t *gl_texsort;
|
|
|
|
cvar_t *gl_smoothmodels;
|
|
|
|
cvar_t *gl_affinemodels;
|
|
|
|
cvar_t *gl_polyblend;
|
|
|
|
cvar_t *gl_playermip;
|
|
|
|
cvar_t *gl_nocolors;
|
2000-02-29 05:51:29 +00:00
|
|
|
|
2000-02-27 07:13:32 +00:00
|
|
|
cvar_t *gl_keeptjunctions;
|
|
|
|
cvar_t *gl_doubleeyes;
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
2000-04-27 04:30:37 +00:00
|
|
|
cvar_t *gl_particles;
|
|
|
|
cvar_t *gl_fires;
|
|
|
|
|
2000-03-19 15:59:51 +00:00
|
|
|
extern cvar_t *gl_ztrick;
|
2000-01-01 06:26:03 +00:00
|
|
|
#ifdef QUAKEWORLD
|
2000-02-27 07:13:32 +00:00
|
|
|
extern cvar_t *scr_fov;
|
2000-01-01 06:26:03 +00:00
|
|
|
#endif
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
/*
|
2000-01-07 21:36:15 +00:00
|
|
|
R_CullBox
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
Returns true if the box is completely outside the frustom
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
*/
|
2000-01-07 21:36:15 +00:00
|
|
|
qboolean
|
|
|
|
R_CullBox (vec3_t mins, vec3_t maxs) {
|
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
int i;
|
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
for (i=0 ; i<4 ; i++) {
|
|
|
|
if (BoxOnPlaneSide (mins, maxs, &frustum[i]) == 2) {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
return true;
|
2000-01-07 21:36:15 +00:00
|
|
|
}
|
|
|
|
}
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2000-05-07 12:33:47 +00:00
|
|
|
#ifdef EXPERIMENTAL
|
|
|
|
/*
|
|
|
|
R_BlendedRotateForEntity
|
|
|
|
*/
|
2000-01-07 21:36:15 +00:00
|
|
|
void
|
2000-05-05 08:56:55 +00:00
|
|
|
R_BlendedRotateForEntity (entity_t *e)
|
|
|
|
{
|
|
|
|
float blend;
|
|
|
|
vec3_t d;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
if (e->translate_start_time == 0)
|
|
|
|
{
|
|
|
|
e->translate_start_time = realtime;
|
|
|
|
VectorCopy (e->origin, e->origin1);
|
|
|
|
VectorCopy (e->origin, e->origin2);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!VectorCompare (e->origin, e->origin2))
|
|
|
|
{
|
|
|
|
e->translate_start_time = realtime;
|
|
|
|
VectorCopy (e->origin2, e->origin1);
|
|
|
|
VectorCopy (e->origin, e->origin2);
|
|
|
|
blend = 0;
|
|
|
|
} else {
|
|
|
|
blend = (realtime - e->translate_start_time) / 0.1;
|
|
|
|
|
|
|
|
if (cl.paused || blend > 1)
|
|
|
|
blend = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
VectorSubtract (e->origin2, e->origin1, d);
|
|
|
|
|
|
|
|
glTranslatef (e->origin1[0] + (blend * d[0]),
|
|
|
|
e->origin1[1] + (blend * d[1]),
|
|
|
|
e->origin1[2] + (blend * d[2]));
|
|
|
|
|
|
|
|
if (e->rotate_start_time == 0)
|
|
|
|
{
|
|
|
|
e->rotate_start_time = realtime;
|
|
|
|
VectorCopy (e->angles, e->angles1);
|
|
|
|
VectorCopy (e->angles, e->angles2);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!VectorCompare (e->angles, e->angles2))
|
|
|
|
{
|
|
|
|
e->rotate_start_time = realtime;
|
|
|
|
VectorCopy (e->angles2, e->angles1);
|
|
|
|
VectorCopy (e->angles, e->angles2);
|
|
|
|
blend = 0;
|
|
|
|
} else {
|
|
|
|
blend = (realtime - e->rotate_start_time) / 0.1;
|
|
|
|
|
|
|
|
if (cl.paused || blend > 1)
|
|
|
|
blend = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
VectorSubtract (e->angles2, e->angles1, d);
|
|
|
|
|
|
|
|
for (i = 0; i < 3; i++)
|
|
|
|
if (d[i] > 180)
|
|
|
|
d[i] -= 360;
|
|
|
|
else if (d[i] < -180)
|
|
|
|
d[i] += 360;
|
|
|
|
|
|
|
|
glRotatef ( e->angles1[1] + ( blend * d[1]), 0, 0, 1);
|
|
|
|
glRotatef (-e->angles1[0] + (-blend * d[0]), 0, 1, 0);
|
|
|
|
glRotatef ( e->angles1[2] + ( blend * d[2]), 1, 0, 0);
|
|
|
|
}
|
2000-05-07 12:33:47 +00:00
|
|
|
#endif
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
2000-05-05 08:56:55 +00:00
|
|
|
void
|
|
|
|
R_RotateForEntity (entity_t *e)
|
|
|
|
{
|
|
|
|
glTranslatef (e->origin[0], e->origin[1], e->origin[2]);
|
|
|
|
|
|
|
|
glRotatef (e->angles[1], 0, 0, 1);
|
|
|
|
glRotatef (-e->angles[0], 0, 1, 0);
|
2000-01-01 06:26:03 +00:00
|
|
|
//ZOID: fixed z angle
|
2000-05-05 08:56:55 +00:00
|
|
|
glRotatef (e->angles[2], 1, 0, 0);
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2000-01-07 21:36:15 +00:00
|
|
|
* SPRITE MODELS
|
|
|
|
*/
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
|
|
|
/*
|
2000-01-07 21:36:15 +00:00
|
|
|
R_GetSpriteFrame
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
*/
|
2000-01-07 21:36:15 +00:00
|
|
|
mspriteframe_t
|
2000-05-05 08:56:55 +00:00
|
|
|
*R_GetSpriteFrame (entity_t *currententity)
|
|
|
|
{
|
2000-01-07 21:36:15 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
msprite_t *psprite;
|
|
|
|
mspritegroup_t *pspritegroup;
|
|
|
|
mspriteframe_t *pspriteframe;
|
|
|
|
int i, numframes, frame;
|
|
|
|
float *pintervals, fullinterval, targettime, time;
|
|
|
|
|
|
|
|
psprite = currententity->model->cache.data;
|
|
|
|
frame = currententity->frame;
|
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
if ((frame >= psprite->numframes) || (frame < 0)) {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
Con_Printf ("R_DrawSprite: no such frame %d\n", frame);
|
|
|
|
frame = 0;
|
|
|
|
}
|
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
if (psprite->frames[frame].type == SPR_SINGLE) {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
pspriteframe = psprite->frames[frame].frameptr;
|
2000-01-07 21:36:15 +00:00
|
|
|
} else {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
pspritegroup = (mspritegroup_t *)psprite->frames[frame].frameptr;
|
|
|
|
pintervals = pspritegroup->intervals;
|
|
|
|
numframes = pspritegroup->numframes;
|
|
|
|
fullinterval = pintervals[numframes-1];
|
|
|
|
|
|
|
|
time = cl.time + currententity->syncbase;
|
|
|
|
|
|
|
|
// when loading in Mod_LoadSpriteGroup, we guaranteed all interval values
|
|
|
|
// are positive, so we don't have to worry about division by 0
|
|
|
|
targettime = time - ((int)(time / fullinterval)) * fullinterval;
|
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
for (i=0 ; i<(numframes-1) ; i++) {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
if (pintervals[i] > targettime)
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
pspriteframe = pspritegroup->frames[i];
|
|
|
|
}
|
|
|
|
return pspriteframe;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2000-01-07 21:36:15 +00:00
|
|
|
R_DrawSpriteModel
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
*/
|
2000-01-07 21:36:15 +00:00
|
|
|
void
|
2000-05-05 08:56:55 +00:00
|
|
|
R_DrawSpriteModel (entity_t *e)
|
|
|
|
{
|
2000-01-07 21:36:15 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
vec3_t point;
|
|
|
|
mspriteframe_t *frame;
|
|
|
|
float *up, *right;
|
|
|
|
vec3_t v_forward, v_right, v_up;
|
|
|
|
msprite_t *psprite;
|
|
|
|
|
|
|
|
// don't even bother culling, because it's just a single
|
|
|
|
// polygon without a surface cache
|
|
|
|
frame = R_GetSpriteFrame (e);
|
|
|
|
psprite = currententity->model->cache.data;
|
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
if (psprite->type == SPR_ORIENTED) { // bullet marks on walls
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
AngleVectors (currententity->angles, v_forward, v_right, v_up);
|
|
|
|
up = v_up;
|
|
|
|
right = v_right;
|
2000-01-07 21:36:15 +00:00
|
|
|
} else { // normal sprite
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
up = vup;
|
|
|
|
right = vright;
|
|
|
|
}
|
|
|
|
|
|
|
|
glColor3f (1,1,1);
|
|
|
|
|
|
|
|
GL_DisableMultitexture();
|
|
|
|
|
|
|
|
GL_Bind(frame->gl_texturenum);
|
|
|
|
|
|
|
|
glEnable (GL_ALPHA_TEST);
|
|
|
|
glBegin (GL_QUADS);
|
|
|
|
|
|
|
|
glTexCoord2f (0, 1);
|
|
|
|
VectorMA (e->origin, frame->down, up, point);
|
|
|
|
VectorMA (point, frame->left, right, point);
|
|
|
|
glVertex3fv (point);
|
|
|
|
|
|
|
|
glTexCoord2f (0, 0);
|
|
|
|
VectorMA (e->origin, frame->up, up, point);
|
|
|
|
VectorMA (point, frame->left, right, point);
|
|
|
|
glVertex3fv (point);
|
|
|
|
|
|
|
|
glTexCoord2f (1, 0);
|
|
|
|
VectorMA (e->origin, frame->up, up, point);
|
|
|
|
VectorMA (point, frame->right, right, point);
|
|
|
|
glVertex3fv (point);
|
|
|
|
|
|
|
|
glTexCoord2f (1, 1);
|
|
|
|
VectorMA (e->origin, frame->down, up, point);
|
|
|
|
VectorMA (point, frame->right, right, point);
|
|
|
|
glVertex3fv (point);
|
2000-03-19 15:59:51 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
glEnd ();
|
|
|
|
|
|
|
|
glDisable (GL_ALPHA_TEST);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2000-01-07 21:36:15 +00:00
|
|
|
ALIAS MODELS
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#define NUMVERTEXNORMALS 162
|
|
|
|
|
|
|
|
float r_avertexnormals[NUMVERTEXNORMALS][3] = {
|
2000-03-09 15:13:39 +00:00
|
|
|
#include "anorms.-c"
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
vec3_t shadevector;
|
2000-03-09 15:13:39 +00:00
|
|
|
float shadelight[4];
|
|
|
|
float ambientlight;
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
|
|
|
// precalculated dot products for quantized angles
|
|
|
|
#define SHADEDOT_QUANT 16
|
|
|
|
float r_avertexnormal_dots[SHADEDOT_QUANT][256] =
|
2000-01-03 21:54:18 +00:00
|
|
|
#include "anorm_dots.-c"
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
;
|
|
|
|
|
|
|
|
float *shadedots = r_avertexnormal_dots[0];
|
|
|
|
|
2000-05-05 08:56:55 +00:00
|
|
|
int lastposenum, lastposenum0;
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
|
|
|
/*
|
2000-01-07 21:36:15 +00:00
|
|
|
GL_DrawAliasFrame
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
*/
|
2000-01-07 21:36:15 +00:00
|
|
|
void
|
2000-03-09 15:13:39 +00:00
|
|
|
GL_DrawAliasFrame (aliashdr_t *paliashdr, int posenum)
|
|
|
|
{
|
|
|
|
float l;
|
1999-12-27 17:18:40 +00:00
|
|
|
trivertx_t *verts;
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
int *order;
|
|
|
|
int count;
|
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
lastposenum = posenum;
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
|
|
|
verts = (trivertx_t *)((byte *)paliashdr + paliashdr->posedata);
|
|
|
|
verts += posenum * paliashdr->poseverts;
|
|
|
|
order = (int *)((byte *)paliashdr + paliashdr->commands);
|
|
|
|
|
2000-03-09 15:13:39 +00:00
|
|
|
while (1)
|
|
|
|
{
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
// get the vertex count and primitive type
|
|
|
|
count = *order++;
|
|
|
|
if (!count)
|
|
|
|
break; // done
|
2000-03-09 15:13:39 +00:00
|
|
|
if (count < 0)
|
|
|
|
{
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
count = -count;
|
|
|
|
glBegin (GL_TRIANGLE_FAN);
|
2000-01-07 21:36:15 +00:00
|
|
|
} else {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
glBegin (GL_TRIANGLE_STRIP);
|
2000-01-07 21:36:15 +00:00
|
|
|
}
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
2000-03-09 15:13:39 +00:00
|
|
|
do
|
2000-05-05 08:56:55 +00:00
|
|
|
{
|
|
|
|
// texture coordinates come from the draw list
|
2000-03-09 15:13:39 +00:00
|
|
|
glTexCoord2f (((float *)order)[0],
|
|
|
|
((float *)order)[1]);
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
order += 2;
|
|
|
|
|
|
|
|
// normals and vertexes come from the frame list
|
2000-03-09 15:13:39 +00:00
|
|
|
|
2000-04-12 05:01:36 +00:00
|
|
|
l = shadedots[verts->lightnormalindex] * shadelight[3];
|
2000-05-05 08:56:55 +00:00
|
|
|
glColor3f (l+shadelight[0], l+shadelight[1],
|
|
|
|
l+shadelight[2]);
|
2000-03-09 15:13:39 +00:00
|
|
|
glColor3f (l, l, l);
|
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
glVertex3f (verts->v[0], verts->v[1], verts->v[2]);
|
|
|
|
verts++;
|
|
|
|
} while (--count);
|
|
|
|
glEnd ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-05-07 12:33:47 +00:00
|
|
|
#ifdef EXPERIMENTAL
|
2000-05-05 08:56:55 +00:00
|
|
|
/*
|
|
|
|
GL_DrawAliasBlendedFrame
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
GL_DrawAliasBlendedFrame (aliashdr_t *paliashdr, int pose1, int pose2,
|
|
|
|
float blend)
|
|
|
|
{
|
|
|
|
float l;
|
|
|
|
trivertx_t *verts1;
|
|
|
|
trivertx_t *verts2;
|
|
|
|
int *order;
|
|
|
|
int count;
|
|
|
|
vec3_t d;
|
|
|
|
|
|
|
|
lastposenum0 = pose1;
|
|
|
|
lastposenum = pose2;
|
|
|
|
|
2000-05-07 12:33:47 +00:00
|
|
|
verts1 = (trivertx_t *)((byte *)paliashdr + paliashdr->posedata);
|
2000-05-05 08:56:55 +00:00
|
|
|
verts2 = verts1;
|
|
|
|
|
|
|
|
verts1 += pose1 * paliashdr->poseverts;
|
|
|
|
verts2 += pose2 * paliashdr->poseverts;
|
|
|
|
|
|
|
|
order = (int *)((byte *)paliashdr + paliashdr->commands);
|
|
|
|
|
|
|
|
while (1)
|
|
|
|
{
|
|
|
|
// get the vertex count and primitive type
|
|
|
|
count = *order++;
|
|
|
|
if (!count)
|
|
|
|
break; // done
|
|
|
|
if (count < 0)
|
|
|
|
{
|
|
|
|
count = -count;
|
|
|
|
glBegin (GL_TRIANGLE_FAN);
|
|
|
|
} else {
|
|
|
|
glBegin (GL_TRIANGLE_STRIP);
|
|
|
|
}
|
|
|
|
|
|
|
|
do
|
|
|
|
{
|
|
|
|
// texture coordinates come from the draw list
|
|
|
|
glTexCoord2f (((float *)order)[0],
|
|
|
|
((float *)order)[1]);
|
|
|
|
order += 2;
|
|
|
|
|
|
|
|
// normals and vertexes come from the frame list
|
|
|
|
|
|
|
|
d[0] = shadedots[verts2->lightnormalindex] -
|
|
|
|
shadedots[verts1->lightnormalindex];
|
|
|
|
|
|
|
|
l = (shadedots[verts1->lightnormalindex] +
|
|
|
|
(blend * d[0])) * shadelight[3];
|
|
|
|
|
|
|
|
glColor3f (l+shadelight[0], l+shadelight[1],
|
|
|
|
l+shadelight[2]);
|
|
|
|
|
|
|
|
VectorSubtract(verts2->v, verts1->v, d);
|
|
|
|
|
|
|
|
glVertex3f (verts1->v[0] + (blend * d[0]),
|
|
|
|
verts1->v[1] + (blend * d[1]),
|
|
|
|
verts1->v[2] + (blend * d[2]));
|
|
|
|
|
|
|
|
verts1++;
|
|
|
|
verts2++;
|
|
|
|
} while (--count);
|
|
|
|
glEnd ();
|
|
|
|
}
|
|
|
|
}
|
2000-05-07 12:33:47 +00:00
|
|
|
#endif
|
2000-05-05 08:56:55 +00:00
|
|
|
|
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
/*
|
2000-01-07 21:36:15 +00:00
|
|
|
GL_DrawAliasShadow
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
*/
|
|
|
|
extern vec3_t lightspot;
|
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
void
|
2000-05-05 08:56:55 +00:00
|
|
|
GL_DrawAliasShadow (aliashdr_t *paliashdr, int posenum)
|
|
|
|
{
|
1999-12-27 17:18:40 +00:00
|
|
|
trivertx_t *verts;
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
int *order;
|
|
|
|
vec3_t point;
|
|
|
|
float height, lheight;
|
|
|
|
int count;
|
|
|
|
|
|
|
|
lheight = currententity->origin[2] - lightspot[2];
|
|
|
|
|
|
|
|
height = 0;
|
|
|
|
verts = (trivertx_t *)((byte *)paliashdr + paliashdr->posedata);
|
|
|
|
verts += posenum * paliashdr->poseverts;
|
|
|
|
order = (int *)((byte *)paliashdr + paliashdr->commands);
|
|
|
|
|
|
|
|
height = -lheight + 1.0;
|
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
while (1) {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
// get the vertex count and primitive type
|
|
|
|
count = *order++;
|
|
|
|
if (!count)
|
|
|
|
break; // done
|
2000-01-07 21:36:15 +00:00
|
|
|
if (count < 0) {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
count = -count;
|
|
|
|
glBegin (GL_TRIANGLE_FAN);
|
2000-01-07 21:36:15 +00:00
|
|
|
} else {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
glBegin (GL_TRIANGLE_STRIP);
|
2000-01-07 21:36:15 +00:00
|
|
|
}
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
do {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
// texture coordinates come from the draw list
|
|
|
|
// (skipped for shadows) glTexCoord2fv ((float *)order);
|
|
|
|
order += 2;
|
|
|
|
|
|
|
|
// normals and vertexes come from the frame list
|
|
|
|
point[0] = verts->v[0] * paliashdr->scale[0] + paliashdr->scale_origin[0];
|
|
|
|
point[1] = verts->v[1] * paliashdr->scale[1] + paliashdr->scale_origin[1];
|
|
|
|
point[2] = verts->v[2] * paliashdr->scale[2] + paliashdr->scale_origin[2];
|
|
|
|
|
|
|
|
point[0] -= shadevector[0]*(point[2]+lheight);
|
|
|
|
point[1] -= shadevector[1]*(point[2]+lheight);
|
|
|
|
point[2] = height;
|
|
|
|
// height -= 0.001;
|
|
|
|
glVertex3fv (point);
|
|
|
|
|
|
|
|
verts++;
|
|
|
|
} while (--count);
|
|
|
|
glEnd ();
|
2000-03-19 15:59:51 +00:00
|
|
|
}
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
}
|
|
|
|
|
2000-05-05 08:56:55 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
/*
|
2000-01-07 21:36:15 +00:00
|
|
|
R_SetupAliasFrame
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
*/
|
2000-05-05 08:56:55 +00:00
|
|
|
void
|
|
|
|
R_SetupAliasFrame (int frame, aliashdr_t *paliashdr)
|
|
|
|
{
|
|
|
|
int pose, numposes;
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
float interval;
|
|
|
|
|
2000-05-05 08:56:55 +00:00
|
|
|
if ((frame >= paliashdr->numframes) || (frame < 0))
|
|
|
|
{
|
|
|
|
Con_DPrintf ("R_SetupAliasFrame: no such frame %d\n", frame);
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
frame = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
pose = paliashdr->frames[frame].firstpose;
|
|
|
|
numposes = paliashdr->frames[frame].numposes;
|
|
|
|
|
2000-05-05 08:56:55 +00:00
|
|
|
if (numposes > 1)
|
|
|
|
{
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
interval = paliashdr->frames[frame].interval;
|
|
|
|
pose += (int)(cl.time / interval) % numposes;
|
|
|
|
}
|
|
|
|
GL_DrawAliasFrame (paliashdr, pose);
|
|
|
|
}
|
|
|
|
|
2000-05-05 08:56:55 +00:00
|
|
|
|
2000-05-07 12:33:47 +00:00
|
|
|
#ifdef EXPERIMENTAL
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
/*
|
2000-05-05 08:56:55 +00:00
|
|
|
R_SetupAliasBlendedFrame
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
*/
|
2000-01-07 21:36:15 +00:00
|
|
|
void
|
2000-05-05 08:56:55 +00:00
|
|
|
R_SetupAliasBlendedFrame (int frame, aliashdr_t *paliashdr, entity_t *e)
|
|
|
|
{
|
|
|
|
int pose, numposes;
|
|
|
|
float blend;
|
|
|
|
|
|
|
|
if ((frame >= paliashdr->numframes) || (frame < 0))
|
|
|
|
{
|
|
|
|
Con_DPrintf ("R_SetupAliasFrame: no such frame %d\n", frame);
|
|
|
|
frame = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
pose = paliashdr->frames[frame].firstpose;
|
|
|
|
numposes = paliashdr->frames[frame].numposes;
|
2000-01-07 21:36:15 +00:00
|
|
|
|
2000-05-05 08:56:55 +00:00
|
|
|
if (numposes > 1)
|
|
|
|
{
|
|
|
|
e->frame_interval = paliashdr->frames[frame].interval;
|
|
|
|
pose += (int)(cl.time / e->frame_interval) % numposes;
|
2000-05-06 06:28:17 +00:00
|
|
|
Con_DPrintf ("%p\n", e);
|
2000-05-05 08:56:55 +00:00
|
|
|
Con_DPrintf ("1st: pose = %i pose2 = %i pose1 = %i\n",
|
|
|
|
pose, e->pose2, e->pose1);
|
|
|
|
} else
|
|
|
|
e->frame_interval = 0.1;
|
|
|
|
|
|
|
|
if (e->pose2 != pose)
|
|
|
|
{
|
|
|
|
if (numposes > 1)
|
|
|
|
Con_DPrintf ("2nd: pose = %i pose2 = %i pose1 = %i\n",
|
|
|
|
pose, e->pose2, e->pose1);
|
|
|
|
e->frame_start_time = realtime;
|
|
|
|
e->pose1 = e->pose2;
|
|
|
|
e->pose2 = pose;
|
|
|
|
if (numposes > 1)
|
|
|
|
Con_DPrintf ("3rd: pose = %i pose2 = %i pose1 = %i\n",
|
|
|
|
pose, e->pose2, e->pose1);
|
|
|
|
blend = 0;
|
|
|
|
} else
|
|
|
|
blend = (realtime - e->frame_start_time) / e->frame_interval;
|
|
|
|
|
|
|
|
if (cl.paused || blend > 1) blend = 1;
|
|
|
|
|
|
|
|
GL_DrawAliasBlendedFrame (paliashdr, e->pose1, e->pose2, blend);
|
|
|
|
}
|
2000-05-07 12:33:47 +00:00
|
|
|
#endif
|
|
|
|
|
2000-05-05 08:56:55 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
R_DrawAliasModel
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
R_DrawAliasModel (entity_t *e)
|
|
|
|
{
|
2000-03-09 15:13:39 +00:00
|
|
|
int i;
|
|
|
|
int *j;
|
|
|
|
int lnum;
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
vec3_t dist;
|
|
|
|
float add;
|
|
|
|
model_t *clmodel;
|
|
|
|
vec3_t mins, maxs;
|
|
|
|
aliashdr_t *paliashdr;
|
1999-12-27 17:18:40 +00:00
|
|
|
float an;
|
2000-03-09 15:13:39 +00:00
|
|
|
int anim;
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
|
|
|
clmodel = currententity->model;
|
|
|
|
|
|
|
|
VectorAdd (currententity->origin, clmodel->mins, mins);
|
|
|
|
VectorAdd (currententity->origin, clmodel->maxs, maxs);
|
|
|
|
|
|
|
|
if (R_CullBox (mins, maxs))
|
|
|
|
return;
|
|
|
|
|
|
|
|
VectorCopy (currententity->origin, r_entorigin);
|
|
|
|
VectorSubtract (r_origin, r_entorigin, modelorg);
|
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
/*
|
|
|
|
get lighting information
|
|
|
|
*/
|
2000-03-09 15:13:39 +00:00
|
|
|
j = R_LightPoint (currententity->origin);
|
|
|
|
shadelight[0] = (float)j[0];
|
|
|
|
shadelight[1] = (float)j[1];
|
|
|
|
shadelight[2] = (float)j[2];
|
|
|
|
shadelight[3] = (float)j[3];
|
|
|
|
ambientlight = shadelight[3];
|
2000-03-19 15:59:51 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
// allways give the gun some light
|
|
|
|
if (e == &cl.viewent && ambientlight < 24)
|
2000-03-09 15:13:39 +00:00
|
|
|
ambientlight = shadelight[3] = 24;
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
2000-03-09 15:13:39 +00:00
|
|
|
for (lnum=0 ; lnum<MAX_DLIGHTS ; lnum++)
|
|
|
|
{
|
|
|
|
if (cl_dlights[lnum].die >= cl.time)
|
|
|
|
{
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
VectorSubtract (currententity->origin,
|
2000-03-09 15:13:39 +00:00
|
|
|
cl_dlights[lnum].origin,
|
|
|
|
dist);
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
add = cl_dlights[lnum].radius - Length(dist);
|
2000-03-09 15:13:39 +00:00
|
|
|
|
|
|
|
if (add > 0)
|
|
|
|
{
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
ambientlight += add;
|
2000-03-19 15:59:51 +00:00
|
|
|
// ZOID: models should be affected by
|
2000-03-09 15:13:39 +00:00
|
|
|
// dlights as well
|
2000-03-26 14:30:17 +00:00
|
|
|
if (r_dynamic->value) {
|
2000-05-05 08:56:55 +00:00
|
|
|
shadelight[0] +=
|
|
|
|
cl_dlights[lnum].color[0];
|
|
|
|
shadelight[1] +=
|
|
|
|
cl_dlights[lnum].color[1];
|
|
|
|
shadelight[2] +=
|
|
|
|
cl_dlights[lnum].color[2];
|
2000-03-26 14:45:29 +00:00
|
|
|
shadelight[3] += add;
|
2000-03-26 14:30:17 +00:00
|
|
|
}
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// clamp lighting so it doesn't overbright as much
|
|
|
|
if (ambientlight > 128)
|
|
|
|
ambientlight = 128;
|
2000-03-09 15:13:39 +00:00
|
|
|
if (ambientlight + shadelight[3] > 192)
|
|
|
|
shadelight[3] = 192 - ambientlight;
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
|
|
|
// ZOID: never allow players to go totally black
|
2000-01-01 06:26:03 +00:00
|
|
|
#ifdef QUAKEWORLD
|
2000-03-09 15:13:39 +00:00
|
|
|
if (!strcmp(clmodel->name, "progs/player.mdl"))
|
2000-01-01 06:26:03 +00:00
|
|
|
#else
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
i = currententity - cl_entities;
|
2000-03-19 15:59:51 +00:00
|
|
|
if (i >= 1 && i <= cl.maxclients
|
2000-03-09 15:13:39 +00:00
|
|
|
/*&& !strcmp (currententity->model->name,
|
|
|
|
"progs/player.mdl")*/ )
|
2000-01-01 06:26:03 +00:00
|
|
|
#endif
|
2000-03-09 15:13:39 +00:00
|
|
|
{
|
|
|
|
if (ambientlight < 8)
|
|
|
|
ambientlight = shadelight[3] = 8;
|
2000-01-01 06:26:03 +00:00
|
|
|
} else if (!strcmp (clmodel->name, "progs/flame2.mdl")
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|| !strcmp (clmodel->name, "progs/flame.mdl") )
|
2000-01-01 06:26:03 +00:00
|
|
|
// HACK HACK HACK -- no fullbright colors, so make torches full light
|
2000-03-09 15:13:39 +00:00
|
|
|
ambientlight = shadelight[3] = 256;
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
2000-03-19 15:59:51 +00:00
|
|
|
shadedots = r_avertexnormal_dots[((int)(e->angles[1]
|
2000-03-09 15:13:39 +00:00
|
|
|
* (SHADEDOT_QUANT / 360.0)))
|
|
|
|
& (SHADEDOT_QUANT - 1)];
|
|
|
|
shadelight[3] /= 200.0;
|
2000-03-19 15:59:51 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
an = e->angles[1]/180*M_PI;
|
|
|
|
shadevector[0] = cos(-an);
|
|
|
|
shadevector[1] = sin(-an);
|
|
|
|
shadevector[2] = 1;
|
|
|
|
VectorNormalize (shadevector);
|
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
/*
|
|
|
|
locate the proper data
|
|
|
|
*/
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
paliashdr = (aliashdr_t *)Mod_Extradata (currententity->model);
|
|
|
|
|
|
|
|
c_alias_polys += paliashdr->numtris;
|
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
/*
|
|
|
|
draw all the triangles
|
|
|
|
*/
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
GL_DisableMultitexture();
|
2000-03-09 15:13:39 +00:00
|
|
|
glPushMatrix ();
|
2000-05-05 08:56:55 +00:00
|
|
|
|
2000-05-07 12:33:47 +00:00
|
|
|
#ifdef EXPERIMENTAL
|
2000-05-05 08:56:55 +00:00
|
|
|
if (r_interptransform->value)
|
|
|
|
R_BlendedRotateForEntity (e);
|
|
|
|
else
|
2000-05-07 12:33:47 +00:00
|
|
|
#endif
|
2000-05-05 08:56:55 +00:00
|
|
|
R_RotateForEntity (e);
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
2000-03-09 15:13:39 +00:00
|
|
|
if (!strcmp (clmodel->name, "progs/eyes.mdl") &&
|
|
|
|
gl_doubleeyes->value)
|
|
|
|
{
|
|
|
|
glTranslatef (paliashdr->scale_origin[0],
|
|
|
|
paliashdr->scale_origin[1],
|
|
|
|
paliashdr->scale_origin[2] - (22 + 8));
|
2000-01-01 06:26:03 +00:00
|
|
|
// double size of eyes, since they are really hard to see in gl
|
2000-03-09 15:13:39 +00:00
|
|
|
glScalef (paliashdr->scale[0]*2, paliashdr->scale[1]*2,
|
|
|
|
paliashdr->scale[2]*2);
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
} else {
|
2000-03-09 15:13:39 +00:00
|
|
|
glTranslatef (paliashdr->scale_origin[0],
|
|
|
|
paliashdr->scale_origin[1],
|
|
|
|
paliashdr->scale_origin[2]);
|
|
|
|
glScalef (paliashdr->scale[0], paliashdr->scale[1],
|
|
|
|
paliashdr->scale[2]);
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
anim = (int)(cl.time*10) & 3;
|
2000-03-09 15:13:39 +00:00
|
|
|
GL_Bind(paliashdr->gl_texturenum[currententity->skinnum][anim]);
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
|
|
|
// we can't dynamically colormap textures, so they are cached
|
|
|
|
// seperately for the players. Heads are just uncolored.
|
2000-01-01 06:26:03 +00:00
|
|
|
#ifdef QUAKEWORLD
|
2000-02-27 07:13:32 +00:00
|
|
|
if (currententity->scoreboard && !gl_nocolors->value) {
|
2000-01-01 06:26:03 +00:00
|
|
|
i = currententity->scoreboard - cl.players;
|
|
|
|
if (!currententity->scoreboard->skin) {
|
|
|
|
Skin_Find(currententity->scoreboard);
|
|
|
|
R_TranslatePlayerSkin(i);
|
|
|
|
}
|
2000-01-07 21:36:15 +00:00
|
|
|
if (i >= 0 && i<MAX_CLIENTS) {
|
2000-01-01 06:26:03 +00:00
|
|
|
GL_Bind(playertextures + i);
|
2000-01-07 21:36:15 +00:00
|
|
|
}
|
2000-01-01 06:26:03 +00:00
|
|
|
}
|
|
|
|
#else
|
2000-02-27 07:13:32 +00:00
|
|
|
if (currententity->colormap != vid.colormap && !gl_nocolors->value) {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
i = currententity - cl_entities;
|
2000-04-08 10:38:33 +00:00
|
|
|
if (i >= 1 && i <= cl.maxclients )
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
GL_Bind(playertextures - 1 + i);
|
|
|
|
}
|
2000-01-01 06:26:03 +00:00
|
|
|
#endif
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
2000-02-27 07:13:32 +00:00
|
|
|
if (gl_smoothmodels->value)
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
glShadeModel (GL_SMOOTH);
|
|
|
|
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
|
|
|
|
2000-02-27 07:13:32 +00:00
|
|
|
if (gl_affinemodels->value)
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
glHint (GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST);
|
|
|
|
|
2000-05-07 12:33:47 +00:00
|
|
|
#ifdef EXPERIMENTAL
|
2000-05-05 08:56:55 +00:00
|
|
|
if (r_interpanimation->value)
|
|
|
|
R_SetupAliasBlendedFrame (currententity->frame, paliashdr,
|
|
|
|
currententity);
|
|
|
|
else
|
2000-05-07 12:33:47 +00:00
|
|
|
#endif
|
2000-05-05 08:56:55 +00:00
|
|
|
R_SetupAliasFrame (currententity->frame, paliashdr);
|
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
|
|
|
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
|
|
|
|
|
|
|
glShadeModel (GL_FLAT);
|
2000-02-27 07:13:32 +00:00
|
|
|
if (gl_affinemodels->value)
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
glHint (GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
|
|
|
|
|
|
|
|
glPopMatrix ();
|
|
|
|
|
2000-05-05 08:56:55 +00:00
|
|
|
if (r_shadows->value)
|
|
|
|
{
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
glPushMatrix ();
|
|
|
|
R_RotateForEntity (e);
|
|
|
|
glDisable (GL_TEXTURE_2D);
|
|
|
|
glEnable (GL_BLEND);
|
|
|
|
glColor4f (0,0,0,0.5);
|
|
|
|
GL_DrawAliasShadow (paliashdr, lastposenum);
|
|
|
|
glEnable (GL_TEXTURE_2D);
|
|
|
|
glDisable (GL_BLEND);
|
|
|
|
glColor4f (1,1,1,1);
|
|
|
|
glPopMatrix ();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2000-01-07 21:36:15 +00:00
|
|
|
R_DrawEntitiesOnList
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
*/
|
2000-01-07 21:36:15 +00:00
|
|
|
void
|
2000-05-05 08:56:55 +00:00
|
|
|
R_DrawEntitiesOnList ( void )
|
|
|
|
{
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
int i;
|
|
|
|
|
2000-02-27 07:13:32 +00:00
|
|
|
if (!r_drawentities->value)
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
// draw sprites seperately, because of alpha blending
|
2000-01-07 21:36:15 +00:00
|
|
|
for (i=0 ; i<cl_numvisedicts ; i++) {
|
2000-01-01 06:26:03 +00:00
|
|
|
currententity = &cl_visedicts[i];
|
2000-01-07 21:36:15 +00:00
|
|
|
switch (currententity->model->type) {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
case mod_alias:
|
|
|
|
R_DrawAliasModel (currententity);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case mod_brush:
|
|
|
|
R_DrawBrushModel (currententity);
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
for (i=0 ; i<cl_numvisedicts ; i++) {
|
2000-01-01 06:26:03 +00:00
|
|
|
currententity = &cl_visedicts[i];
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
switch (currententity->model->type) {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
case mod_sprite:
|
|
|
|
R_DrawSpriteModel (currententity);
|
|
|
|
break;
|
2000-01-01 06:26:03 +00:00
|
|
|
|
|
|
|
default :
|
|
|
|
break;
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2000-01-07 21:36:15 +00:00
|
|
|
R_DrawViewModel
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
*/
|
2000-01-07 21:36:15 +00:00
|
|
|
void
|
2000-03-09 15:13:39 +00:00
|
|
|
R_DrawViewModel ( void )
|
|
|
|
{
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
float ambient[4], diffuse[4];
|
2000-03-09 15:13:39 +00:00
|
|
|
int *j;
|
|
|
|
int shadelight[4];
|
|
|
|
int lnum;
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
vec3_t dist;
|
|
|
|
float add;
|
|
|
|
dlight_t *dl;
|
2000-03-09 15:13:39 +00:00
|
|
|
int ambientlight;
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
2000-01-01 06:26:03 +00:00
|
|
|
#ifdef QUAKEWORLD
|
2000-02-27 07:13:32 +00:00
|
|
|
if (!r_drawviewmodel->value || !Cam_DrawViewModel())
|
2000-01-01 06:26:03 +00:00
|
|
|
return;
|
|
|
|
#else
|
2000-02-27 07:13:32 +00:00
|
|
|
if (!r_drawviewmodel->value)
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
return;
|
|
|
|
|
2000-02-27 07:13:32 +00:00
|
|
|
if (cl_chasecam->value)
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
return;
|
2000-01-01 06:26:03 +00:00
|
|
|
#endif
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
|
|
|
if (envmap)
|
|
|
|
return;
|
|
|
|
|
2000-02-27 07:13:32 +00:00
|
|
|
if (!r_drawentities->value)
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
return;
|
2000-03-09 15:13:39 +00:00
|
|
|
|
2000-01-01 06:26:03 +00:00
|
|
|
if (cl.stats[STAT_ITEMS] & IT_INVISIBILITY)
|
|
|
|
return;
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
|
|
|
if (cl.stats[STAT_HEALTH] <= 0)
|
|
|
|
return;
|
|
|
|
|
|
|
|
currententity = &cl.viewent;
|
|
|
|
if (!currententity->model)
|
|
|
|
return;
|
|
|
|
|
|
|
|
j = R_LightPoint (currententity->origin);
|
|
|
|
|
2000-03-09 15:13:39 +00:00
|
|
|
if (j[3] < 24)
|
|
|
|
j[3] = 24; // allways give some light on gun
|
|
|
|
ambientlight = j[3];
|
|
|
|
shadelight[0] = j[0];
|
|
|
|
shadelight[1] = j[1];
|
|
|
|
shadelight[2] = j[2];
|
|
|
|
shadelight[3] = j[3];
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
2000-03-19 15:59:51 +00:00
|
|
|
// add dynamic lights
|
2000-01-07 21:36:15 +00:00
|
|
|
for (lnum=0 ; lnum<MAX_DLIGHTS ; lnum++) {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
dl = &cl_dlights[lnum];
|
|
|
|
if (!dl->radius)
|
|
|
|
continue;
|
|
|
|
if (!dl->radius)
|
|
|
|
continue;
|
|
|
|
if (dl->die < cl.time)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
VectorSubtract (currententity->origin, dl->origin, dist);
|
|
|
|
add = dl->radius - Length(dist);
|
|
|
|
if (add > 0)
|
2000-03-09 15:13:39 +00:00
|
|
|
{
|
|
|
|
shadelight[0] += dl->color[0];
|
|
|
|
shadelight[1] += dl->color[1];
|
|
|
|
shadelight[2] += dl->color[2];
|
|
|
|
shadelight[3] += add;
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
ambientlight += add;
|
2000-03-09 15:13:39 +00:00
|
|
|
}
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
}
|
|
|
|
|
2000-03-09 15:13:39 +00:00
|
|
|
ambient[0] = ambient[1] = ambient[2] = ambient[3] =
|
|
|
|
(float)ambientlight / 128;
|
|
|
|
|
|
|
|
diffuse[0] = diffuse[1] = diffuse[2] = diffuse[3] =
|
|
|
|
(float)shadelight[3] / 128;
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
|
|
|
// hack the depth range to prevent view model from poking into walls
|
|
|
|
glDepthRange (gldepthmin, gldepthmin + 0.3*(gldepthmax-gldepthmin));
|
|
|
|
R_DrawAliasModel (currententity);
|
|
|
|
glDepthRange (gldepthmin, gldepthmax);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2000-01-07 21:36:15 +00:00
|
|
|
R_PolyBlend
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
*/
|
2000-01-07 21:36:15 +00:00
|
|
|
void
|
2000-05-05 08:56:55 +00:00
|
|
|
R_PolyBlend ( void )
|
|
|
|
{
|
2000-02-27 07:13:32 +00:00
|
|
|
if (!gl_polyblend->value)
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
return;
|
|
|
|
if (!v_blend[3])
|
|
|
|
return;
|
|
|
|
|
|
|
|
GL_DisableMultitexture();
|
|
|
|
|
|
|
|
glDisable (GL_ALPHA_TEST);
|
|
|
|
glEnable (GL_BLEND);
|
|
|
|
glDisable (GL_DEPTH_TEST);
|
|
|
|
glDisable (GL_TEXTURE_2D);
|
|
|
|
|
|
|
|
glLoadIdentity ();
|
|
|
|
|
|
|
|
glRotatef (-90, 1, 0, 0); // put Z going up
|
|
|
|
glRotatef (90, 0, 0, 1); // put Z going up
|
|
|
|
|
|
|
|
glColor4fv (v_blend);
|
|
|
|
|
|
|
|
glBegin (GL_QUADS);
|
|
|
|
|
|
|
|
glVertex3f (10, 100, 100);
|
|
|
|
glVertex3f (10, -100, 100);
|
|
|
|
glVertex3f (10, -100, -100);
|
|
|
|
glVertex3f (10, 100, -100);
|
|
|
|
glEnd ();
|
|
|
|
|
|
|
|
glDisable (GL_BLEND);
|
|
|
|
glEnable (GL_TEXTURE_2D);
|
|
|
|
glEnable (GL_ALPHA_TEST);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
int
|
2000-05-05 08:56:55 +00:00
|
|
|
SignbitsForPlane ( mplane_t *out )
|
|
|
|
{
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
int bits, j;
|
|
|
|
|
|
|
|
// for fast box on planeside test
|
|
|
|
|
|
|
|
bits = 0;
|
2000-01-07 21:36:15 +00:00
|
|
|
for (j=0 ; j<3 ; j++) {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
if (out->normal[j] < 0)
|
|
|
|
bits |= 1<<j;
|
|
|
|
}
|
|
|
|
return bits;
|
|
|
|
}
|
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
void
|
2000-05-05 08:56:55 +00:00
|
|
|
R_SetFrustum ( void )
|
|
|
|
{
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
int i;
|
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
if (r_refdef.fov_x == 90) {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
// front side is visible
|
|
|
|
|
|
|
|
VectorAdd (vpn, vright, frustum[0].normal);
|
|
|
|
VectorSubtract (vpn, vright, frustum[1].normal);
|
|
|
|
|
|
|
|
VectorAdd (vpn, vup, frustum[2].normal);
|
|
|
|
VectorSubtract (vpn, vup, frustum[3].normal);
|
2000-01-07 21:36:15 +00:00
|
|
|
} else {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
// rotate VPN right by FOV_X/2 degrees
|
|
|
|
RotatePointAroundVector( frustum[0].normal, vup, vpn, -(90-r_refdef.fov_x / 2 ) );
|
|
|
|
// rotate VPN left by FOV_X/2 degrees
|
|
|
|
RotatePointAroundVector( frustum[1].normal, vup, vpn, 90-r_refdef.fov_x / 2 );
|
|
|
|
// rotate VPN up by FOV_X/2 degrees
|
|
|
|
RotatePointAroundVector( frustum[2].normal, vright, vpn, 90-r_refdef.fov_y / 2 );
|
|
|
|
// rotate VPN down by FOV_X/2 degrees
|
|
|
|
RotatePointAroundVector( frustum[3].normal, vright, vpn, -( 90 - r_refdef.fov_y / 2 ) );
|
|
|
|
}
|
2000-01-07 21:36:15 +00:00
|
|
|
for (i=0 ; i<4 ; i++) {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
frustum[i].type = PLANE_ANYZ;
|
|
|
|
frustum[i].dist = DotProduct (r_origin, frustum[i].normal);
|
|
|
|
frustum[i].signbits = SignbitsForPlane (&frustum[i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2000-01-07 21:36:15 +00:00
|
|
|
R_SetupFrame
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
*/
|
2000-01-07 21:36:15 +00:00
|
|
|
void
|
2000-04-15 10:14:40 +00:00
|
|
|
R_SetupFrame ( void )
|
|
|
|
{
|
|
|
|
// don't allow cheats in multiplayer
|
2000-01-01 06:26:03 +00:00
|
|
|
#ifdef QUAKEWORLD
|
2000-04-15 10:14:40 +00:00
|
|
|
Cvar_Set (r_fullbright, "0");
|
|
|
|
Cvar_Set (r_lightmap, "0");
|
2000-01-01 06:26:03 +00:00
|
|
|
if (!atoi(Info_ValueForKey(cl.serverinfo, "watervis")))
|
2000-04-15 10:14:40 +00:00
|
|
|
Cvar_Set (r_wateralpha, "1");
|
2000-01-01 06:26:03 +00:00
|
|
|
#else
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
if (cl.maxclients > 1)
|
2000-04-03 14:30:02 +00:00
|
|
|
Cvar_Set (r_fullbright, "0");
|
2000-01-01 06:26:03 +00:00
|
|
|
#endif
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
|
|
|
R_AnimateLight ();
|
|
|
|
r_framecount++;
|
|
|
|
|
|
|
|
// build the transformation matrix for the given view angles
|
|
|
|
VectorCopy (r_refdef.vieworg, r_origin);
|
|
|
|
|
|
|
|
AngleVectors (r_refdef.viewangles, vpn, vright, vup);
|
|
|
|
|
|
|
|
// current viewleaf
|
|
|
|
r_oldviewleaf = r_viewleaf;
|
|
|
|
r_viewleaf = Mod_PointInLeaf (r_origin, cl.worldmodel);
|
|
|
|
|
|
|
|
V_SetContentsColor (r_viewleaf->contents);
|
|
|
|
V_CalcBlend ();
|
|
|
|
|
|
|
|
r_cache_thrash = false;
|
|
|
|
|
|
|
|
c_brush_polys = 0;
|
|
|
|
c_alias_polys = 0;
|
|
|
|
}
|
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
void
|
2000-05-05 08:56:55 +00:00
|
|
|
MYgluPerspective( GLdouble fovy, GLdouble aspect, GLdouble zNear,
|
|
|
|
GLdouble zFar )
|
|
|
|
{
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
|
|
|
GLdouble xmin, xmax, ymin, ymax;
|
|
|
|
|
|
|
|
ymax = zNear * tan( fovy * M_PI / 360.0 );
|
|
|
|
ymin = -ymax;
|
|
|
|
|
|
|
|
xmin = ymin * aspect;
|
|
|
|
xmax = ymax * aspect;
|
|
|
|
|
|
|
|
glFrustum( xmin, xmax, ymin, ymax, zNear, zFar );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2000-01-07 21:36:15 +00:00
|
|
|
R_SetupGL
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
*/
|
2000-01-07 21:36:15 +00:00
|
|
|
void
|
2000-05-05 08:56:55 +00:00
|
|
|
R_SetupGL ( void )
|
|
|
|
{
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
float screenaspect;
|
1999-12-27 17:18:40 +00:00
|
|
|
//float yfov;
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
extern int glwidth, glheight;
|
|
|
|
int x, x2, y2, y, w, h;
|
|
|
|
|
|
|
|
//
|
|
|
|
// set up viewpoint
|
|
|
|
//
|
|
|
|
glMatrixMode(GL_PROJECTION);
|
|
|
|
glLoadIdentity ();
|
|
|
|
x = r_refdef.vrect.x * glwidth/vid.width;
|
|
|
|
x2 = (r_refdef.vrect.x + r_refdef.vrect.width) * glwidth/vid.width;
|
|
|
|
y = (vid.height-r_refdef.vrect.y) * glheight/vid.height;
|
|
|
|
y2 = (vid.height - (r_refdef.vrect.y + r_refdef.vrect.height)) * glheight/vid.height;
|
|
|
|
|
|
|
|
// fudge around because of frac screen scale
|
|
|
|
if (x > 0)
|
|
|
|
x--;
|
|
|
|
if (x2 < glwidth)
|
|
|
|
x2++;
|
|
|
|
if (y2 < 0)
|
|
|
|
y2--;
|
|
|
|
if (y < glheight)
|
|
|
|
y++;
|
|
|
|
|
|
|
|
w = x2 - x;
|
|
|
|
h = y - y2;
|
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
if (envmap) {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
x = y2 = 0;
|
|
|
|
w = h = 256;
|
|
|
|
}
|
|
|
|
|
|
|
|
glViewport (glx + x, gly + y2, w, h);
|
|
|
|
screenaspect = (float)r_refdef.vrect.width/r_refdef.vrect.height;
|
|
|
|
// yfov = 2*atan((float)r_refdef.vrect.height/r_refdef.vrect.width)*180/M_PI;
|
2000-02-27 07:13:32 +00:00
|
|
|
// yfov = (2.0 * tan (scr_fov->value/360*M_PI)) / screenaspect;
|
|
|
|
// yfov = 2*atan((float)r_refdef.vrect.height/r_refdef.vrect.width)*(scr_fov->value*2)/M_PI;
|
2000-01-07 21:36:15 +00:00
|
|
|
// MYgluPerspective (yfov, screenaspect, 4, 4096);
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
MYgluPerspective (r_refdef.fov_y, screenaspect, 4, 4096);
|
|
|
|
|
2000-01-19 11:01:04 +00:00
|
|
|
glCullFace(GL_FRONT);
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
|
|
|
glMatrixMode(GL_MODELVIEW);
|
|
|
|
glLoadIdentity ();
|
|
|
|
|
|
|
|
glRotatef (-90, 1, 0, 0); // put Z going up
|
|
|
|
glRotatef (90, 0, 0, 1); // put Z going up
|
|
|
|
glRotatef (-r_refdef.viewangles[2], 1, 0, 0);
|
|
|
|
glRotatef (-r_refdef.viewangles[0], 0, 1, 0);
|
|
|
|
glRotatef (-r_refdef.viewangles[1], 0, 0, 1);
|
|
|
|
glTranslatef (-r_refdef.vieworg[0], -r_refdef.vieworg[1], -r_refdef.vieworg[2]);
|
|
|
|
|
|
|
|
glGetFloatv (GL_MODELVIEW_MATRIX, r_world_matrix);
|
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
/*
|
|
|
|
set drawing parms
|
|
|
|
*/
|
2000-02-27 07:13:32 +00:00
|
|
|
if (gl_cull->value)
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
glEnable(GL_CULL_FACE);
|
|
|
|
else
|
|
|
|
glDisable(GL_CULL_FACE);
|
|
|
|
|
|
|
|
glDisable(GL_BLEND);
|
|
|
|
glDisable(GL_ALPHA_TEST);
|
|
|
|
glEnable(GL_DEPTH_TEST);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2000-01-07 21:36:15 +00:00
|
|
|
R_RenderScene
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
r_refdef must be set before the first call
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
*/
|
2000-01-07 21:36:15 +00:00
|
|
|
void
|
2000-05-05 08:56:55 +00:00
|
|
|
R_RenderScene ( void )
|
|
|
|
{
|
2000-01-07 21:36:15 +00:00
|
|
|
R_SetupFrame ();
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
R_SetFrustum ();
|
2000-03-19 15:59:51 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
R_SetupGL ();
|
|
|
|
|
|
|
|
R_MarkLeaves (); // done here so we know if we're in water
|
|
|
|
R_DrawWorld (); // adds static entities to the list
|
|
|
|
S_ExtraUpdate (); // don't let sound get messed up if going slow
|
|
|
|
R_DrawEntitiesOnList ();
|
|
|
|
|
|
|
|
GL_DisableMultitexture();
|
|
|
|
|
|
|
|
R_RenderDlights ();
|
2000-04-17 10:39:55 +00:00
|
|
|
R_UpdateFires ();
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
R_DrawParticles ();
|
|
|
|
|
|
|
|
#ifdef GLTEST
|
|
|
|
Test_Draw ();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2000-01-07 21:36:15 +00:00
|
|
|
R_Clear
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
*/
|
2000-01-07 21:36:15 +00:00
|
|
|
void
|
2000-05-05 08:56:55 +00:00
|
|
|
R_Clear ( void )
|
|
|
|
{
|
2000-02-27 03:34:54 +00:00
|
|
|
static int l;
|
|
|
|
|
2000-02-27 07:13:32 +00:00
|
|
|
if (gl_ztrick->value)
|
2000-02-27 03:34:54 +00:00
|
|
|
{
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
static int trickframe;
|
|
|
|
|
2000-02-27 07:13:32 +00:00
|
|
|
if (gl_clear->value)
|
2000-02-27 03:34:54 +00:00
|
|
|
{
|
2000-02-27 07:13:32 +00:00
|
|
|
if (l != (int)r_clearcolor->value)
|
2000-02-27 03:34:54 +00:00
|
|
|
{
|
2000-02-27 07:13:32 +00:00
|
|
|
l = (int)r_clearcolor->value;
|
2000-02-27 03:34:54 +00:00
|
|
|
glClearColor (host_basepal[l*3]/255.0,
|
|
|
|
host_basepal[l*3+1]/255.0,
|
|
|
|
host_basepal[l*3+2]/255.0,
|
|
|
|
1.0);
|
|
|
|
}
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
glClear (GL_COLOR_BUFFER_BIT);
|
2000-02-27 03:34:54 +00:00
|
|
|
}
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
|
|
|
trickframe++;
|
2000-02-27 03:34:54 +00:00
|
|
|
if (trickframe & 1)
|
|
|
|
{
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
gldepthmin = 0;
|
|
|
|
gldepthmax = 0.49999;
|
|
|
|
glDepthFunc (GL_LEQUAL);
|
2000-02-27 03:34:54 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
gldepthmin = 1;
|
|
|
|
gldepthmax = 0.5;
|
|
|
|
glDepthFunc (GL_GEQUAL);
|
|
|
|
}
|
2000-02-27 03:34:54 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2000-02-27 07:13:32 +00:00
|
|
|
if (gl_clear->value)
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
2000-02-27 03:34:54 +00:00
|
|
|
else
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
glClear (GL_DEPTH_BUFFER_BIT);
|
2000-02-27 03:34:54 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
gldepthmin = 0;
|
|
|
|
gldepthmax = 1;
|
|
|
|
glDepthFunc (GL_LEQUAL);
|
|
|
|
}
|
|
|
|
glDepthRange (gldepthmin, gldepthmax);
|
|
|
|
}
|
|
|
|
|
2000-02-27 07:13:32 +00:00
|
|
|
extern cvar_t *crosshaircolor;
|
2000-02-04 04:01:23 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
/*
|
2000-01-07 21:36:15 +00:00
|
|
|
R_RenderView
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
r_refdef must be set before the first call
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
*/
|
2000-01-07 21:36:15 +00:00
|
|
|
void
|
2000-05-05 08:56:55 +00:00
|
|
|
R_RenderView ( void )
|
|
|
|
{
|
1999-12-27 17:18:40 +00:00
|
|
|
double time1 = 0, time2 = 0;
|
1999-12-30 19:58:41 +00:00
|
|
|
// Fixme: the last argument should be a cvar... r_fog_gamma
|
2000-01-20 04:11:12 +00:00
|
|
|
GLfloat colors[4] = {(GLfloat) 1.0, (GLfloat) 1.0, (GLfloat) 1, (GLfloat) 0.1};
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
2000-02-27 07:13:32 +00:00
|
|
|
if (r_norefresh->value)
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
if (!r_worldentity.model || !cl.worldmodel)
|
|
|
|
Sys_Error ("R_RenderView: NULL worldmodel");
|
|
|
|
|
2000-02-27 07:13:32 +00:00
|
|
|
if (r_speeds->value)
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
{
|
|
|
|
glFinish ();
|
|
|
|
time1 = Sys_DoubleTime ();
|
|
|
|
c_brush_polys = 0;
|
|
|
|
c_alias_polys = 0;
|
|
|
|
}
|
|
|
|
|
2000-02-27 07:13:32 +00:00
|
|
|
if (gl_finish->value)
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
glFinish ();
|
|
|
|
|
|
|
|
R_Clear ();
|
|
|
|
|
|
|
|
// render normal view
|
2000-04-25 04:08:12 +00:00
|
|
|
if (r_fog->value) {
|
|
|
|
glFogi (GL_FOG_MODE, GL_EXP2);
|
|
|
|
glFogfv (GL_FOG_COLOR, colors);
|
|
|
|
glFogf (GL_FOG_DENSITY, (GLfloat) r_fog->value);
|
|
|
|
// glFogi (GL_FOG_MODE, GL_LINEAR);
|
|
|
|
// glFogfv (GL_FOG_COLOR, colors);
|
|
|
|
// glFogf (GL_FOG_START, 300.0);
|
|
|
|
// glFogf (GL_FOG_END, 1500.0);
|
|
|
|
// glFogf (GL_FOG_DENSITY, 0.2);
|
|
|
|
glEnable (GL_FOG);
|
|
|
|
}
|
|
|
|
R_RenderScene ();
|
|
|
|
R_DrawViewModel ();
|
|
|
|
if (r_wateralpha->value<1.0 || r_volfog->value) {
|
2000-02-29 05:51:29 +00:00
|
|
|
glClear(GL_STENCIL_BUFFER_BIT);
|
|
|
|
//glColorMask(GL_FALSE);
|
2000-01-07 03:59:52 +00:00
|
|
|
glStencilFunc(GL_ALWAYS, 1, 1);
|
2000-01-07 04:23:16 +00:00
|
|
|
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
|
|
|
|
//glEnable(GL_STENCIL_TEST);
|
|
|
|
glEnable(GL_DEPTH_TEST);
|
2000-02-29 05:51:29 +00:00
|
|
|
glDepthFunc(GL_LESS);
|
2000-04-25 04:08:12 +00:00
|
|
|
}
|
|
|
|
if (r_volfog->value && !r_fog->value) {
|
2000-04-24 08:59:09 +00:00
|
|
|
glFogi (GL_FOG_MODE, GL_EXP2);
|
|
|
|
glFogfv (GL_FOG_COLOR, colors);
|
2000-04-25 04:08:12 +00:00
|
|
|
// fixme: GL_FOG_DENSITY should have r_volfog_density var
|
2000-04-24 08:59:09 +00:00
|
|
|
glFogf (GL_FOG_DENSITY, r_volfog->value);
|
2000-04-25 04:08:12 +00:00
|
|
|
glEnable (GL_FOG);
|
|
|
|
}
|
|
|
|
R_DrawWaterSurfaces ();
|
|
|
|
if (r_volfog->value || r_fog->value)
|
2000-01-07 03:59:52 +00:00
|
|
|
glDisable(GL_FOG);
|
2000-04-25 04:08:12 +00:00
|
|
|
if (r_wateralpha->value<1.0 || r_volfog->value) {
|
2000-01-07 03:59:52 +00:00
|
|
|
glStencilFunc(GL_EQUAL, 1, 1);
|
|
|
|
glStencilMask(GL_FALSE);
|
|
|
|
glDisable(GL_DEPTH_TEST);
|
|
|
|
}
|
2000-01-20 04:11:12 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
R_PolyBlend ();
|
|
|
|
|
2000-02-27 07:13:32 +00:00
|
|
|
if (r_speeds->value) {
|
2000-01-07 21:36:15 +00:00
|
|
|
//glFinish ();
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
time2 = Sys_DoubleTime ();
|
2000-03-19 15:59:51 +00:00
|
|
|
Con_Printf ("%3i ms %4i wpoly %4i epoly\n", (int)((time2-time1)*1000), c_brush_polys, c_alias_polys);
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
}
|
|
|
|
}
|
2000-05-05 08:56:55 +00:00
|
|
|
|