mirror of
https://git.code.sf.net/p/quake/nuq
synced 2024-11-25 13:31:19 +00:00
getting closer to nuq-glx. just some linking issues
This commit is contained in:
parent
e2efff9dde
commit
438a2bbcd2
9 changed files with 59 additions and 24 deletions
|
@ -100,6 +100,8 @@ typedef struct
|
|||
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
|
||||
|
|
|
@ -198,6 +198,7 @@ extern cvar_t *gl_ztrick;
|
|||
extern cvar_t *gl_finish;
|
||||
extern cvar_t *gl_clear;
|
||||
extern cvar_t *gl_subdivide_size;
|
||||
extern cvar_t *gl_particles;
|
||||
|
||||
extern int gl_lightmap_format;
|
||||
extern int gl_solid_format;
|
||||
|
@ -212,6 +213,8 @@ extern mplane_t *mirror_plane;
|
|||
|
||||
extern float r_world_matrix[16];
|
||||
|
||||
extern float bubble_sintable[], bubble_costable[];
|
||||
|
||||
extern const char *gl_vendor;
|
||||
extern const char *gl_renderer;
|
||||
extern const char *gl_version;
|
||||
|
@ -237,6 +240,9 @@ extern lpSelTexFUNC qglSelectTexture;
|
|||
|
||||
extern qboolean gl_mtexable;
|
||||
|
||||
void GL_SubdivideSurface (msurface_t *fa);
|
||||
void GL_MakeAliasModelDisplayLists (model_t *m, aliashdr_t *hdr);
|
||||
|
||||
void GL_DisableMultitexture(void);
|
||||
void GL_EnableMultitexture(void);
|
||||
void GL_BuildLightmaps (void);
|
||||
|
@ -251,4 +257,22 @@ void R_DrawSkyChain (msurface_t *s);
|
|||
qboolean R_CullBox (vec3_t mins, vec3_t maxs);
|
||||
void R_RotateForEntity (entity_t *e);
|
||||
|
||||
void AddLightBlend (float, float, float, float);
|
||||
|
||||
typedef struct {
|
||||
int key; // allows reusability
|
||||
vec3_t origin, owner;
|
||||
float size;
|
||||
float die, decay; // duration settings
|
||||
float minlight; // lighting threshold
|
||||
float _color[3]; // RGBA
|
||||
float *color;
|
||||
} fire_t;
|
||||
|
||||
void R_AddFire (vec3_t, vec3_t, entity_t *ent);
|
||||
fire_t *R_AllocFire (int);
|
||||
void R_DrawFire (fire_t *);
|
||||
void R_UpdateFires (void);
|
||||
|
||||
|
||||
#endif // __glquake_h
|
||||
|
|
|
@ -143,7 +143,7 @@ void R_NewMap (void);
|
|||
|
||||
void R_ParseParticleEffect (void);
|
||||
void R_RunParticleEffect (vec3_t org, vec3_t dir, int color, int count);
|
||||
void R_RocketTrail (vec3_t start, vec3_t end, int type);
|
||||
void R_RocketTrail (vec3_t start, vec3_t end, int type, entity_t *ent);
|
||||
|
||||
#ifdef QUAKE2
|
||||
void R_DarkFieldParticles (entity_t *ent);
|
||||
|
|
|
@ -186,7 +186,8 @@ nuq_x11_DEPENDENCIES=libqfsys.a libqfsnd.a libqfcd.a libqfnet.a
|
|||
# ... Common stuff
|
||||
#
|
||||
ogl_SOURCES= gl_draw.c gl_mesh.c gl_part.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_rmain.c gl_rmisc.c gl_rsurf.c gl_screen.c gl_view.c \
|
||||
gl_warp.c gl_model.c
|
||||
|
||||
#
|
||||
# ... 3Dfx Voodoo 1 and 2 SVGAlib-based console GL
|
||||
|
|
|
@ -355,6 +355,7 @@ dlight_t *CL_AllocDlight (int key)
|
|||
{
|
||||
memset (dl, 0, sizeof(*dl));
|
||||
dl->key = key;
|
||||
dl->color = dl->_color;
|
||||
return dl;
|
||||
}
|
||||
}
|
||||
|
@ -368,6 +369,7 @@ dlight_t *CL_AllocDlight (int key)
|
|||
{
|
||||
memset (dl, 0, sizeof(*dl));
|
||||
dl->key = key;
|
||||
dl->color = dl->_color;
|
||||
return dl;
|
||||
}
|
||||
}
|
||||
|
@ -375,6 +377,7 @@ dlight_t *CL_AllocDlight (int key)
|
|||
dl = &cl_dlights[0];
|
||||
memset (dl, 0, sizeof(*dl));
|
||||
dl->key = key;
|
||||
dl->color = dl->_color;
|
||||
return dl;
|
||||
}
|
||||
|
||||
|
@ -611,25 +614,25 @@ void CL_RelinkEntities (void)
|
|||
#endif
|
||||
|
||||
if (ent->model->flags & EF_GIB)
|
||||
R_RocketTrail (oldorg, ent->origin, 2);
|
||||
R_RocketTrail (oldorg, ent->origin, 2, ent);
|
||||
else if (ent->model->flags & EF_ZOMGIB)
|
||||
R_RocketTrail (oldorg, ent->origin, 4);
|
||||
R_RocketTrail (oldorg, ent->origin, 4, ent);
|
||||
else if (ent->model->flags & EF_TRACER)
|
||||
R_RocketTrail (oldorg, ent->origin, 3);
|
||||
R_RocketTrail (oldorg, ent->origin, 3, ent);
|
||||
else if (ent->model->flags & EF_TRACER2)
|
||||
R_RocketTrail (oldorg, ent->origin, 5);
|
||||
R_RocketTrail (oldorg, ent->origin, 5, ent);
|
||||
else if (ent->model->flags & EF_ROCKET)
|
||||
{
|
||||
R_RocketTrail (oldorg, ent->origin, 0);
|
||||
R_RocketTrail (oldorg, ent->origin, 0, ent);
|
||||
dl = CL_AllocDlight (i);
|
||||
VectorCopy (ent->origin, dl->origin);
|
||||
dl->radius = 200;
|
||||
dl->die = cl.time + 0.01;
|
||||
}
|
||||
else if (ent->model->flags & EF_GRENADE)
|
||||
R_RocketTrail (oldorg, ent->origin, 1);
|
||||
R_RocketTrail (oldorg, ent->origin, 1, ent);
|
||||
else if (ent->model->flags & EF_TRACER3)
|
||||
R_RocketTrail (oldorg, ent->origin, 6);
|
||||
R_RocketTrail (oldorg, ent->origin, 6, ent);
|
||||
|
||||
ent->forcelink = false;
|
||||
|
||||
|
|
|
@ -30,6 +30,14 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "model.h"
|
||||
#include "sys.h"
|
||||
#include "qendian.h"
|
||||
#include "quakefs.h"
|
||||
#include "glquake.h"
|
||||
#include "console.h"
|
||||
|
||||
model_t *loadmodel;
|
||||
char loadname[32]; // for hunk tags
|
||||
|
@ -390,7 +398,7 @@ void Mod_LoadTextures (lump_t *l)
|
|||
memcpy ( tx+1, mt+1, pixels);
|
||||
|
||||
|
||||
if (!Q_strncmp(mt->name,"sky",3))
|
||||
if (!strncmp(mt->name,"sky",3))
|
||||
R_InitSky (tx);
|
||||
else
|
||||
{
|
||||
|
@ -806,7 +814,7 @@ void Mod_LoadFaces (lump_t *l)
|
|||
|
||||
// set the drawing flags flag
|
||||
|
||||
if (!Q_strncmp(out->texinfo->texture->name,"sky",3)) // sky
|
||||
if (!strncmp(out->texinfo->texture->name,"sky",3)) // sky
|
||||
{
|
||||
out->flags |= (SURF_DRAWSKY | SURF_DRAWTILED);
|
||||
#ifndef QUAKE2
|
||||
|
@ -815,7 +823,7 @@ void Mod_LoadFaces (lump_t *l)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!Q_strncmp(out->texinfo->texture->name,"*",1)) // turbulent
|
||||
if (!strncmp(out->texinfo->texture->name,"*",1)) // turbulent
|
||||
{
|
||||
out->flags |= (SURF_DRAWTURB | SURF_DRAWTILED);
|
||||
for (i=0 ; i<2 ; i++)
|
||||
|
@ -1258,8 +1266,8 @@ Mod_LoadAliasFrame
|
|||
*/
|
||||
void * Mod_LoadAliasFrame (void * pin, maliasframedesc_t *frame)
|
||||
{
|
||||
trivertx_t *pframe, *pinframe;
|
||||
int i, j;
|
||||
trivertx_t *pinframe;
|
||||
int i;
|
||||
daliasframe_t *pdaliasframe;
|
||||
|
||||
pdaliasframe = (daliasframe_t *)pin;
|
||||
|
@ -1420,7 +1428,6 @@ void *Mod_LoadAllSkins (int numskins, daliasskintype_t *pskintype)
|
|||
int i, j, k;
|
||||
char name[32];
|
||||
int s;
|
||||
byte *copy;
|
||||
byte *skin;
|
||||
byte *texels;
|
||||
daliasskingroup_t *pinskingroup;
|
||||
|
@ -1499,7 +1506,7 @@ void Mod_LoadAliasModel (model_t *mod, void *buffer)
|
|||
mdl_t *pinmodel;
|
||||
stvert_t *pinstverts;
|
||||
dtriangle_t *pintriangles;
|
||||
int version, numframes, numskins;
|
||||
int version, numframes;
|
||||
int size;
|
||||
daliasframetype_t *pframetype;
|
||||
daliasskintype_t *pskintype;
|
||||
|
@ -1663,9 +1670,7 @@ void * Mod_LoadSpriteFrame (void * pin, mspriteframe_t **ppframe, int framenum)
|
|||
{
|
||||
dspriteframe_t *pinframe;
|
||||
mspriteframe_t *pspriteframe;
|
||||
int i, width, height, size, origin[2];
|
||||
unsigned short *ppixout;
|
||||
byte *ppixin;
|
||||
int width, height, size, origin[2];
|
||||
char name[64];
|
||||
|
||||
pinframe = (dspriteframe_t *)pin;
|
||||
|
@ -1676,7 +1681,7 @@ void * Mod_LoadSpriteFrame (void * pin, mspriteframe_t **ppframe, int framenum)
|
|||
|
||||
pspriteframe = Hunk_AllocName (sizeof (mspriteframe_t),loadname);
|
||||
|
||||
Q_memset (pspriteframe, 0, sizeof (mspriteframe_t));
|
||||
memset (pspriteframe, 0, sizeof (mspriteframe_t));
|
||||
|
||||
*ppframe = pspriteframe;
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include "vid.h"
|
||||
#include "sys.h"
|
||||
#include "mathlib.h" // needed by: protocol.h, render.h, client.h,
|
||||
#include "host.h"
|
||||
// modelgen.h, glmodel.h
|
||||
#include "wad.h"
|
||||
#include "draw.h"
|
||||
|
@ -678,7 +679,7 @@ R_AddFire (vec3_t start, vec3_t end, entity_t *ent)
|
|||
|
||||
VectorSubtract (end, start, vec);
|
||||
len = VectorNormalize (vec);
|
||||
key = ent-cl_visedicts+1;
|
||||
key = ent-cl_entities+1;
|
||||
|
||||
if (len)
|
||||
{
|
||||
|
|
|
@ -32,13 +32,12 @@
|
|||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "bothdefs.h" // needed by: common.h, net.h, client.h
|
||||
|
||||
#include "bspfile.h" // needed by: glquake.h
|
||||
#include "vid.h"
|
||||
#include "sys.h"
|
||||
#include "mathlib.h" // needed by: protocol.h, render.h, client.h,
|
||||
// modelgen.h, glmodel.h
|
||||
#include "compat.h"
|
||||
#include "wad.h"
|
||||
#include "draw.h"
|
||||
#include "cvar.h"
|
||||
|
|
|
@ -549,7 +549,7 @@ void R_TeleportSplash (vec3_t org)
|
|||
}
|
||||
}
|
||||
|
||||
void R_RocketTrail (vec3_t start, vec3_t end, int type)
|
||||
void R_RocketTrail (vec3_t start, vec3_t end, int type, entity_t *ent)
|
||||
{
|
||||
vec3_t vec;
|
||||
float len;
|
||||
|
|
Loading…
Reference in a new issue