Little different shape of particle

This commit is contained in:
Denis Pauk 2018-04-10 23:24:53 +03:00
parent 14c934762d
commit 23d25db601
3 changed files with 12 additions and 6 deletions

View file

@ -54,7 +54,7 @@ static void R_DrawParticle(partparms_t *partparms)
byte *pdest;
zvalue_t *pz;
int color = pparticle->color;
int i, izi, pix, count, u, v;
int i, izi, pix, count, u, v, min_int, max_int;
/*
** transform the particle
@ -107,6 +107,9 @@ static void R_DrawParticle(partparms_t *partparms)
*/
count = pix;
min_int = pix / 2;
max_int = (pix * 2) - min_int;
switch (level) {
case PARTICLE_33 :
for ( ; count ; count--, pz += d_zwidth, pdest += r_screenwidth)
@ -114,7 +117,8 @@ static void R_DrawParticle(partparms_t *partparms)
//FIXME--do it in blocks of 8?
for (i=0 ; i<pix ; i++)
{
if (pz[i] <= izi)
int pos = i + count;
if (pos >= min_int && pos <= max_int && pz[i] <= izi)
{
pz[i] = izi;
pdest[i] = vid_alphamap[color + ((int)pdest[i]<<8)];
@ -130,7 +134,8 @@ static void R_DrawParticle(partparms_t *partparms)
{
for (i=0 ; i<pix ; i++)
{
if (pz[i] <= izi)
int pos = i + count;
if (pos >= min_int && pos <= max_int && pz[i] <= izi)
{
pz[i] = izi;
pdest[i] = vid_alphamap[color_part + (int)pdest[i]];
@ -145,7 +150,8 @@ static void R_DrawParticle(partparms_t *partparms)
{
for (i=0 ; i<pix ; i++)
{
if (pz[i] <= izi)
int pos = i + count;
if (pos >= min_int && pos <= max_int && pz[i] <= izi)
{
pz[i] = izi;
pdest[i] = color;

View file

@ -41,7 +41,7 @@ static int rd_buffersize;
static void (*rd_flush)(int target, char *buffer);
void
Com_BeginRedirect(int target, char *buffer, int buffersize, void (*flush))
Com_BeginRedirect(int target, char *buffer, int buffersize, void (*flush)(int, char *))
{
if (!target || !buffer || !buffersize || !flush)
{

View file

@ -708,7 +708,7 @@ void FS_CreatePath(char *path);
#define PRINT_ALL 0
#define PRINT_DEVELOPER 1 /* only print when "developer 1" */
void Com_BeginRedirect(int target, char *buffer, int buffersize, void (*flush));
void Com_BeginRedirect(int target, char *buffer, int buffersize, void (*flush)(int, char *));
void Com_EndRedirect(void);
void Com_Printf(char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
void Com_DPrintf(char *fmt, ...) __attribute__ ((format (printf, 1, 2)));