mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-05-30 00:30:38 +00:00
^M cleanup, and qw-server compiles with -Werror
This commit is contained in:
parent
e947605cc5
commit
b139acafc2
104 changed files with 21255 additions and 21263 deletions
164
source/r_part.c
164
source/r_part.c
|
@ -1,22 +1,22 @@
|
|||
/*
|
||||
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 the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
/*
|
||||
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 the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "r_local.h"
|
||||
|
@ -230,14 +230,14 @@ void R_RunParticleEffect (vec3_t org, vec3_t dir, int color, int count)
|
|||
{
|
||||
int i, j;
|
||||
particle_t *p;
|
||||
int scale;
|
||||
|
||||
if (count > 130)
|
||||
scale = 3;
|
||||
else if (count > 20)
|
||||
scale = 2;
|
||||
else
|
||||
scale = 1;
|
||||
int scale;
|
||||
|
||||
if (count > 130)
|
||||
scale = 3;
|
||||
else if (count > 20)
|
||||
scale = 2;
|
||||
else
|
||||
scale = 1;
|
||||
|
||||
for (i=0 ; i<count ; i++)
|
||||
{
|
||||
|
@ -453,31 +453,31 @@ void R_DrawParticles (void)
|
|||
float time1;
|
||||
float dvel;
|
||||
float frametime;
|
||||
#ifdef GLQUAKE
|
||||
unsigned char *at;
|
||||
#ifdef GLQUAKE
|
||||
unsigned char *at;
|
||||
unsigned char theAlpha;
|
||||
vec3_t up, right;
|
||||
float scale;
|
||||
qboolean alphaTestEnabled;
|
||||
|
||||
GL_Bind(particletexture);
|
||||
alphaTestEnabled = glIsEnabled(GL_ALPHA_TEST);
|
||||
|
||||
if (alphaTestEnabled)
|
||||
glDisable(GL_ALPHA_TEST);
|
||||
glEnable (GL_BLEND);
|
||||
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||
glBegin (GL_TRIANGLES);
|
||||
|
||||
VectorScale (vup, 1.5, up);
|
||||
VectorScale (vright, 1.5, right);
|
||||
#else
|
||||
vec3_t up, right;
|
||||
float scale;
|
||||
qboolean alphaTestEnabled;
|
||||
|
||||
GL_Bind(particletexture);
|
||||
alphaTestEnabled = glIsEnabled(GL_ALPHA_TEST);
|
||||
|
||||
if (alphaTestEnabled)
|
||||
glDisable(GL_ALPHA_TEST);
|
||||
glEnable (GL_BLEND);
|
||||
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||
glBegin (GL_TRIANGLES);
|
||||
|
||||
VectorScale (vup, 1.5, up);
|
||||
VectorScale (vright, 1.5, right);
|
||||
#else
|
||||
D_StartParticles ();
|
||||
|
||||
VectorScale (vright, xscaleshrink, r_pright);
|
||||
VectorScale (vup, yscaleshrink, r_pup);
|
||||
VectorCopy (vpn, r_ppn);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
frametime = host_frametime;
|
||||
time3 = frametime * 15;
|
||||
|
@ -514,35 +514,35 @@ void R_DrawParticles (void)
|
|||
break;
|
||||
}
|
||||
|
||||
#ifdef GLQUAKE
|
||||
// hack a scale up to keep particles from disapearing
|
||||
scale = (p->org[0] - r_origin[0])*vpn[0] + (p->org[1] - r_origin[1])*vpn[1]
|
||||
+ (p->org[2] - r_origin[2])*vpn[2];
|
||||
if (scale < 20)
|
||||
scale = 1;
|
||||
else
|
||||
scale = 1 + scale * 0.004;
|
||||
at = (byte *)&d_8to24table[(int)p->color];
|
||||
if (p->type==pt_fire)
|
||||
theAlpha = 255*(6-p->ramp)/6;
|
||||
// theAlpha = 192;
|
||||
// else if (p->type==pt_explode || p->type==pt_explode2)
|
||||
// theAlpha = 255*(8-p->ramp)/8;
|
||||
else
|
||||
theAlpha = 255;
|
||||
glColor4ub (*at, *(at+1), *(at+2), theAlpha);
|
||||
// glColor3ubv (at);
|
||||
// glColor3ubv ((byte *)&d_8to24table[(int)p->color]);
|
||||
glTexCoord2f (0,0);
|
||||
glVertex3fv (p->org);
|
||||
glTexCoord2f (1,0);
|
||||
glVertex3f (p->org[0] + up[0]*scale, p->org[1] + up[1]*scale, p->org[2] + up[2]*scale);
|
||||
glTexCoord2f (0,1);
|
||||
glVertex3f (p->org[0] + right[0]*scale, p->org[1] + right[1]*scale, p->org[2] + right[2]*scale);
|
||||
|
||||
#else
|
||||
#ifdef GLQUAKE
|
||||
// hack a scale up to keep particles from disapearing
|
||||
scale = (p->org[0] - r_origin[0])*vpn[0] + (p->org[1] - r_origin[1])*vpn[1]
|
||||
+ (p->org[2] - r_origin[2])*vpn[2];
|
||||
if (scale < 20)
|
||||
scale = 1;
|
||||
else
|
||||
scale = 1 + scale * 0.004;
|
||||
at = (byte *)&d_8to24table[(int)p->color];
|
||||
if (p->type==pt_fire)
|
||||
theAlpha = 255*(6-p->ramp)/6;
|
||||
// theAlpha = 192;
|
||||
// else if (p->type==pt_explode || p->type==pt_explode2)
|
||||
// theAlpha = 255*(8-p->ramp)/8;
|
||||
else
|
||||
theAlpha = 255;
|
||||
glColor4ub (*at, *(at+1), *(at+2), theAlpha);
|
||||
// glColor3ubv (at);
|
||||
// glColor3ubv ((byte *)&d_8to24table[(int)p->color]);
|
||||
glTexCoord2f (0,0);
|
||||
glVertex3fv (p->org);
|
||||
glTexCoord2f (1,0);
|
||||
glVertex3f (p->org[0] + up[0]*scale, p->org[1] + up[1]*scale, p->org[2] + up[2]*scale);
|
||||
glTexCoord2f (0,1);
|
||||
glVertex3f (p->org[0] + right[0]*scale, p->org[1] + right[1]*scale, p->org[2] + right[2]*scale);
|
||||
|
||||
#else
|
||||
D_DrawParticle (p);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
p->org[0] += p->vel[0]*frametime;
|
||||
p->org[1] += p->vel[1]*frametime;
|
||||
|
@ -602,14 +602,14 @@ void R_DrawParticles (void)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef GLQUAKE
|
||||
glEnd ();
|
||||
glDisable (GL_BLEND);
|
||||
if (alphaTestEnabled)
|
||||
glEnable(GL_ALPHA_TEST);
|
||||
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
||||
#else
|
||||
D_EndParticles ();
|
||||
#ifdef GLQUAKE
|
||||
glEnd ();
|
||||
glDisable (GL_BLEND);
|
||||
if (alphaTestEnabled)
|
||||
glEnable(GL_ALPHA_TEST);
|
||||
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
||||
#else
|
||||
D_EndParticles ();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue