Whitespace, and a very minor tweak to dynamic texture generation.

This commit is contained in:
Ragnvald Maartmann-Moe IV 2001-01-31 07:52:28 +00:00
parent 9bb8dc358f
commit 3affa48786
5 changed files with 44 additions and 31 deletions

View File

@ -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;

View File

@ -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,20 +97,24 @@ 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++;

View File

@ -29,13 +29,13 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#ifdef HAVE_STRING_H
#include <string.h>
# include <string.h>
#endif
#ifdef HAVE_STRINGS_H
#include <strings.h>
# include <strings.h>
#endif
#include <time.h>
#include "cl_parse.h"

View File

@ -30,11 +30,12 @@
# include "config.h"
#endif
#ifdef HAVE_STRING_H
#include <string.h>
# include <string.h>
#endif
#ifdef HAVE_STRINGS_H
#include <strings.h>
# include <strings.h>
#endif
#include <stdio.h>
#include "glquake.h"

View File

@ -32,35 +32,40 @@
#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>
#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 <dirent.h>
#ifdef HAVE_FNMATCH_H
#define model_t sunmodel_t
#include <fnmatch.h>
#undef model_t
# define model_t sunmodel_t
# include <fnmatch.h>
# undef model_t
#endif
#ifdef WIN32
#include <io.h>
# include <io.h>
#endif
#ifdef _MSC_VER
#define _POSIX_
# define _POSIX_
#endif
#include <limits.h>
#include "cmd.h"
@ -79,7 +84,7 @@
#include "va.h"
#ifndef HAVE_FNMATCH_PROTO
int fnmatch (const char *__pattern, const char *__string, int __flags);
int fnmatch (const char *__pattern, const char *__string, int __flags);
#endif