mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-10 06:42:26 +00:00
Whitespace, and a very minor tweak to dynamic texture generation.
This commit is contained in:
parent
9bb8dc358f
commit
3affa48786
5 changed files with 44 additions and 31 deletions
|
@ -504,7 +504,6 @@ R_RocketTrail (int type, entity_t *ent)
|
|||
porg[j] = ent->old_origin[j] + ((rand () % 3) - 2);
|
||||
}
|
||||
ptype = pt_grav;
|
||||
palpha = 255;
|
||||
break;
|
||||
case 6: // voor trail
|
||||
len -= 3;
|
||||
|
|
|
@ -64,10 +64,14 @@ GDT_InitDotParticleTexture (void)
|
|||
dx2 = x - 8;
|
||||
dx2 *= dx2;
|
||||
for (y = 0; y < 16; y++) {
|
||||
data[y][x][0] = 255;
|
||||
dy = y - 8;
|
||||
d = 255 - 4 * (dx2 + dy * dy);
|
||||
if (d<0) d = 0;
|
||||
if (d<=0) {
|
||||
d = 0;
|
||||
data[y][x][0] = 0;
|
||||
} else
|
||||
data[y][x][0] = 255;
|
||||
|
||||
data[y][x][1] = (byte) d;
|
||||
}
|
||||
}
|
||||
|
@ -93,22 +97,26 @@ GDT_InitSmokeParticleTexture (void)
|
|||
dy2 = y - 16;
|
||||
dy2 *= dy2;
|
||||
for (x = 0; x < 32; x++) {
|
||||
data[y][x][0] = (noise1[y][x] >> 1) + 128;
|
||||
dx = x - 16;
|
||||
d = noise2[y][x] * 4 - 512;
|
||||
if (d > 0) {
|
||||
if (d > 255)
|
||||
d = 255;
|
||||
d = (d * (255 - (int) (dx * dx + dy2))) >> 8;
|
||||
if (d < 0)
|
||||
if (d <= 0) {
|
||||
d = 0;
|
||||
data[y][x][0] = 0;
|
||||
} else
|
||||
data[y][x][0] = (noise1[y][x] >> 1) + 128;
|
||||
// if (d > 255)
|
||||
// d = 255;
|
||||
data[y][x][1] = (byte) d;
|
||||
} else
|
||||
} else {
|
||||
data[y][x][0] = 0; //DESPAIR
|
||||
data[y][x][1] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
part_tex_smoke[i] = texture_extension_number++;
|
||||
glBindTexture (GL_TEXTURE_2D, part_tex_smoke[i]);
|
||||
glTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
|
|
|
@ -29,13 +29,13 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include "cl_parse.h"
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#ifdef HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "glquake.h"
|
||||
|
|
|
@ -32,22 +32,26 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <dirent.h>
|
||||
|
||||
#ifdef HAVE_FNMATCH_H
|
||||
# define model_t sunmodel_t
|
||||
# include <fnmatch.h>
|
||||
|
@ -61,6 +65,7 @@
|
|||
#ifdef _MSC_VER
|
||||
# define _POSIX_
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#include "cmd.h"
|
||||
|
|
Loading…
Reference in a new issue