model loading code merge. dragged in smoe merges and cleanups of d_iface.h,

r_local.h, r_shared.h, client.h and render.h at the same time (couldn't get
away from that:/) verly likely to be lots of breakage (eg, player and eye
models are NOT checksummed atm), but everything builds
This commit is contained in:
Bill Currie 2001-05-10 06:01:11 +00:00
parent 5cd8ddb1aa
commit 2c07108c65
81 changed files with 370 additions and 752 deletions

View file

@ -1487,6 +1487,10 @@ AC_OUTPUT(
libs/audio/cd/Makefile
libs/audio/targets/Makefile
libs/gamecode/Makefile
libs/models/Makefile
libs/models/alias/Makefile
libs/models/brush/Makefile
libs/models/sprite/Makefile
libs/util/Makefile
libs/video/Makefile
libs/video/targets/Makefile

View file

@ -29,7 +29,8 @@
#ifndef _SKIN_H
#define _SKIN_H
#include "client.h"
#include "QF/qtypes.h"
#include "QF/zone.h"
#define MAX_CACHED_SKINS 128
@ -58,7 +59,7 @@ void Skin_Init (void);
void Skin_Init_Cvars (void);
void Skin_Init_Translation (void);
void Skin_Set_Translate (struct player_info_s *player);
void Skin_Do_Translation (player_info_t *player);
void Skin_Do_Translation (struct player_info_s *player);
void Skin_Process (skin_t *skin, struct tex_s *);
#endif

View file

@ -46,7 +46,21 @@ typedef struct
} emitpoint_t;
typedef enum {
pt_static, pt_grav, pt_slowgrav, pt_fire, pt_explode, pt_explode2, pt_blob, pt_blob2
pt_static,
pt_grav,
pt_blob,
pt_blob2,
pt_smoke,
pt_smokering,
pt_smokecloud,
pt_bloodcloud,
pt_fadespark,
pt_fadespark2,
pt_fallfadespark,
pt_slowgrav,
pt_fire,
pt_explode,
pt_explode2,
} ptype_t;
// !!! if this is changed, it must be changed in d_ifacea.h too !!!
@ -54,7 +68,12 @@ typedef struct particle_s
{
// driver-usable fields
vec3_t org;
vec3_t up;
vec3_t right;
int tex;
float color;
float alpha;
float scale;
// drivers never touch the following fields
struct particle_s *next;
vec3_t vel;

View file

@ -53,14 +53,19 @@
// !!! if this is changed, it must be changed in d_iface.h too !!!
// driver-usable fields
#define pt_org 0
#define pt_color 12
#define pt_up 12
#define pt_right 24
#define pt_tex 36
#define pt_color 40
#define pt_alpha 44
#define pt_scale 48
// drivers never touch the following fields
#define pt_next 16
#define pt_vel 20
#define pt_ramp 32
#define pt_die 36
#define pt_type 40
#define pt_size 44
#define pt_next 52
#define pt_vel 56
#define pt_ramp 60
#define pt_die 64
#define pt_type 68
#define pt_size 72
#define PARTICLE_Z_CLIP 8.0

View file

@ -32,9 +32,7 @@
#include "QF/mathlib.h"
#include "QF/cvar.h"
#include "QF/vid.h"
#include "client.h"
#include "QF/model.h"
#include "pmove.h"
#include "r_shared.h"
#define ALIAS_BASE_SIZE_RATIO (1.0 / 11.0)
@ -44,6 +42,38 @@
#define BMODEL_FULLY_CLIPPED 0x10 // value returned by R_BmodelCheckBBox ()
// if bbox is trivially rejected
//===========================================================================
// dynamic lights
#define MAX_DLIGHTS 32
typedef struct
{
int key; // so entities can reuse same entry
vec3_t origin;
float radius;
float die; // stop lighting after this time
float decay; // drop this each second
float minlight; // don't add when contributing less
float color[3]; // Don't use alpha --KB
} dlight_t;
//===========================================================================
// color shifts
typedef struct
{
int destcolor[3];
int percent; // 0-256
} cshift_t;
#define CSHIFT_CONTENTS 0
#define CSHIFT_DAMAGE 1
#define CSHIFT_BONUS 2
#define CSHIFT_POWERUP 3
#define NUM_CSHIFTS 4
//===========================================================================
// viewmodel lighting
@ -68,23 +98,24 @@ typedef struct {
//===========================================================================
extern cvar_t *r_draworder;
extern cvar_t *r_speeds;
extern cvar_t *r_timegraph;
extern cvar_t *r_graphheight;
extern cvar_t *r_clearcolor;
extern cvar_t *r_waterwarp;
extern cvar_t *r_drawentities;
extern cvar_t *r_aliasstats;
extern cvar_t *r_dspeeds;
extern cvar_t *r_drawflat;
extern cvar_t *r_ambient;
extern cvar_t *r_reportsurfout;
extern cvar_t *r_maxsurfs;
extern cvar_t *r_numsurfs;
extern cvar_t *r_reportedgeout;
extern cvar_t *r_maxedges;
extern cvar_t *r_numedges;
extern struct cvar_s *r_draworder;
extern struct cvar_s *r_speeds;
extern struct cvar_s *r_timegraph;
extern struct cvar_s *r_graphheight;
extern struct cvar_s *r_clearcolor;
extern struct cvar_s *r_waterwarp;
extern struct cvar_s *r_fullbright;
extern struct cvar_s *r_drawentities;
extern struct cvar_s *r_aliasstats;
extern struct cvar_s *r_dspeeds;
extern struct cvar_s *r_drawflat;
extern struct cvar_s *r_ambient;
extern struct cvar_s *r_reportsurfout;
extern struct cvar_s *r_maxsurfs;
extern struct cvar_s *r_numsurfs;
extern struct cvar_s *r_reportedgeout;
extern struct cvar_s *r_maxedges;
extern struct cvar_s *r_numedges;
#define XCENTERING (1.0 / 2.0)
#define YCENTERING (1.0 / 2.0)

View file

@ -32,7 +32,6 @@
#define _R_SHARED_H
#include "d_iface.h"
#include "render.h"
#define MAXVERTS 16 // max points in a surface polygon
#define MAXWORKINGVERTS (MAXVERTS+4) // max points in an intermediate
@ -40,6 +39,9 @@
// !!! if this is changed, it must be changed in d_ifacea.h too !!!
#define MAXHEIGHT 1024
#define MAXWIDTH 1280
#define MAXDIMENSION ((MAXHEIGHT > MAXWIDTH) ? MAXHEIGHT : MAXWIDTH)
#define SIN_BUFFER_SIZE (MAXDIMENSION+CYCLE)
#define INFINITE_DISTANCE 0x10000 // distance that's always guaranteed to
// be farther away than anything in
@ -57,17 +59,17 @@ extern float pixelAspect;
extern int r_drawnpolycount;
extern cvar_t *r_clearcolor;
extern struct cvar_s *r_clearcolor;
extern int sintable[1280];
extern int intsintable[1280];
extern int sintable[SIN_BUFFER_SIZE];
extern int intsintable[SIN_BUFFER_SIZE];
extern vec3_t vup, base_vup;
extern vec3_t vpn, base_vpn;
extern vec3_t vright, base_vright;
extern entity_t *currententity;
extern struct entity_s *currententity;
#define NUMSTACKEDGES 2000
#define NUMSTACKEDGES 2400 //2000
#define MINEDGES NUMSTACKEDGES
#define NUMSTACKSURFACES 1000
#define MINSURFACES NUMSTACKSURFACES
@ -95,7 +97,7 @@ typedef struct surf_s
// start)
int flags; // currentface flags
void *data; // associated data like msurface_t
entity_t *entity;
struct entity_s *entity;
float nearzi; // nearest 1/z on surface, for mipmapping
qboolean insubmodel;
float d_ziorigin, d_zistepu, d_zistepv;

View file

@ -1,4 +1,4 @@
SUBDIRS= audio gamecode util video
SUBDIRS= audio gamecode models util video
clean-local:
rm -f *.a

7
libs/models/.gitignore vendored Normal file
View file

@ -0,0 +1,7 @@
*.la
*.lo
.deps
.libs
.vimrc
Makefile
Makefile.in

15
libs/models/Makefile.am Normal file
View file

@ -0,0 +1,15 @@
SUBDIRS= alias brush sprite
INCLUDES= -I$(top_srcdir)/include
lib_LTLIBRARIES = libQFmodels.la libQFmodels_gl.la libQFmodels_sw.la
libQFmodels_la_LDFLAGS = -version-info 1:0:0 brush/model_brush.lo
libQFmodels_la_SOURCES = model.c
libQFmodels_gl_la_LDFLAGS = -version-info 1:0:0 alias/libalias_gl.la brush/libbrush_gl.la sprite/libsprite_gl.la
libQFmodels_gl_la_SOURCES = model.c gl_model_fullbright.c
libQFmodels_sw_la_LDFLAGS = -version-info 1:0:0 alias/libalias_sw.la brush/libbrush_sw.la sprite/libsprite_sw.la
libQFmodels_sw_la_SOURCES = model.c
LIBLIST = libQFmodels.la libQFmodels_gl.la libQFmodels_sw.la

7
libs/models/alias/.gitignore vendored Normal file
View file

@ -0,0 +1,7 @@
*.la
*.lo
.deps
.libs
.vimrc
Makefile
Makefile.in

View file

@ -0,0 +1,9 @@
INCLUDES= -I$(top_srcdir)/include
noinst_LTLIBRARIES = libalias_gl.la libalias_sw.la
libalias_gl_la_LDFLAGS = -version-info 1:0:0
libalias_gl_la_SOURCES = gl_model_alias.c model_alias.c
libalias_sw_la_LDFLAGS = -version-info 1:0:0
libalias_sw_la_SOURCES = sw_model_alias.c model_alias.c

View file

@ -44,9 +44,11 @@
#include "QF/model.h"
#include "QF/qendian.h"
#include "QF/skin.h"
#include "QF/sys.h"
#include "glquake.h"
#include "server.h"
byte player_8bit_texels[320 * 200];
extern model_t *loadmodel;
@ -154,7 +156,7 @@ Mod_LoadSkin (byte * skin, int skinsize, int snum, int gnum, qboolean group)
// save 8 bit texels for the player model to remap
if (!strcmp (loadmodel->name, "progs/player.mdl")) {
if (skinsize > sizeof (player_8bit_texels))
SV_Error ("Player skin too large");
Sys_Error ("Player skin too large");
memcpy (player_8bit_texels, skin, skinsize);
}
@ -196,7 +198,7 @@ Mod_LoadAllSkins (int numskins, daliasskintype_t *pskintype, int *pskinindex)
daliasskininterval_t *pinskinintervals;
if (numskins < 1 || numskins > MAX_SKINS)
SV_Error ("Mod_LoadAliasModel: Invalid # of skins: %d\n", numskins);
Sys_Error ("Mod_LoadAliasModel: Invalid # of skins: %d\n", numskins);
skinsize = pheader->mdl.skinwidth * pheader->mdl.skinheight;

View file

@ -39,8 +39,6 @@
# include <strings.h>
#endif
#include "cl_main.h"
#include "client.h"
#include "QF/compat.h"
#include "QF/crc.h"
#include "QF/info.h"
@ -48,8 +46,10 @@
#include "QF/msg.h"
#include "QF/qendian.h"
#include "QF/quakefs.h"
#include "QF/sys.h"
#include "d_iface.h"
#include "r_local.h"
#include "server.h"
extern char loadname[];
extern model_t *loadmodel;
@ -94,7 +94,7 @@ Mod_LoadAliasModel (model_t *mod, void *buffer)
daliasframetype_t *pframetype;
daliasskintype_t *pskintype;
int start, end, total;
#if 0 //XXX FIXME
if (!strcmp (loadmodel->name, "progs/player.mdl") ||
!strcmp (loadmodel->name, "progs/eyes.mdl")) {
unsigned short crc;
@ -121,6 +121,7 @@ Mod_LoadAliasModel (model_t *mod, void *buffer)
SZ_Print (&cls.netchan.message, st);
}
}
#endif
start = Hunk_LowMark ();
@ -128,7 +129,7 @@ Mod_LoadAliasModel (model_t *mod, void *buffer)
version = LittleLong (pinmodel->version);
if (version != ALIAS_VERSION)
SV_Error ("%s has wrong version number (%i should be %i)",
Sys_Error ("%s has wrong version number (%i should be %i)",
mod->name, version, ALIAS_VERSION);
//
@ -152,26 +153,26 @@ Mod_LoadAliasModel (model_t *mod, void *buffer)
pmodel->skinheight = LittleLong (pinmodel->skinheight);
if (pmodel->skinheight > MAX_LBM_HEIGHT)
SV_Error ("model %s has a skin taller than %d", mod->name,
Sys_Error ("model %s has a skin taller than %d", mod->name,
MAX_LBM_HEIGHT);
pmodel->numverts = LittleLong (pinmodel->numverts);
if (pmodel->numverts <= 0)
SV_Error ("model %s has no vertices", mod->name);
Sys_Error ("model %s has no vertices", mod->name);
if (pmodel->numverts > MAXALIASVERTS)
SV_Error ("model %s has too many vertices", mod->name);
Sys_Error ("model %s has too many vertices", mod->name);
pmodel->numtris = LittleLong (pinmodel->numtris);
if (pmodel->numtris <= 0)
SV_Error ("model %s has no triangles", mod->name);
Sys_Error ("model %s has no triangles", mod->name);
pmodel->numframes = LittleLong (pinmodel->numframes);
numframes = pmodel->numframes;
if (numframes < 1)
SV_Error ("Mod_LoadAliasModel: Invalid # of frames: %d\n", numframes);
Sys_Error ("Mod_LoadAliasModel: Invalid # of frames: %d\n", numframes);
pmodel->size = LittleFloat (pinmodel->size) * ALIAS_BASE_SIZE_RATIO;
mod->synctype = LittleLong (pinmodel->synctype);

View file

@ -41,12 +41,12 @@
#endif
#include "QF/checksum.h"
#include "d_iface.h"
#include "QF/model.h"
#include "QF/qendian.h"
#include "server.h"
#include "QF/sys.h"
#include "d_iface.h"
extern char loadname[];
extern model_t *loadmodel;
@ -84,7 +84,7 @@ Mod_LoadSkin (byte * skin, int skinsize, int *pskinindex, int snum, int gnum)
pusskin[i] = d_8to16table[skin[i]];
break;
default:
SV_Error ("Mod_LoadAliasSkin: driver set invalid r_pixbytes: %d\n",
Sys_Error ("Mod_LoadAliasSkin: driver set invalid r_pixbytes: %d\n",
r_pixbytes);
break;
}
@ -269,7 +269,7 @@ Mod_LoadAliasGroup (void *pin, maliasframedesc_t *frame)
for (i = 0; i < numframes; i++) {
*poutintervals = LittleFloat (pin_intervals->interval);
if (*poutintervals <= 0.0)
SV_Error ("Mod_LoadAliasGroup: interval<=0");
Sys_Error ("Mod_LoadAliasGroup: interval<=0");
poutintervals++;
pin_intervals++;

7
libs/models/brush/.gitignore vendored Normal file
View file

@ -0,0 +1,7 @@
*.la
*.lo
.deps
.libs
.vimrc
Makefile
Makefile.in

View file

@ -0,0 +1,9 @@
INCLUDES= -I$(top_srcdir)/include
noinst_LTLIBRARIES = libbrush_gl.la libbrush_sw.la
libbrush_gl_la_LDFLAGS = -version-info 1:0:0
libbrush_gl_la_SOURCES = gl_model_brush.c model_brush.c
libbrush_sw_la_LDFLAGS = -version-info 1:0:0
libbrush_sw_la_SOURCES = sw_model_brush.c model_brush.c

View file

@ -47,8 +47,10 @@
#include "QF/cvar.h"
#include "QF/model.h"
#include "QF/qendian.h"
#include "render.h"
#include "server.h"
#include "QF/sys.h"
extern struct texture_s *r_notexture_mip;
void R_InitSky (struct texture_s *mt);
extern model_t *loadmodel;
extern char loadname[];
@ -58,7 +60,7 @@ extern const int mod_lightmap_bytes;
byte mod_novis[MAX_MAP_LEAFS / 8];
void GL_SubdivideSurface (msurface_t *fa);
extern cvar_t *gl_sky_divide;
cvar_t *gl_sky_divide;
/*
Mod_PointInLeaf
@ -71,7 +73,7 @@ Mod_PointInLeaf (vec3_t p, model_t *model)
mplane_t *plane;
if (!model || !model->nodes)
SV_Error ("Mod_PointInLeaf: bad model");
Sys_Error ("Mod_PointInLeaf: bad model");
node = model->nodes;
while (1) {
@ -183,7 +185,7 @@ Mod_LoadTextures (lump_t *l)
mt->offsets[j] = LittleLong (mt->offsets[j]);
if ((mt->width & 15) || (mt->height & 15))
SV_Error ("Texture %s is not 16 aligned", mt->name);
Sys_Error ("Texture %s is not 16 aligned", mt->name);
pixels = mt->width * mt->height / 64 * 85;
tx = Hunk_AllocName (sizeof (texture_t) + pixels, loadname);
@ -235,7 +237,7 @@ Mod_LoadTextures (lump_t *l)
altanims[altmax] = tx;
altmax++;
} else
SV_Error ("Bad animating texture %s", tx->name);
Sys_Error ("Bad animating texture %s", tx->name);
for (j = i + 1; j < m->nummiptex; j++) {
tx2 = loadmodel->textures[j];
@ -258,7 +260,7 @@ Mod_LoadTextures (lump_t *l)
if (num + 1 > altmax)
altmax = num + 1;
} else
SV_Error ("Bad animating texture %s", tx->name);
Sys_Error ("Bad animating texture %s", tx->name);
}
#define ANIM_CYCLE 2
@ -266,7 +268,7 @@ Mod_LoadTextures (lump_t *l)
for (j = 0; j < max; j++) {
tx2 = anims[j];
if (!tx2)
SV_Error ("Missing frame %i of %s", j, tx->name);
Sys_Error ("Missing frame %i of %s", j, tx->name);
tx2->anim_total = max * ANIM_CYCLE;
tx2->anim_min = j * ANIM_CYCLE;
tx2->anim_max = (j + 1) * ANIM_CYCLE;
@ -277,7 +279,7 @@ Mod_LoadTextures (lump_t *l)
for (j = 0; j < altmax; j++) {
tx2 = altanims[j];
if (!tx2)
SV_Error ("Missing frame %i of %s", j, tx->name);
Sys_Error ("Missing frame %i of %s", j, tx->name);
tx2->anim_total = altmax * ANIM_CYCLE;
tx2->anim_min = j * ANIM_CYCLE;
tx2->anim_max = (j + 1) * ANIM_CYCLE;
@ -330,7 +332,7 @@ Mod_LoadVertexes (lump_t *l)
in = (void *) (mod_base + l->fileofs);
if (l->filelen % sizeof (*in))
SV_Error ("MOD_LoadBmodel: funny lump size in %s", loadmodel->name);
Sys_Error ("MOD_LoadBmodel: funny lump size in %s", loadmodel->name);
count = l->filelen / sizeof (*in);
out = Hunk_AllocName (count * sizeof (*out), loadname);
@ -356,7 +358,7 @@ Mod_LoadSubmodels (lump_t *l)
in = (void *) (mod_base + l->fileofs);
if (l->filelen % sizeof (*in))
SV_Error ("MOD_LoadBmodel: funny lump size in %s", loadmodel->name);
Sys_Error ("MOD_LoadBmodel: funny lump size in %s", loadmodel->name);
count = l->filelen / sizeof (*in);
out = Hunk_AllocName (count * sizeof (*out), loadname);
@ -389,7 +391,7 @@ Mod_LoadEdges (lump_t *l)
in = (void *) (mod_base + l->fileofs);
if (l->filelen % sizeof (*in))
SV_Error ("MOD_LoadBmodel: funny lump size in %s", loadmodel->name);
Sys_Error ("MOD_LoadBmodel: funny lump size in %s", loadmodel->name);
count = l->filelen / sizeof (*in);
out = Hunk_AllocName ((count + 1) * sizeof (*out), loadname);
@ -416,7 +418,7 @@ Mod_LoadTexinfo (lump_t *l)
in = (void *) (mod_base + l->fileofs);
if (l->filelen % sizeof (*in))
SV_Error ("MOD_LoadBmodel: funny lump size in %s", loadmodel->name);
Sys_Error ("MOD_LoadBmodel: funny lump size in %s", loadmodel->name);
count = l->filelen / sizeof (*in);
out = Hunk_AllocName (count * sizeof (*out), loadname);
@ -449,7 +451,7 @@ Mod_LoadTexinfo (lump_t *l)
out->flags = 0;
} else {
if (miptex >= loadmodel->numtextures)
SV_Error ("miptex >= loadmodel->numtextures");
Sys_Error ("miptex >= loadmodel->numtextures");
out->texture = loadmodel->textures[miptex];
if (!out->texture) {
out->texture = r_notexture_mip; // texture not found
@ -503,7 +505,7 @@ CalcSurfaceExtents (msurface_t *s)
s->texturemins[i] = bmins[i] * 16;
s->extents[i] = (bmaxs[i] - bmins[i]) * 16;
if (!(tex->flags & TEX_SPECIAL) && s->extents[i] > 512 /* 256 */ )
SV_Error ("Bad surface extents");
Sys_Error ("Bad surface extents");
}
}
@ -521,7 +523,7 @@ Mod_LoadFaces (lump_t *l)
in = (void *) (mod_base + l->fileofs);
if (l->filelen % sizeof (*in))
SV_Error ("MOD_LoadBmodel: funny lump size in %s", loadmodel->name);
Sys_Error ("MOD_LoadBmodel: funny lump size in %s", loadmodel->name);
count = l->filelen / sizeof (*in);
out = Hunk_AllocName (count * sizeof (*out), loadname);
@ -608,7 +610,7 @@ Mod_LoadNodes (lump_t *l)
in = (void *) (mod_base + l->fileofs);
if (l->filelen % sizeof (*in))
SV_Error ("MOD_LoadBmodel: funny lump size in %s", loadmodel->name);
Sys_Error ("MOD_LoadBmodel: funny lump size in %s", loadmodel->name);
count = l->filelen / sizeof (*in);
out = Hunk_AllocName (count * sizeof (*out), loadname);
@ -654,7 +656,7 @@ Mod_LoadLeafs (lump_t *l)
in = (void *) (mod_base + l->fileofs);
if (l->filelen % sizeof (*in))
SV_Error ("MOD_LoadBmodel: funny lump size in %s", loadmodel->name);
Sys_Error ("MOD_LoadBmodel: funny lump size in %s", loadmodel->name);
count = l->filelen / sizeof (*in);
out = Hunk_AllocName (count * sizeof (*out), loadname);
@ -711,7 +713,7 @@ Mod_LoadClipnodes (lump_t *l)
in = (void *) (mod_base + l->fileofs);
if (l->filelen % sizeof (*in))
SV_Error ("MOD_LoadBmodel: funny lump size in %s", loadmodel->name);
Sys_Error ("MOD_LoadBmodel: funny lump size in %s", loadmodel->name);
count = l->filelen / sizeof (*in);
out = Hunk_AllocName (count * sizeof (*out), loadname);
@ -797,7 +799,7 @@ Mod_LoadMarksurfaces (lump_t *l)
in = (void *) (mod_base + l->fileofs);
if (l->filelen % sizeof (*in))
SV_Error ("MOD_LoadBmodel: funny lump size in %s", loadmodel->name);
Sys_Error ("MOD_LoadBmodel: funny lump size in %s", loadmodel->name);
count = l->filelen / sizeof (*in);
out = Hunk_AllocName (count * sizeof (*out), loadname);
@ -807,7 +809,7 @@ Mod_LoadMarksurfaces (lump_t *l)
for (i = 0; i < count; i++) {
j = LittleShort (in[i]);
if (j >= loadmodel->numsurfaces)
SV_Error ("Mod_ParseMarksurfaces: bad surface number");
Sys_Error ("Mod_ParseMarksurfaces: bad surface number");
out[i] = loadmodel->surfaces + j;
}
}
@ -823,7 +825,7 @@ Mod_LoadSurfedges (lump_t *l)
in = (void *) (mod_base + l->fileofs);
if (l->filelen % sizeof (*in))
SV_Error ("MOD_LoadBmodel: funny lump size in %s", loadmodel->name);
Sys_Error ("MOD_LoadBmodel: funny lump size in %s", loadmodel->name);
count = l->filelen / sizeof (*in);
out = Hunk_AllocName (count * sizeof (*out), loadname);
@ -848,7 +850,7 @@ Mod_LoadPlanes (lump_t *l)
in = (void *) (mod_base + l->fileofs);
if (l->filelen % sizeof (*in))
SV_Error ("MOD_LoadBmodel: funny lump size in %s", loadmodel->name);
Sys_Error ("MOD_LoadBmodel: funny lump size in %s", loadmodel->name);
count = l->filelen / sizeof (*in);
out = Hunk_AllocName (count * 2 * sizeof (*out), loadname);
@ -902,7 +904,7 @@ Mod_LoadBrushModel (model_t *mod, void *buffer)
i = LittleLong (header->version);
if (i != BSPVERSION)
SV_Error
Sys_Error
("Mod_LoadBrushModel: %s has wrong version number (%i should be %i)",
mod->name, i, BSPVERSION);

View file

@ -33,13 +33,16 @@
# include "config.h"
#endif
#include <stdlib.h>
#include "QF/checksum.h"
#include "QF/console.h"
#include "glquake.h"
#include "QF/qendian.h"
#include "r_local.h"
#include "QF/sys.h"
#include "glquake.h"
#include "r_local.h"
int
Mod_CalcFullbright (byte *in, byte *out, int pixels)
{

View file

@ -39,11 +39,12 @@
# include <strings.h>
#endif
#include "QF/console.h"
#include "QF/cvar.h"
#include "QF/model.h"
#include "QF/qendian.h"
#include "QF/quakefs.h"
#include "server.h"
#include "QF/sys.h"
void Mod_LoadAliasModel (model_t *mod, void *buf);
void Mod_LoadSpriteModel (model_t *mod, void *buf);
@ -103,7 +104,7 @@ Mod_FindName (char *name)
model_t *mod;
if (!name[0])
SV_Error ("Mod_ForName: NULL name");
Sys_Error ("Mod_ForName: NULL name");
//
// search the currently loaded models
@ -114,7 +115,7 @@ Mod_FindName (char *name)
if (i == mod_numknown) {
if (mod_numknown == MAX_MOD_KNOWN)
SV_Error ("mod_numknown == MAX_MOD_KNOWN");
Sys_Error ("mod_numknown == MAX_MOD_KNOWN");
strcpy (mod->name, name);
mod->needload = true;
mod_numknown++;
@ -151,7 +152,7 @@ Mod_LoadModel (model_t *mod, qboolean crash)
sizeof (stackbuf));
if (!buf) {
if (crash)
SV_Error ("Mod_NumForName: %s not found", mod->name);
Sys_Error ("Mod_NumForName: %s not found", mod->name);
return NULL;
}
//
@ -219,7 +220,7 @@ Mod_Extradata (model_t *mod)
Mod_LoadModel (mod, true);
if (!mod->cache.data)
SV_Error ("Mod_Extradata: caching failed");
Sys_Error ("Mod_Extradata: caching failed");
return mod->cache.data;
}

7
libs/models/sprite/.gitignore vendored Normal file
View file

@ -0,0 +1,7 @@
*.la
*.lo
.deps
.libs
.vimrc
Makefile
Makefile.in

View file

@ -0,0 +1,9 @@
INCLUDES= -I$(top_srcdir)/include
noinst_LTLIBRARIES = libsprite_gl.la libsprite_sw.la
libsprite_gl_la_LDFLAGS = -version-info 1:0:0
libsprite_gl_la_SOURCES = gl_model_sprite.c model_sprite.c
libsprite_sw_la_LDFLAGS = -version-info 1:0:0
libsprite_sw_la_SOURCES = sw_model_sprite.c model_sprite.c

View file

@ -34,8 +34,8 @@
#endif
#include "QF/model.h"
#include "server.h"
#include "QF/qendian.h"
#include "QF/sys.h"
extern model_t *loadmodel;
extern char loadname[];
@ -80,7 +80,7 @@ Mod_LoadSpriteGroup (void *pin, mspriteframe_t **ppframe, int framenum)
for (i = 0; i < numframes; i++) {
*poutintervals = LittleFloat (pin_intervals->interval);
if (*poutintervals <= 0.0)
SV_Error ("Mod_LoadSpriteGroup: interval<=0");
Sys_Error ("Mod_LoadSpriteGroup: interval<=0");
poutintervals++;
pin_intervals++;
@ -115,7 +115,7 @@ Mod_LoadSpriteModel (model_t *mod, void *buffer)
version = LittleLong (pin->version);
if (version != SPRITE_VERSION)
SV_Error ("%s has wrong version number "
Sys_Error ("%s has wrong version number "
"(%i should be %i)", mod->name, version, SPRITE_VERSION);
numframes = LittleLong (pin->numframes);
@ -142,7 +142,7 @@ Mod_LoadSpriteModel (model_t *mod, void *buffer)
// load the frames
//
if (numframes < 1)
SV_Error ("Mod_LoadSpriteModel: Invalid # of frames: %d\n", numframes);
Sys_Error ("Mod_LoadSpriteModel: Invalid # of frames: %d\n", numframes);
mod->numframes = numframes;

View file

@ -39,10 +39,11 @@
# include <strings.h>
#endif
#include "d_iface.h"
#include "QF/model.h"
#include "QF/qendian.h"
#include "server.h"
#include "QF/sys.h"
#include "d_iface.h"
extern model_t *loadmodel;
extern char loadname[];
@ -92,7 +93,7 @@ Mod_LoadSpriteFrame (void *pin, mspriteframe_t **ppframe, int framenum)
for (i = 0; i < size; i++)
ppixout[i] = d_8to16table[ppixin[i]];
} else {
SV_Error ("Mod_LoadSpriteFrame: driver set invalid r_pixbytes: %d\n",
Sys_Error ("Mod_LoadSpriteFrame: driver set invalid r_pixbytes: %d\n",
r_pixbytes);
}

View file

@ -40,6 +40,7 @@
#include "protocol.h"
#include "net.h"
#include "r_local.h"
#include "render.h"
#include "game.h"
@ -71,18 +72,6 @@ typedef struct
byte translations[VID_GRADES*256];
} scoreboard_t;
typedef struct
{
int destcolor[3];
int percent; // 0-256
} cshift_t;
#define CSHIFT_CONTENTS 0
#define CSHIFT_DAMAGE 1
#define CSHIFT_BONUS 2
#define CSHIFT_POWERUP 3
#define NUM_CSHIFTS 4
#define NAME_LENGTH 64
@ -92,22 +81,6 @@ typedef struct
#define SIGNONS 4 // signon messages to receive before connected
#define MAX_DLIGHTS 32
typedef struct
{
vec3_t origin;
float radius;
float die; // stop lighting after this time
float decay; // drop this each second
float minlight; // don't add when contributing less
int key;
float _color[3];
float *color;
#ifdef QUAKE2
qboolean dark; // subtracts light instead of adding
#endif
} dlight_t;
#define MAX_BEAMS 24
typedef struct

View file

@ -62,7 +62,7 @@ typedef struct sspan_s
int u, v, count;
} sspan_t;
extern cvar_t *d_subdiv16;
extern struct cvar_s *d_subdiv16;
extern float scale_for_mip;

