mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
Little different shape of particle
This commit is contained in:
parent
14c934762d
commit
23d25db601
3 changed files with 12 additions and 6 deletions
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)));
|
||||
|
|
Loading…
Reference in a new issue