diff noise reduction in render.h and its fallout

This commit is contained in:
Bill Currie 2001-05-18 22:07:10 +00:00
parent 1ea84a32bf
commit 18e6b43168
4 changed files with 49 additions and 65 deletions

View file

@ -31,12 +31,11 @@
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/mathlib.h" #include "QF/mathlib.h"
#include "QF/model.h"
#include "QF/vid.h" #include "QF/vid.h"
#include "protocol.h" #include "protocol.h"
#define MAXCLIPPLANES 11
#define TOP_RANGE 16 // soldier uniform colors #define TOP_RANGE 16 // soldier uniform colors
#define BOTTOM_RANGE 96 #define BOTTOM_RANGE 96
@ -51,23 +50,31 @@ typedef struct entity_s
entity_state_t baseline; // to fill in defaults in updates entity_state_t baseline; // to fill in defaults in updates
double msgtime; // time of last update double msgtime; // time of last update
vec3_t msg_origins[2]; // last two updates (0 is newest)
vec3_t origin; vec3_t origin;
vec3_t old_origin; vec3_t old_origin;
vec3_t msg_angles[2]; // last two updates (0 is newest)
vec3_t angles; vec3_t angles;
vec3_t msg_origins[2]; // last two updates (0 is newest)
vec3_t msg_angles[2]; // last two updates (0 is newest)
struct model_s *model; // NULL = no model struct model_s *model; // NULL = no model
struct efrag_s *efrag; // linked list of efrags
int frame; int frame;
float syncbase; // for client-side animations
byte *colormap; byte *colormap;
int effects; // light, particals, etc
int skinnum; // for Alias models int skinnum; // for Alias models
float syncbase; // for client-side animations
struct efrag_s *efrag; // linked list of efrags
int visframe; // last frame this entity was int visframe; // last frame this entity was
// found in an active leaf // found in an active leaf
int effects; // light, particals, etc
int dlightframe; // dynamic lighting int dlightframe; // dynamic lighting
int dlightbits; int dlightbits;
float colormod[3]; // color tint for model
float alpha; // opacity (alpha) of the model
float scale; // size scaler of the model
float glow_size; // how big the glow is (can be negative)
byte glow_color; // color of glow (paletted)
// FIXME: could turn these into a union // FIXME: could turn these into a union
int trivial_accept; int trivial_accept;
struct mnode_s *topnode; // for bmodels, first world node that struct mnode_s *topnode; // for bmodels, first world node that
@ -126,6 +133,7 @@ extern struct texture_s *r_notexture_mip;
extern entity_t r_worldentity; extern entity_t r_worldentity;
void R_Init (void); void R_Init (void);
void R_Init_Cvars (void);
void R_InitEfrags (void); void R_InitEfrags (void);
void R_InitSky (struct texture_s *mt); // called at level load void R_InitSky (struct texture_s *mt); // called at level load
void R_Textures_Init (void); void R_Textures_Init (void);
@ -139,22 +147,6 @@ void R_RemoveEfrags (entity_t *ent);
void R_NewMap (void); void R_NewMap (void);
struct entity_s;
void R_RocketTrail (int type, struct entity_s *ent);
void R_RunParticleEffect (vec3_t org, int color, int count);
void R_RunPuffEffect (vec3_t org, byte type, byte count);
void R_RunSpikeEffect (vec3_t org, byte type);
#ifdef QUAKE2
void R_DarkFieldParticles (entity_t *ent);
#endif
void R_EntityParticles (entity_t *ent);
void R_BlobExplosion (vec3_t org);
void R_ParticleExplosion (vec3_t org);
void R_ParticleExplosion2 (vec3_t org, int colorStart, int colorLength);
void R_LavaSplash (vec3_t org);
void R_TeleportSplash (vec3_t org);
// LordHavoc: relative bmodel lighting // LordHavoc: relative bmodel lighting
void R_PushDlights (vec3_t entorigin); void R_PushDlights (vec3_t entorigin);
void R_DrawWaterSurfaces (void); void R_DrawWaterSurfaces (void);
@ -172,14 +164,6 @@ void D_DeleteSurfaceCache (void);
void D_InitCaches (void *buffer, int size); void D_InitCaches (void *buffer, int size);
void R_SetVrect (vrect_t *pvrect, vrect_t *pvrectin, int lineadj); void R_SetVrect (vrect_t *pvrect, vrect_t *pvrectin, int lineadj);
void R_DrawBrushModel (entity_t *e); void R_LoadSkys (const char *);
void R_DrawWorld (void);
void R_RenderDlights (void);
struct msurface_s;
void R_RenderBrushPoly (struct msurface_s *fa);
void R_TranslatePlayerSkin (int playernum);
void R_AddFire (vec3_t, vec3_t, entity_t *ent);
#endif // __render_h #endif // __render_h

View file

@ -45,6 +45,7 @@
#include "chase.h" #include "chase.h"
#include "host.h" #include "host.h"
#include "host.h" #include "host.h"
#include "r_dynamic.h"
#include "render.h" #include "render.h"
#include "server.h" #include "server.h"

View file

@ -1079,6 +1079,7 @@ R_RenderScene (void)
R_RenderDlights (); R_RenderDlights ();
} }
void R_RenderBrushPoly (msurface_t *fa);
void void
R_Mirror (void) R_Mirror (void)
{ {

View file

@ -26,12 +26,12 @@
$Id$ $Id$
*/ */
#ifndef _RENDER_H #ifndef __render_h
#define _RENDER_H #define __render_h
#include "QF/cvar.h"
#include "QF/mathlib.h" #include "QF/mathlib.h"
#include "QF/model.h" #include "QF/model.h"
#include "QF/cvar.h"
#include "QF/vid.h" #include "QF/vid.h"
// now we know why (struct model_s *) is used here instead of model_t // now we know why (struct model_s *) is used here instead of model_t
@ -55,11 +55,11 @@ typedef struct entity_s
struct player_info_s *scoreboard; // identify player struct player_info_s *scoreboard; // identify player
float syncbase; float syncbase; // for client-side animations
struct efrag_s *efrag; // linked list of efrags (FIXME) struct efrag_s *efrag; // linked list of efrags
int visframe; // last frame this entity was found in an int visframe; // last frame this entity was
// active leaf, only used for static objects // found in an active leaf
float colormod[3]; // color tint for model float colormod[3]; // color tint for model
float alpha; // opacity (alpha) of the model float alpha; // opacity (alpha) of the model
@ -79,7 +79,6 @@ typedef struct entity_s
int pose2; int pose2;
} entity_t; } entity_t;
// !!! if this is changed, it must be changed in asm_draw.h too !!! // !!! if this is changed, it must be changed in asm_draw.h too !!!
typedef struct typedef struct
{ {
@ -125,7 +124,6 @@ extern struct texture_s *r_notexture_mip;
extern entity_t r_worldentity; extern entity_t r_worldentity;
void R_Init (void); void R_Init (void);
void R_Init_Cvars (void); void R_Init_Cvars (void);
void R_InitEfrags (void); void R_InitEfrags (void);
@ -160,4 +158,4 @@ void R_SetVrect (vrect_t *pvrect, vrect_t *pvrectin, int lineadj);
void R_LoadSkys (const char *); void R_LoadSkys (const char *);
#endif // _RENDER_H #endif // __render_h