View file

@ -1,332 +0,0 @@
/*
r_local.h
@description@
Copyright (C) 1996-1997 Id Software, Inc.
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.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifndef __r_local_h
#define __r_local_h
#include "client.h"
#ifndef GLQUAKE
#include "r_shared.h"
#define ALIAS_BASE_SIZE_RATIO (1.0 / 11.0)
// normalizing factor so player model works out to about
// 1 pixel per triangle
#define BMODEL_FULLY_CLIPPED 0x10 // value returned by R_BmodelCheckBBox ()
// if bbox is trivially rejected
//===========================================================================
// viewmodel lighting
typedef struct {
int ambientlight;
int shadelight;
float *plightvec;
} alight_t;
//===========================================================================
// clipped bmodel edges
typedef struct bedge_s
{
mvertex_t *v[2];
struct bedge_s *pnext;
} bedge_t;
typedef struct {
float fv[3]; // viewspace x, y
} auxvert_t;
//===========================================================================
extern cvar_t *r_draworder;
extern cvar_t *r_speeds;
extern cvar_t *r_timegraph;
extern cvar_t *r_graphheight;
extern cvar_t *r_clearcolor;
extern cvar_t *r_waterwarp;
extern cvar_t *r_fullbright;
extern cvar_t *r_drawentities;
extern cvar_t *r_aliasstats;
extern cvar_t *r_dspeeds;
extern cvar_t *r_drawflat;
extern cvar_t *r_ambient;
extern cvar_t *r_reportsurfout;
extern cvar_t *r_maxsurfs;
extern cvar_t *r_numsurfs;
extern cvar_t *r_reportedgeout;
extern cvar_t *r_maxedges;
extern cvar_t *r_numedges;
#define XCENTERING (1.0 / 2.0)
#define YCENTERING (1.0 / 2.0)
#define CLIP_EPSILON 0.001
#define BACKFACE_EPSILON 0.01
//===========================================================================
#define DIST_NOT_SET 98765
// !!! if this is changed, it must be changed in asm_draw.h too !!!
typedef struct clipplane_s
{
vec3_t normal;
float dist;
struct clipplane_s *next;
byte leftedge;
byte rightedge;
byte reserved[2];
} clipplane_t;
extern clipplane_t view_clipplanes[4];
//=============================================================================
void R_RenderWorld (void);
//=============================================================================
extern mplane_t screenedge[4];
extern vec3_t r_origin;
extern vec3_t r_entorigin;
extern float screenAspect;
extern float verticalFieldOfView;
extern float xOrigin, yOrigin;
extern int r_visframecount;
//=============================================================================
extern int vstartscan;
void R_ClearPolyList (void);
void R_DrawPolyList (void);
//
// current entity info
//
extern qboolean insubmodel;
extern vec3_t r_worldmodelorg;
void R_DrawSprite (void);
void R_RenderFace (msurface_t *fa, int clipflags);
void R_RenderPoly (msurface_t *fa, int clipflags);
void R_RenderBmodelFace (bedge_t *pedges, msurface_t *psurf);
void R_TransformPlane (mplane_t *p, float *normal, float *dist);
void R_TransformFrustum (void);
void R_SetSkyFrame (void);
void R_DrawSurfaceBlock16 (void);
void R_DrawSurfaceBlock8 (void);
texture_t *R_TextureAnimation (texture_t *base);
#ifdef USE_INTEL_ASM
void R_DrawSurfaceBlock8_mip0 (void);
void R_DrawSurfaceBlock8_mip1 (void);
void R_DrawSurfaceBlock8_mip2 (void);
void R_DrawSurfaceBlock8_mip3 (void);
#endif
void R_GenSkyTile (void *pdest);
void R_GenSkyTile16 (void *pdest);
void R_Surf8Patch (void);
void R_Surf16Patch (void);
void R_DrawSubmodelPolygons (model_t *pmodel, int clipflags);
void R_DrawSolidClippedSubmodelPolygons (model_t *pmodel);
void R_AddPolygonEdges (emitpoint_t *pverts, int numverts, int miplevel);
surf_t *R_GetSurf (void);
void R_AliasDrawModel (alight_t *plighting);
void R_BeginEdgeFrame (void);
void R_ScanEdges (void);
void D_DrawSurfaces (void);
void R_InsertNewEdges (edge_t *edgestoadd, edge_t *edgelist);
void R_StepActiveU (edge_t *pedge);
void R_RemoveEdges (edge_t *pedge);
extern void R_Surf8Start (void);
extern void R_Surf8End (void);
extern void R_Surf16Start (void);
extern void R_Surf16End (void);
extern void R_EdgeCodeStart (void);
extern void R_EdgeCodeEnd (void);
extern void R_RotateBmodel (void);
extern int c_faceclip;
extern int r_polycount;
extern int r_wholepolycount;
extern model_t *cl_worldmodel;
extern int *pfrustum_indexes[4];
// !!! if this is changed, it must be changed in asm_draw.h too !!!
#define NEAR_CLIP 0.01
extern int ubasestep, errorterm, erroradjustup, erroradjustdown;
extern int vstartscan;
extern fixed16_t sadjust, tadjust;
extern fixed16_t bbextents, bbextentt;
#define MAXBVERTINDEXES 1000 // new clipped vertices when clipping bmodels
// to the world BSP
extern mvertex_t *r_ptverts, *r_ptvertsmax;
extern vec3_t sbaseaxis[3], tbaseaxis[3];
extern float entity_rotation[3][3];
extern int reinit_surfcache;
extern int r_currentkey;
extern int r_currentbkey;
typedef struct btofpoly_s {
int clipflags;
msurface_t *psurf;
} btofpoly_t;
#define MAX_BTOFPOLYS 5000 // FIXME: tune this
extern int numbtofpolys;
extern btofpoly_t *pbtofpolys;
void R_InitTurb (void);
void R_ZDrawSubmodelPolys (model_t *clmodel);
//=========================================================
// Alias models
//=========================================================
#define MAXALIASVERTS 1024 // was 2000, but gl has 1024
#define ALIAS_Z_CLIP_PLANE 5
extern int numverts;
extern int a_skinwidth;
extern mtriangle_t *ptriangles;
extern int numtriangles;
extern aliashdr_t *paliashdr;
extern mdl_t *pmdl;
extern float leftclip, topclip, rightclip, bottomclip;
extern int r_acliptype;
extern finalvert_t *pfinalverts;
extern auxvert_t *pauxverts;
qboolean R_AliasCheckBBox (void);
//=========================================================
// turbulence stuff
#define AMP 8*0x10000
#define AMP2 3
#define SPEED 20
//=========================================================
// particle stuff
void R_DrawParticles (void);
void R_InitParticles (void);
void R_ClearParticles (void);
void R_ReadPointFile_f (void);
void R_SurfacePatch (void);
extern int r_amodels_drawn;
extern edge_t *auxedges;
extern int r_numallocatededges;
extern edge_t *r_edges, *edge_p, *edge_max;
extern edge_t *newedges[MAXHEIGHT];
extern edge_t *removeedges[MAXHEIGHT];
extern int screenwidth;
// FIXME: make stack vars when debugging done
extern edge_t edge_head;
extern edge_t edge_tail;
extern edge_t edge_aftertail;
extern int r_bmodelactive;
extern vrect_t *pconupdate;
extern float aliasxscale, aliasyscale, aliasxcenter, aliasycenter;
extern float r_aliastransition, r_resfudge;
extern int r_outofsurfaces;
extern int r_outofedges;
extern mvertex_t *r_pcurrentvertbase;
extern int r_maxvalidedgeoffset;
void R_AliasClipTriangle (mtriangle_t *ptri);
extern float r_time1;
extern float dp_time1, dp_time2, db_time1, db_time2, rw_time1, rw_time2;
extern float se_time1, se_time2, de_time1, de_time2, dv_time1, dv_time2;
extern int r_frustum_indexes[4*6];
extern int r_maxsurfsseen, r_maxedgesseen, r_cnumsurfs;
extern qboolean r_surfsonstack;
extern cshift_t cshift_water;
extern qboolean r_dowarpold, r_viewchanged;
extern mleaf_t *r_viewleaf, *r_oldviewleaf;
extern vec3_t r_emins, r_emaxs;
extern mnode_t *r_pefragtopnode;
extern int r_clipflags;
extern int r_dlightframecount;
extern qboolean r_fov_greater_than_90;
extern particle_t *active_particles, *free_particles;
extern int ramp1[],ramp2[],ramp3[];
void R_StoreEfrags (efrag_t **ppefrag);
void R_TimeRefresh_f (void);
void R_TimeGraph (void);
void R_PrintAliasStats (void);
void R_PrintTimes (void);
void R_PrintDSpeeds (void);
void R_AnimateLight (void);
int R_LightPoint (vec3_t p);
void R_cshift_f (void);
void R_EmitEdge (mvertex_t *pv0, mvertex_t *pv1);
void R_ClipEdge (mvertex_t *pv0, mvertex_t *pv1, clipplane_t *clip);
void R_SplitEntityOnNode2 (mnode_t *node);
void R_MarkLights (vec3_t lightorigin, dlight_t *light, int bit, mnode_t *node);
#endif
#endif // __r_local_h

View file

@ -1,170 +0,0 @@
/*
r_shared.h
@description@
Copyright (C) 1996-1997 Id Software, Inc.
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.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifndef __r_shared_h
#define __r_shared_h
#include "d_iface.h"
#include "render.h"
#ifndef GLQUAKE
// r_shared.h: general refresh-related stuff shared between the refresh and the
// driver
// FIXME: clean up and move into d_iface.h
#define MAXVERTS 16 // max points in a surface polygon
#define MAXWORKINGVERTS (MAXVERTS+4) // max points in an intermediate
// polygon (while processing)
// !!! if this is changed, it must be changed in d_ifacea.h too !!!
#define MAXHEIGHT 1024
#define MAXWIDTH 1280
#define MAXDIMENSION ((MAXHEIGHT > MAXWIDTH) ? MAXHEIGHT : MAXWIDTH)
#define SIN_BUFFER_SIZE (MAXDIMENSION+CYCLE)
#define INFINITE_DISTANCE 0x10000 // distance that's always guaranteed to
// be farther away than anything in
// the scene
//===================================================================
extern void R_DrawLine (polyvert_t *polyvert0, polyvert_t *polyvert1);
extern int cachewidth;
extern pixel_t *cacheblock;
extern int screenwidth;
extern float pixelAspect;
extern int r_drawnpolycount;
extern cvar_t *r_clearcolor;
extern int sintable[SIN_BUFFER_SIZE];
extern int intsintable[SIN_BUFFER_SIZE];
extern vec3_t vup, base_vup;
extern vec3_t vpn, base_vpn;
extern vec3_t vright, base_vright;
extern entity_t *currententity;
#define NUMSTACKEDGES 2400
#define MINEDGES NUMSTACKEDGES
#define NUMSTACKSURFACES 800
#define MINSURFACES NUMSTACKSURFACES
#define MAXSPANS 3000
// !!! if this is changed, it must be changed in asm_draw.h too !!!
typedef struct espan_s
{
int u, v, count;
struct espan_s *pnext;
} espan_t;
// FIXME: compress, make a union if that will help
// insubmodel is only 1, flags is fewer than 32, spanstate could be a byte
typedef struct surf_s
{
struct surf_s *next; // active surface stack in r_edge.c
struct surf_s *prev; // used in r_edge.c for active surf stack
struct espan_s *spans; // pointer to linked list of spans to draw
int key; // sorting key (BSP order)
int last_u; // set during tracing
int spanstate; // 0 = not in span
// 1 = in span
// -1 = in inverted span (end before
// start)
int flags; // currentface flags
void *data; // associated data like msurface_t
entity_t *entity;
float nearzi; // nearest 1/z on surface, for mipmapping
qboolean insubmodel;
float d_ziorigin, d_zistepu, d_zistepv;
int pad[2]; // to 64 bytes
} surf_t;
extern surf_t *surfaces, *surface_p, *surf_max;
// surfaces are generated in back to front order by the bsp, so if a surf
// pointer is greater than another one, it should be drawn in front
// surfaces[1] is the background, and is used as the active surface stack.
// surfaces[0] is a dummy, because index 0 is used to indicate no surface
// attached to an edge_t
//===================================================================
extern vec3_t sxformaxis[4]; // s axis transformed into viewspace
extern vec3_t txformaxis[4]; // t axis transformed into viewspac
extern vec3_t modelorg, base_modelorg;
extern float xcenter, ycenter;
extern float xscale, yscale;
extern float xscaleinv, yscaleinv;
extern float xscaleshrink, yscaleshrink;
extern int d_lightstylevalue[256]; // 8.8 frac of base light value
extern void TransformVector (vec3_t in, vec3_t out);
extern void SetUpForLineScan(fixed8_t startvertu, fixed8_t startvertv,
fixed8_t endvertu, fixed8_t endvertv);
extern int r_skymade;
extern void R_MakeSky (void);
extern int ubasestep, errorterm, erroradjustup, erroradjustdown;
// flags in finalvert_t.flags
#define ALIAS_LEFT_CLIP 0x0001
#define ALIAS_TOP_CLIP 0x0002
#define ALIAS_RIGHT_CLIP 0x0004
#define ALIAS_BOTTOM_CLIP 0x0008
#define ALIAS_Z_CLIP 0x0010
// !!! if this is changed, it must be changed in d_ifacea.h too !!!
#define ALIAS_ONSEAM 0x0020 // also defined in modelgen.h;
// must be kept in sync
#define ALIAS_XY_CLIP_MASK 0x000F
// !!! if this is changed, it must be changed in asm_draw.h too !!!
typedef struct edge_s
{
fixed16_t u;
fixed16_t u_step;
struct edge_s *prev, *next;
unsigned short surfs[2];
struct edge_s *nextremove;
float nearzi;
medge_t *owner;
} edge_t;
#endif // GLQUAKE
#endif // __r_shared_h

View file

@ -46,8 +46,7 @@ soft_ASM= d_draw.S d_draw16.S d_parta.S d_polysa.S d_scana.S d_spr8.S \
surf16.S surf8.S
common_ASM= sys_ia32.S worlda.S $(math_ASM)
common_SOURCES= game.c wad.c world.c model.c model_alias.c model_brush.c \
model_sprite.c com.c $(common_ASM)
common_SOURCES= game.c wad.c world.c com.c $(common_ASM)
# ... System type
if SYSTYPE_WIN32
@ -89,32 +88,32 @@ soft_SOURCES= d_edge.c d_fill.c d_init.c d_modech.c d_part.c d_polyse.c \
d_scan.c d_sky.c d_sprite.c d_surf.c d_vars.c d_zpoint.c \
draw.c sw_raclip.c sw_ralias.c sw_rbsp.c sw_rdraw.c sw_redge.c sw_refrag.c \
sw_rlight.c sw_rmain.c sw_rmisc.c sw_rpart.c sw_rsky.c sw_rsprite.c \
sw_rsurf.c sw_rvars.c screen.c sw_model_alias.c sw_model_brush.c \
sw_model_sprite.c sw_view.c $(soft_ASM)
sw_rsurf.c sw_rvars.c screen.c \
sw_view.c $(soft_ASM)
# ... Linux FBDev
nq_fbdev_SOURCES= $(combined_SOURCES) $(soft_SOURCES)
nq_fbdev_LDADD= $(client_LIBS) ../../libs/video/targets/libQFfbdev.la $(client_POST_LIBS)
nq_fbdev_LDADD= $(client_LIBS) ../../libs/models/libQFmodels_sw.la ../../libs/video/targets/libQFfbdev.la $(client_POST_LIBS)
nq_fbdev_DEPENDENCIES= $(client_LIB_DEPS)
# ... SciTech MGL
nq_mgl_SOURCES= $(combined_SOURCES) $(soft_SOURCES)
nq_mgl_LDADD= $(client_LIBS) $(MGL_LIBS) ../../libs/video/targets/libQFmgl.la $(client_POST_LIBS)
nq_mgl_LDADD= $(client_LIBS) $(MGL_LIBS) ../../libs/models/libQFmodels_sw.la ../../libs/video/targets/libQFmgl.la $(client_POST_LIBS)
nq_mgl_DEPENDENCIES=$(client_LIB_DEPS)
# ... Sam Lantinga's Simple DirectMedia Layer, version 1.0 and higher
nq_sdl_SOURCES= $(combined_SOURCES) $(soft_SOURCES)
nq_sdl_LDADD= $(client_LIBS) $(SDL_LIBS) ../../libs/video/targets/libQFsdl.la $(client_POST_LIBS)
nq_sdl_LDADD= $(client_LIBS) $(SDL_LIBS) ../../libs/models/libQFmodels_sw.la ../../libs/video/targets/libQFsdl.la $(client_POST_LIBS)
nq_sdl_DEPENDENCIES=$(client_LIB_DEPS)
# ... Linux SVGAlib
nq_svga_SOURCES= $(combined_SOURCES) $(soft_SOURCES)
nq_svga_LDADD= $(client_LIBS) $(SVGA_LIBS) ../../libs/video/targets/libQFsvga.la $(client_POST_LIBS)
nq_svga_LDADD= $(client_LIBS) $(SVGA_LIBS) ../../libs/models/libQFmodels_sw.la ../../libs/video/targets/libQFsvga.la $(client_POST_LIBS)
nq_svga_DEPENDENCIES=$(client_LIB_DEPS)
# ... X11
nq_x11_SOURCES= $(combined_SOURCES) $(soft_SOURCES)
nq_x11_LDADD= $(client_LIBS) $(X_PRE_LIBS) $(VIDMODE_LIBS) $(DGA_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS) $(X_SHM_LIB) ../../libs/video/targets/libQFx11.la $(client_POST_LIBS)
nq_x11_LDADD= $(client_LIBS) $(X_PRE_LIBS) $(VIDMODE_LIBS) $(DGA_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS) $(X_SHM_LIB) ../../libs/models/libQFmodels_sw.la ../../libs/video/targets/libQFx11.la $(client_POST_LIBS)
nq_x11_DEPENDENCIES=$(client_LIB_DEPS)
@ -123,28 +122,27 @@ nq_x11_DEPENDENCIES=$(client_LIB_DEPS)
ogl_SOURCES= noisetextures.c gl_textures.c gl_draw.c gl_dyn_fires.c \
gl_dyn_part.c gl_dyn_textures.c gl_mesh.c \
gl_refrag.c gl_rlight.c gl_rmain.c gl_rmisc.c gl_rsurf.c \
gl_screen.c gl_view.c gl_warp.c gl_model_alias.c \
gl_model_brush.c gl_model_fullbright.c gl_model_sprite.c
gl_screen.c gl_view.c gl_warp.c
# ... 3Dfx Voodoo 1 and 2 SVGAlib-based console GL
nq_3dfx_SOURCES= $(combined_SOURCES) $(ogl_SOURCES)
nq_3dfx_LDADD= $(client_LIBS) $(TDFXGL_LIBS) $(SVGA_LIBS) $(DL_LIBS) ../../libs/video/targets/libQFtdfx.la $(client_POST_LIBS)
nq_3dfx_LDADD= $(client_LIBS) $(TDFXGL_LIBS) $(SVGA_LIBS) $(DL_LIBS) ../../libs/models/libQFmodels_gl.la ../../libs/video/targets/libQFtdfx.la $(client_POST_LIBS)
nq_3dfx_DEPENDENCIES=$(client_LIB_DEPS)
# ... OpenGL in X Window
nq_glx_SOURCES= $(combined_SOURCES) $(ogl_SOURCES)
nq_glx_LDADD= $(client_LIBS) $(GLX_LIBS) $(X_PRE_LIBS) $(VIDMODE_LIBS) $(DGA_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS) $(DL_LIBS) ../../libs/video/targets/libQFglx.la $(client_POST_LIBS)
nq_glx_LDADD= $(client_LIBS) $(GLX_LIBS) $(X_PRE_LIBS) $(VIDMODE_LIBS) $(DGA_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS) $(DL_LIBS) ../../libs/models/libQFmodels_gl.la ../../libs/video/targets/libQFglx.la $(client_POST_LIBS)
nq_glx_DEPENDENCIES= $(client_LIB_DEPS)
# ... Simple Directmedia Layer, version 1.1 and higher, in GL mode
nq_sgl_SOURCES= $(combined_SOURCES) $(ogl_SOURCES)
nq_sgl_LDADD= $(client_LIBS) $(X_LIBS) $(SDL_LIBS) $(GLX_LIBS) $(DL_LIBS) ../../libs/video/targets/libQFsgl.la $(client_POST_LIBS)
nq_sgl_LDADD= $(client_LIBS) $(X_LIBS) $(SDL_LIBS) $(GLX_LIBS) $(DL_LIBS) ../../libs/models/libQFmodels_gl.la ../../libs/video/targets/libQFsgl.la $(client_POST_LIBS)
nq_sgl_DEPENDENCIES= $(client_LIB_DEPS)
# ... SGI/Microsoft WGL (Windows OpenGL)
nq_wgl_SOURCES= $(combined_SOURCES) $(ogl_SOURCES) conproc.c
nq_wgl_LDADD= $(client_LIBS) ../../libs/video/targets/libQFwgl.la $(client_POST_LIBS) $(GLX_LIBS) -lgdi32 -lcomctl32 -lwinmm
nq_wgl_LDADD= $(client_LIBS) ../../libs/models/libQFmodels_gl.la ../../libs/video/targets/libQFwgl.la $(client_POST_LIBS) $(GLX_LIBS) -lgdi32 -lcomctl32 -lwinmm
nq_wgl_DEPENDENCIES= $(client_LIB_DEPS)
# Dedicated Server

View file

@ -406,7 +406,6 @@ CL_AllocDlight (int key)
if (dl->key == key) {
memset (dl, 0, sizeof (*dl));
dl->key = key;
dl->color = dl->_color;
return dl;
}
}
@ -417,7 +416,6 @@ CL_AllocDlight (int key)
if (dl->die < cl.time) {
memset (dl, 0, sizeof (*dl));
dl->key = key;
dl->color = dl->_color;
return dl;
}
}
@ -425,7 +423,6 @@ CL_AllocDlight (int key)
dl = &cl_dlights[0];
memset (dl, 0, sizeof (*dl));
dl->key = key;
dl->color = dl->_color;
return dl;
}

View file

@ -30,7 +30,10 @@
# include "config.h"
#endif
#include "QF/cvar.h"
#include "d_local.h"
#include "render.h"
#define NUM_MIPS 4

View file

@ -31,9 +31,11 @@
# include "config.h"
#endif
#include "d_local.h"
#include "QF/sys.h"
#include "d_local.h"
#include "render.h"
int d_vrectx, d_vrecty, d_vrectright_particle, d_vrectbottom_particle;
int d_y_aspect_shift, d_pix_min, d_pix_max, d_pix_shift;

View file

@ -30,8 +30,10 @@
# include "config.h"
#endif
#include "r_local.h"
#include "client.h"
#include "d_local.h"
#include "r_local.h"
#include "render.h"
unsigned char *r_turb_pbase, *r_turb_pdest;
fixed16_t r_turb_s, r_turb_t, r_turb_sstep, r_turb_tstep;

View file

@ -30,8 +30,9 @@
# include "config.h"
#endif
#include "r_local.h"
#include "d_local.h"
#include "r_local.h"
#include "render.h"
#define SKY_SPAN_SHIFT 5
#define SKY_SPAN_MAX (1 << SKY_SPAN_SHIFT)

View file

@ -31,6 +31,7 @@
#endif
#include "d_local.h"
#include "render.h"
static int sprite_height;
static int minindex, maxindex;

View file

@ -51,26 +51,6 @@
#include "render.h"
#include "r_dynamic.h"
typedef enum {
pt_static, pt_grav, pt_blob, pt_blob2,
pt_smoke, pt_smokering, pt_smokecloud, pt_bloodcloud,
pt_fadespark, pt_fadespark2, pt_fallfadespark
} ptype_t;
typedef struct particle_s {
vec3_t org;
vec3_t up;
vec3_t right;
int tex;
float color;
float alpha;
float scale;
vec3_t vel;
float ramp;
float die;
ptype_t type;
} particle_t;
static particle_t *particles, **freeparticles;
static short r_numparticles, numparticles;
@ -743,6 +723,9 @@ R_DrawParticles (void)
part->die = -1;
part->vel[2] -= fast_grav;
break;
default:
Con_DPrintf ("unhandled particle type %d\n", part->type);
break;
}
// LordHavoc: immediate removal of unnecessary particles (must
// be done to ensure compactor below operates properly in all

View file

@ -749,7 +749,7 @@ R_SetFrustum (void)
}
static void
void
R_SetupFrame (void)
{
// don't allow cheats in multiplayer

View file

@ -37,6 +37,7 @@
#include "QF/screen.h"
#include "chase.h"
#include "client.h"
#include "host.h"
#include "r_local.h"
#include "view.h"

View file

@ -42,6 +42,7 @@
#include "QF/sys.h"
#include "QF/qendian.h"
#include "client.h"
#include "host.h"
#include "r_local.h"
#include "sbar.h"

View file

@ -30,8 +30,9 @@
# include "config.h"
#endif
#include "r_local.h"
#include "d_local.h"
#include "r_local.h"
#include "render.h"
static finalvert_t fv[2][8];
static auxvert_t av[8];

View file

@ -32,10 +32,9 @@
#include "QF/console.h"
#include "QF/sys.h"
#include "client.h"
#include "r_local.h"
#include "d_local.h" // FIXME: shouldn't be needed (is
// needed for patch
// right now, but that should move)
#define LIGHT_MIN 5 // lowest light value we'll allow, to
// avoid the

View file

@ -30,10 +30,13 @@
# include "config.h"
#endif
#include "r_local.h"
#include "QF/console.h"
#include "QF/sys.h"
#include "client.h"
#include "r_local.h"
#include "render.h"
//
// current entity info
//

View file

@ -31,8 +31,7 @@
#endif
#include "r_local.h"
#include "d_local.h" // FIXME: shouldn't need to include
// this
#include "render.h"
#define MAXLEFTCLIPEDGES 100

View file

@ -30,7 +30,9 @@
# include "config.h"
#endif
#include "client.h"
#include "r_local.h"
#include "render.h"
#if 0
// FIXME

View file

@ -32,6 +32,8 @@
#include "QF/console.h"
#include "QF/sys.h"
#include "client.h"
#include "r_local.h"
mnode_t *r_pefragtopnode;

View file

@ -30,6 +30,7 @@
# include "config.h"
#endif
#include "client.h"
#include "r_local.h"
int r_dlightframecount;

View file

@ -30,13 +30,15 @@
# include "config.h"
#endif
#include "r_local.h"
#include "QF/sys.h"
#include "QF/console.h"
#include "view.h"
#include "QF/cmd.h"
#include "QF/console.h"
#include "QF/screen.h"
#include "QF/sys.h"
#include "chase.h"
#include "client.h"
#include "r_local.h"
#include "view.h"
//define PASSAGES

View file

@ -30,13 +30,15 @@
# include "config.h"
#endif
#include "r_local.h"
#include "QF/sys.h"
#include "QF/console.h"
#include "server.h"
#include "host.h"
#include "view.h"
#include "r_local.h"
#include "render.h"
#include "sbar.h"
#include "server.h"
#include "view.h"
/*
===============

View file

@ -37,6 +37,7 @@
#include "QF/qargs.h"
#include "QF/quakefs.h"
#include "client.h"
#include "host.h"
#include "r_local.h"
@ -578,6 +579,9 @@ R_DrawParticles (void)
case pt_grav:
p->vel[2] -= grav;
break;
default:
Con_DPrintf ("unhandled particle type %d\n", p->type);
break;
}
}
}

View file

@ -30,6 +30,7 @@
# include "config.h"
#endif
#include "client.h"
#include "r_local.h"
#include "d_local.h"

View file

@ -31,10 +31,12 @@
# include "config.h"
#endif
#include "r_local.h"
#include "QF/sys.h"
#include "QF/console.h"
#include "client.h"
#include "r_local.h"
static int clip_current;
static vec5_t clip_verts[2][MAXWORKINGVERTS];
static int sprite_width, sprite_height;

View file

@ -30,9 +30,11 @@
# include "config.h"
#endif
#include "r_local.h"
#include "QF/sys.h"
#include "client.h"
#include "r_local.h"
drawsurf_t r_drawsurf;
int lightleft, sourcesstep, blocksize, sourcetstep;

View file

@ -36,6 +36,7 @@
#include "net.h"
#include "protocol.h"
#include "r_local.h"
#include "render.h"
// player_state_t is the information needed by a player entity
@ -108,33 +109,9 @@ typedef struct
} frame_t;
typedef struct
{
int destcolor[3];
int percent; // 0-256
} cshift_t;
#define CSHIFT_CONTENTS 0
#define CSHIFT_DAMAGE 1
#define CSHIFT_BONUS 2
#define CSHIFT_POWERUP 3
#define NUM_CSHIFTS 4
//
// client_state_t should hold all pieces of the client state
//
#define MAX_DLIGHTS 32
typedef struct
{
int key; // so entities can reuse same entry
vec3_t origin;
float radius;
float die; // stop lighting after this time
float decay; // drop this each second
float minlight; // don't add when contributing less
float color[3]; // Don't use alpha --KB
} dlight_t;
typedef struct
{

View file

@ -64,7 +64,7 @@ typedef struct sspan_s
int u, v, count;
} sspan_t;
extern cvar_t *d_subdiv16;
extern struct cvar_s *d_subdiv16;
extern float scale_for_mip;

View file

@ -42,7 +42,7 @@ EXTRA_PROGRAMS= qw-client-3dfx qw-client-fbdev \
noinst_LIBRARIES= libqfnet.a
common_SOURCES= buildnum.c com.c \
game.c model.c model_brush.c msg_ucmd.c \
game.c msg_ucmd.c \
pmove.c pmovetst.c \
sys_x86.S net_packetlog.c
@ -71,6 +71,7 @@ server_SOURCES= sv_ccmds.c sv_cvar.c \
qw_server_SOURCES= $(common_SOURCES) $(server_SOURCES)
qw_server_LDADD= $(top_builddir)/libs/util/libQFutil.la \
$(top_builddir)/libs/gamecode/libQFgamecode.la \
$(top_builddir)/libs/models/libQFmodels.la \
-L. -lqfnet $(NET_LIBS) $(DL_LIBS)
qw_server_DEPENDENCIES= libqfnet.a
@ -94,7 +95,7 @@ client_POST_LIBS= $(top_builddir)/libs/video/targets/libQFjs.la
client_SOURCES= cl_cam.c cl_cmd.c cl_cvar.c cl_demo.c cl_ents.c cl_input.c \
cl_main.c cl_misc.c cl_parse.c cl_pred.c cl_slist.c cl_tent.c \
console.c keys.c locs.c model_alias.c model_sprite.c nonintel.c \
console.c keys.c locs.c nonintel.c \
pcx.c r_efrag.c r_view.c sbar.c skin.c teamplay.c tga.c wad.c cl_math.S $(syscl_SRC)
# Software-rendering clients
@ -106,35 +107,35 @@ soft_SOURCES= d_edge.c d_fill.c d_init.c d_modech.c \
d_vars.c d_zpoint.c draw.c sw_raclip.c sw_ralias.c sw_rbsp.c \
sw_rdraw.c sw_redge.c sw_rlight.c sw_rmain.c sw_rmisc.c \
sw_rpart.c sw_rsky.c sw_rsprite.c sw_rsurf.c sw_rvars.c sw_skin.c \
sw_view.c screen.c sw_model_alias.c sw_model_brush.c \
sw_model_sprite.c \
sw_view.c screen.c \
\
d_draw.S d_draw16.S d_parta.S d_polysa.S d_scana.S d_spr8.S \
d_varsa.S sw_raclipa.S sw_raliasa.S sw_rdrawa.S sw_redgea.S \
sw_rvarsa.S surf16.S surf8.S
# ... Linux FBDev
qw_client_fbdev_SOURCES= $(common_SOURCES) $(client_SOURCES) $(soft_SOURCES)
qw_client_fbdev_LDADD= $(client_LIBS) ../../libs/video/targets/libQFfbdev.la $(client_POST_LIBS)
qw_client_fbdev_LDADD= $(client_LIBS) ../../libs/models/libQFmodels_sw.la ../../libs/video/targets/libQFfbdev.la $(client_POST_LIBS)
qw_client_fbdev_DEPENDENCIES= $(client_LIB_DEPS)
# ... SciTech MGL
qw_client_mgl_SOURCES= $(common_SOURCES) $(client_SOURCES) $(soft_SOURCES)
qw_client_mgl_LDADD= $(MGL_LIBS) $(client_LIBS) ../../libs/video/targets/libQFmgl.la $(client_POST_LIBS)
qw_client_mgl_LDADD= $(MGL_LIBS) $(client_LIBS) ../../libs/models/libQFmodels_sw.la ../../libs/video/targets/libQFmgl.la $(client_POST_LIBS)
qw_client_mgl_DEPENDENCIES= $(client_LIB_DEPS)
# ... Simple DirectMedia Layer, version 1.0 and higher
qw_client_sdl_SOURCES= $(common_SOURCES) $(client_SOURCES) $(soft_SOURCES)
qw_client_sdl_LDADD= $(SDL_LIBS) $(client_LIBS) ../../libs/video/targets/libQFsdl.la $(client_POST_LIBS)
qw_client_sdl_LDADD= $(SDL_LIBS) $(client_LIBS) ../../libs/models/libQFmodels_sw.la ../../libs/video/targets/libQFsdl.la $(client_POST_LIBS)
qw_client_sdl_DEPENDENCIES= $(client_LIB_DEPS)
# ... Linux SVGAlib
qw_client_svga_SOURCES= $(common_SOURCES) $(client_SOURCES) $(soft_SOURCES)
qw_client_svga_LDADD= $(SVGA_LIBS) $(client_LIBS) ../../libs/video/targets/libQFsvga.la $(client_POST_LIBS)
qw_client_svga_LDADD= $(SVGA_LIBS) $(client_LIBS) ../../libs/models/libQFmodels_sw.la ../../libs/video/targets/libQFsvga.la $(client_POST_LIBS)
qw_client_svga_DEPENDENCIES= $(client_LIB_DEPS)
# ... X11
qw_client_x11_SOURCES= $(common_SOURCES) $(client_SOURCES) $(soft_SOURCES)
qw_client_x11_LDADD= $(X_PRE_LIBS) $(VIDMODE_LIBS) $(DGA_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS) $(X_SHM_LIB) $(client_LIBS) ../../libs/video/targets/libQFx11.la $(client_POST_LIBS)
qw_client_x11_LDADD= $(X_PRE_LIBS) $(VIDMODE_LIBS) $(DGA_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS) $(X_SHM_LIB) $(client_LIBS) ../../libs/models/libQFmodels_sw.la ../../libs/video/targets/libQFx11.la $(client_POST_LIBS)
qw_client_x11_DEPENDENCIES= $(client_LIB_DEPS)
@ -145,27 +146,26 @@ ogl_SOURCES= noisetextures.c gl_textures.c gl_draw.c gl_dyn_fires.c \
gl_dyn_part.c gl_dyn_textures.c gl_mesh.c gl_ngraph.c \
gl_rlight.c gl_rmain.c gl_rmisc.c gl_rsurf.c \
gl_screen.c gl_skin.c gl_sky.c gl_sky_clip.c gl_view.c \
gl_warp.c gl_model_alias.c gl_model_brush.c \
gl_model_fullbright.c gl_model_sprite.c
gl_warp.c
# ... 3Dfx Voodoo 1 and 2 SVGAlib-based console GL
qw_client_3dfx_SOURCES= $(common_SOURCES) $(client_SOURCES) $(ogl_SOURCES)
qw_client_3dfx_LDADD= $(TDFXGL_LIBS) $(SVGA_LIBS) $(client_LIBS) $(DL_LIBS) ../../libs/video/targets/libQFtdfx.la $(client_POST_LIBS)
qw_client_3dfx_LDADD= $(TDFXGL_LIBS) $(SVGA_LIBS) $(client_LIBS) $(DL_LIBS) ../../libs/models/libQFmodels_gl.la ../../libs/video/targets/libQFtdfx.la $(client_POST_LIBS)
qw_client_3dfx_DEPENDENCIES= $(client_LIB_DEPS)
# ... OpenGL in X Window
qw_client_glx_SOURCES= $(common_SOURCES) $(client_SOURCES) $(ogl_SOURCES)
qw_client_glx_LDADD= $(GLX_LIBS) $(X_PRE_LIBS) $(VIDMODE_LIBS) $(DGA_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS) $(client_LIBS) $(DL_LIBS) ../../libs/video/targets/libQFglx.la $(client_POST_LIBS)
qw_client_glx_LDADD= $(GLX_LIBS) $(X_PRE_LIBS) $(VIDMODE_LIBS) $(DGA_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS) $(client_LIBS) $(DL_LIBS) ../../libs/models/libQFmodels_gl.la ../../libs/video/targets/libQFglx.la $(client_POST_LIBS)
qw_client_glx_DEPENDENCIES= $(client_LIB_DEPS)
# ... Simple DirectMedia Layer, version 1.1 and higher, in GL mode
qw_client_sgl_SOURCES= $(common_SOURCES) $(client_SOURCES) $(ogl_SOURCES)
qw_client_sgl_LDADD= $(SDL_LIBS) $(X_LIBS) $(GLX_LIBS) $(client_LIBS) $(DL_LIBS) ../../libs/video/targets/libQFsgl.la $(client_POST_LIBS)
qw_client_sgl_LDADD= $(SDL_LIBS) $(X_LIBS) $(GLX_LIBS) $(client_LIBS) $(DL_LIBS) ../../libs/models/libQFmodels_gl.la ../../libs/video/targets/libQFsgl.la $(client_POST_LIBS)
qw_client_sgl_DEPENDENCIES= $(client_LIB_DEPS)
# ... SGI/Microsoft WGL (Windows OpenGL)
qw_client_wgl_SOURCES= $(common_SOURCES) $(client_SOURCES) $(ogl_SOURCES)
qw_client_wgl_LDADD= $(client_LIBS) ../../libs/video/targets/libQFwgl.la $(client_POST_LIBS) $(GLX_LIBS) -lgdi32 -lwinmm
qw_client_wgl_LDADD= $(client_LIBS) ../../libs/models/libQFmodels_gl.la ../../libs/video/targets/libQFwgl.la $(client_POST_LIBS) $(GLX_LIBS) -lgdi32 -lwinmm
qw_client_wgl_DEPENDENCIES= $(client_LIB_DEPS)
# Stuff that doesn't get linked into an executable NEEDS to be mentioned here,

View file

@ -32,6 +32,7 @@
#include "d_local.h"
#include "r_local.h"
#include "render.h"
static int miplevel;

View file

@ -31,10 +31,12 @@
#endif
#include "QF/compat.h"
#include "QF/cvar.h"
#include "QF/vid.h"
#include "bothdefs.h"
#include "d_local.h"
#include "render.h"
#define NUM_MIPS 4

View file

@ -30,9 +30,11 @@
# include "config.h"
#endif
#include "d_local.h"
#include "QF/sys.h"
#include "d_local.h"
#include "render.h"
int d_vrectx, d_vrecty, d_vrectright_particle, d_vrectbottom_particle;
int d_y_aspect_shift, d_pix_min, d_pix_max, d_pix_shift;

View file

@ -30,8 +30,10 @@
# include "config.h"
#endif
#include "client.h"
#include "d_local.h"
#include "r_local.h"
#include "render.h"
unsigned char *r_turb_pbase, *r_turb_pdest;
fixed16_t r_turb_s, r_turb_t, r_turb_sstep, r_turb_tstep;

View file

@ -32,6 +32,7 @@
#include "d_local.h"
#include "r_local.h"
#include "render.h"
#define SKY_SPAN_SHIFT 5
#define SKY_SPAN_MAX (1 << SKY_SPAN_SHIFT)

View file

@ -31,6 +31,7 @@
#endif
#include "d_local.h"
#include "render.h"
static int sprite_height;
static int minindex, maxindex;

View file

@ -51,26 +51,6 @@
#include "r_dynamic.h"
#include "render.h"
typedef enum {
pt_static, pt_grav, pt_blob, pt_blob2,
pt_smoke, pt_smokering, pt_smokecloud, pt_bloodcloud,
pt_fadespark, pt_fadespark2, pt_fallfadespark
} ptype_t;
typedef struct particle_s {
vec3_t org;
vec3_t up;
vec3_t right;
int tex;
float color;
float alpha;
float scale;
vec3_t vel;
float ramp;
float die;
ptype_t type;
} particle_t;
static particle_t *particles, **freeparticles;
static short r_numparticles, numparticles;
@ -744,6 +724,9 @@ R_DrawParticles (void)
part->die = -1;
part->vel[2] -= fast_grav;
break;
default:
Con_DPrintf ("unhandled particle type %d\n", part->type);
break;
}
// LordHavoc: immediate removal of unnecessary particles (must
// be done to ensure compactor below operates properly in all

View file

@ -128,7 +128,6 @@ cvar_t *gl_dlight_smooth;
cvar_t *r_skyname;
cvar_t *gl_skymultipass;
cvar_t *gl_sky_clip;
cvar_t *gl_sky_divide;
extern cvar_t *scr_fov;

View file

@ -46,9 +46,11 @@
#include "QF/vid.h"
#include "QF/varrays.h"
#include "client.h"
#include "glquake.h"
#include "r_dynamic.h"
#include "r_local.h"
#include "render.h"
varray_t2f_c4f_v3f_t varray[MAX_VARRAY_VERTS];

View file

@ -49,6 +49,7 @@
#include "QF/tga.h"
#include "cl_parse.h"
#include "client.h"
#include "glquake.h"
#include "host.h"
#include "r_local.h"

View file

@ -35,11 +35,11 @@
#include "QF/sys.h"
#include "QF/texture.h"
#include "client.h"
#include "glquake.h"
#include "host.h"
#include "protocol.h"
byte player_8bit_texels[320 * 200];
static byte translate[256];
static unsigned int translate32[256];

View file

@ -32,6 +32,7 @@
#include "d_local.h"
#include "r_local.h"
#include "render.h"
static finalvert_t fv[2][8];
static auxvert_t av[8];

View file

@ -35,8 +35,10 @@
#include "QF/sys.h"
#include "QF/texture.h"
#include "client.h"
#include "d_ifacea.h"
#include "r_local.h"
#include "render.h"
#define LIGHT_MIN 5 // lowest light value we'll allow, to
// avoid the

View file

@ -33,9 +33,12 @@
#include <math.h>
#include "QF/console.h"
#include "r_local.h"
#include "QF/sys.h"
#include "client.h"
#include "r_local.h"
#include "render.h"
//
// current entity info
//

View file

@ -31,6 +31,7 @@
#endif
#include "r_local.h"
#include "render.h"
#define MAXLEFTCLIPEDGES 100
@ -58,8 +59,8 @@ qboolean r_leftclipped, r_rightclipped;
static qboolean makeleftedge, makerightedge;
qboolean r_nearzionly;
int sintable[1280];
int intsintable[1280];
int sintable[SIN_BUFFER_SIZE];
int intsintable[SIN_BUFFER_SIZE];
mvertex_t r_leftenter, r_leftexit;
mvertex_t r_rightenter, r_rightexit;

View file

@ -30,9 +30,11 @@
# include "config.h"
#endif
#include "QF/sound.h"
#include "d_ifacea.h"
#include "r_local.h"
#include "QF/sound.h"
#include "render.h"
#if 0
// FIXME

View file

@ -30,6 +30,7 @@
# include "config.h"
#endif
#include "client.h"
#include "r_local.h"
int r_dlightframecount;

View file

@ -172,7 +172,8 @@ cvar_t *r_aliastransadj;
cvar_t *gl_dlight_lightmap;
cvar_t *gl_dlight_polyblend;
cvar_t *gl_sky_divide;
extern cvar_t *gl_sky_divide;
extern cvar_t *scr_fov;

View file

@ -37,8 +37,10 @@
#include "QF/sys.h"
#include "cl_parse.h"
#include "client.h"
#include "host.h"
#include "r_local.h"
#include "render.h"
#include "sbar.h"
qboolean allowskybox; // whether or not to allow skyboxes

View file

@ -34,9 +34,11 @@
#include "QF/compat.h"
#include "QF/console.h"
#include "host.h"
#include "QF/qargs.h"
#include "QF/quakefs.h"
#include "client.h"
#include "host.h"
#include "r_dynamic.h"
#include "r_local.h"
@ -570,6 +572,9 @@ R_DrawParticles (void)
case pt_grav:
p->vel[2] -= grav;
break;
default:
Con_DPrintf ("unhandled particle type %d\n", p->type);
break;
}
}
}

View file

@ -30,6 +30,7 @@
# include "config.h"
#endif
#include "client.h"
#include "r_local.h"

View file

@ -39,9 +39,11 @@
#include <math.h>
#include "QF/console.h"
#include "r_local.h"
#include "QF/sys.h"
#include "client.h"
#include "r_local.h"
static int clip_current;
static vec5_t clip_verts[2][MAXWORKINGVERTS];
static int sprite_width, sprite_height;

View file

@ -30,9 +30,11 @@
# include "config.h"
#endif
#include "r_local.h"
#include "QF/sys.h"
#include "client.h"
#include "r_local.h"
drawsurf_t r_drawsurf;
int lightleft, sourcesstep, blocksize, sourcetstep;

View file

@ -31,7 +31,9 @@
#endif
#include "QF/compat.h"
#include "bothdefs.h"
#include "client.h"
#include "host.h"
#include "r_local.h"
#include "view.h"