mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-02-02 04:32:24 +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);
|
porg[j] = ent->old_origin[j] + ((rand () % 3) - 2);
|
||||||
}
|
}
|
||||||
ptype = pt_grav;
|
ptype = pt_grav;
|
||||||
palpha = 255;
|
|
||||||
break;
|
break;
|
||||||
case 6: // voor trail
|
case 6: // voor trail
|
||||||
len -= 3;
|
len -= 3;
|
||||||
|
|
|
@ -64,10 +64,14 @@ GDT_InitDotParticleTexture (void)
|
||||||
dx2 = x - 8;
|
dx2 = x - 8;
|
||||||
dx2 *= dx2;
|
dx2 *= dx2;
|
||||||
for (y = 0; y < 16; y++) {
|
for (y = 0; y < 16; y++) {
|
||||||
data[y][x][0] = 255;
|
|
||||||
dy = y - 8;
|
dy = y - 8;
|
||||||
d = 255 - 4 * (dx2 + dy * dy);
|
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;
|
data[y][x][1] = (byte) d;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -93,20 +97,24 @@ GDT_InitSmokeParticleTexture (void)
|
||||||
dy2 = y - 16;
|
dy2 = y - 16;
|
||||||
dy2 *= dy2;
|
dy2 *= dy2;
|
||||||
for (x = 0; x < 32; x++) {
|
for (x = 0; x < 32; x++) {
|
||||||
data[y][x][0] = (noise1[y][x] >> 1) + 128;
|
|
||||||
dx = x - 16;
|
dx = x - 16;
|
||||||
d = noise2[y][x] * 4 - 512;
|
d = noise2[y][x] * 4 - 512;
|
||||||
if (d > 0) {
|
if (d > 0) {
|
||||||
if (d > 255)
|
if (d > 255)
|
||||||
d = 255;
|
d = 255;
|
||||||
d = (d * (255 - (int) (dx * dx + dy2))) >> 8;
|
d = (d * (255 - (int) (dx * dx + dy2))) >> 8;
|
||||||
if (d < 0)
|
if (d <= 0) {
|
||||||
d = 0;
|
d = 0;
|
||||||
|
data[y][x][0] = 0;
|
||||||
|
} else
|
||||||
|
data[y][x][0] = (noise1[y][x] >> 1) + 128;
|
||||||
// if (d > 255)
|
// if (d > 255)
|
||||||
// d = 255;
|
// d = 255;
|
||||||
data[y][x][1] = (byte) d;
|
data[y][x][1] = (byte) d;
|
||||||
} else
|
} else {
|
||||||
|
data[y][x][0] = 0; //DESPAIR
|
||||||
data[y][x][1] = 0;
|
data[y][x][1] = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
part_tex_smoke[i] = texture_extension_number++;
|
part_tex_smoke[i] = texture_extension_number++;
|
||||||
|
|
|
@ -29,13 +29,13 @@
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_STRING_H
|
#ifdef HAVE_STRING_H
|
||||||
#include <string.h>
|
# include <string.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_STRINGS_H
|
#ifdef HAVE_STRINGS_H
|
||||||
#include <strings.h>
|
# include <strings.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "cl_parse.h"
|
#include "cl_parse.h"
|
||||||
|
|
|
@ -30,11 +30,12 @@
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_STRING_H
|
#ifdef HAVE_STRING_H
|
||||||
#include <string.h>
|
# include <string.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_STRINGS_H
|
#ifdef HAVE_STRINGS_H
|
||||||
#include <strings.h>
|
# include <strings.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "glquake.h"
|
#include "glquake.h"
|
||||||
|
|
|
@ -32,35 +32,40 @@
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdarg.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>
|
#include <dirent.h>
|
||||||
|
|
||||||
#ifdef HAVE_FNMATCH_H
|
#ifdef HAVE_FNMATCH_H
|
||||||
#define model_t sunmodel_t
|
# define model_t sunmodel_t
|
||||||
#include <fnmatch.h>
|
# include <fnmatch.h>
|
||||||
#undef model_t
|
# undef model_t
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <io.h>
|
# include <io.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#define _POSIX_
|
# define _POSIX_
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
#include "cmd.h"
|
#include "cmd.h"
|
||||||
|
@ -79,7 +84,7 @@
|
||||||
#include "va.h"
|
#include "va.h"
|
||||||
|
|
||||||
#ifndef HAVE_FNMATCH_PROTO
|
#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
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue