mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
Particle updates. Some cleanups, small speedups, and reimplement id's effects. r_particle_styles 0 to see id's effects.
This commit is contained in:
parent
07fb841a49
commit
b13efc3a83
8 changed files with 708 additions and 224 deletions
|
@ -48,6 +48,10 @@ typedef struct
|
|||
typedef enum {
|
||||
pt_static,
|
||||
pt_grav,
|
||||
pt_slowgrav,
|
||||
pt_fire,
|
||||
pt_explode,
|
||||
pt_explode2,
|
||||
pt_blob,
|
||||
pt_blob2,
|
||||
pt_smoke,
|
||||
|
@ -56,10 +60,7 @@ typedef enum {
|
|||
pt_fadespark,
|
||||
pt_fadespark2,
|
||||
pt_fallfadespark,
|
||||
pt_slowgrav,
|
||||
pt_fire,
|
||||
pt_explode,
|
||||
pt_explode2,
|
||||
pt_flame
|
||||
} ptype_t;
|
||||
|
||||
// !!! if this is changed, it must be changed in d_ifacea.h too !!!
|
||||
|
@ -67,16 +68,16 @@ typedef struct particle_s
|
|||
{
|
||||
// driver-usable fields
|
||||
vec3_t org;
|
||||
int color;
|
||||
int tex;
|
||||
float color;
|
||||
float alpha;
|
||||
float scale;
|
||||
float alpha;
|
||||
// drivers never touch the following fields
|
||||
struct particle_s *next;
|
||||
vec3_t vel;
|
||||
float ramp;
|
||||
float die;
|
||||
ptype_t type;
|
||||
float die;
|
||||
float ramp;
|
||||
struct particle_s *next;
|
||||
} particle_t;
|
||||
|
||||
#define PARTICLE_Z_CLIP 8.0
|
||||
|
|
|
@ -53,17 +53,17 @@
|
|||
// !!! if this is changed, it must be changed in d_iface.h too !!!
|
||||
// driver-usable fields
|
||||
#define pt_org 0
|
||||
#define pt_tex 12
|
||||
#define pt_color 16
|
||||
#define pt_color 12
|
||||
#define pt_tex 16
|
||||
#define pt_alpha 20
|
||||
#define pt_scale 24
|
||||
// drivers never touch the following fields
|
||||
#define pt_next 28
|
||||
#define pt_vel 32
|
||||
#define pt_ramp 36
|
||||
#define pt_die 40
|
||||
#define pt_type 44
|
||||
#define pt_size 48
|
||||
#define pt_vel 28
|
||||
#define pt_type 40
|
||||
#define pt_die 44
|
||||
#define pt_ramp 48
|
||||
#define pt_next 52
|
||||
#define pt_size 56
|
||||
|
||||
#define PARTICLE_Z_CLIP 8.0
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
extern struct cvar_s *easter_eggs;
|
||||
extern void r_easter_eggs_f (cvar_t *var);
|
||||
extern void r_particles_style_f (cvar_t *var);
|
||||
|
||||
extern struct cvar_s *cl_crossx;
|
||||
extern struct cvar_s *cl_crossy;
|
||||
|
@ -70,6 +71,8 @@ extern struct cvar_s *r_novis;
|
|||
extern struct cvar_s *r_numedges;
|
||||
extern struct cvar_s *r_numsurfs;
|
||||
extern struct cvar_s *r_particles;
|
||||
extern struct cvar_s *r_particles_max;
|
||||
extern struct cvar_s *r_particles_style;
|
||||
extern struct cvar_s *r_reportedgeout;
|
||||
extern struct cvar_s *r_reportsurfout;
|
||||
extern struct cvar_s *r_shadows;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -108,6 +108,7 @@ cvar_t *r_novis;
|
|||
cvar_t *r_numedges;
|
||||
cvar_t *r_numsurfs;
|
||||
cvar_t *r_particles;
|
||||
cvar_t *r_particles_style;
|
||||
cvar_t *r_particles_max;
|
||||
cvar_t *r_reportedgeout;
|
||||
cvar_t *r_reportsurfout;
|
||||
|
@ -307,6 +308,9 @@ R_Init_Cvars (void)
|
|||
r_particles_max_f, "Maximum amount of "
|
||||
"particles to display. No maximum, minimum "
|
||||
"is 0.");
|
||||
r_particles_style = Cvar_Get ("r_particles_style", "1", CVAR_ARCHIVE,
|
||||
r_particles_style_f, "Sets particle style. "
|
||||
"0 for Id, 1 for QF.");
|
||||
r_reportedgeout = Cvar_Get ("r_reportedgeout", "0", CVAR_NONE, NULL,
|
||||
"Toggle the display of how many edges were "
|
||||
"not displayed");
|
||||
|
|
|
@ -732,6 +732,11 @@ r_easter_eggs_f (cvar_t *var)
|
|||
{
|
||||
}
|
||||
|
||||
void
|
||||
r_particles_style_f (cvar_t *var)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
R_ParticleFunctionInit (void)
|
||||
{
|
||||
|
|
|
@ -733,6 +733,11 @@ r_easter_eggs_f (cvar_t *var)
|
|||
{
|
||||
}
|
||||
|
||||
void
|
||||
r_particles_style_f (cvar_t *var)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
R_ParticleFunctionInit (void)
|
||||
{
|
||||
|
|
|
@ -1307,8 +1307,6 @@ CL_Init_Cvars (void)
|
|||
"Auto aim off switch. Set to 1 to turn off.");
|
||||
cl_port = Cvar_Get ("cl_port", PORT_CLIENT, CVAR_NONE, Cvar_Info,
|
||||
"UDP Port for client to use.");
|
||||
|
||||
R_Particles_Init_Cvars ();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1658,6 +1656,7 @@ Host_Init (void)
|
|||
Netchan_Init_Cvars ();
|
||||
Pmove_Init_Cvars ();
|
||||
R_Init_Cvars ();
|
||||
R_Particles_Init_Cvars ();
|
||||
S_Init_Cvars ();
|
||||
Team_Init_Cvars ();
|
||||
V_Init_Cvars ();
|
||||
|
|
Loading…
Reference in a new issue