wifi/portal lines
This commit is contained in:
parent
4fcfb05f25
commit
a27d97124c
@ -25,6 +25,7 @@
|
|||||||
#define EFFECT 0xFF000000
|
#define EFFECT 0xFF000000
|
||||||
#define EFFECT_GRAVIN 0x01000000
|
#define EFFECT_GRAVIN 0x01000000
|
||||||
#define EFFECT_GRAVOUT 0x02000000
|
#define EFFECT_GRAVOUT 0x02000000
|
||||||
|
#define EFFECT_LINES 0x04000000
|
||||||
|
|
||||||
#define RENDER_EFFE OPTIONS | PSPEC_STICKMAN | EFFECT | PMODE_SPARK | PMODE_FLARE | PMODE_LFLARE
|
#define RENDER_EFFE OPTIONS | PSPEC_STICKMAN | EFFECT | PMODE_SPARK | PMODE_FLARE | PMODE_LFLARE
|
||||||
#define RENDER_FIRE OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_ADD | PMODE_BLEND | FIREMODE
|
#define RENDER_FIRE OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_ADD | PMODE_BLEND | FIREMODE
|
||||||
|
@ -164,6 +164,7 @@ int graphics_WIFI(GRAPHICS_FUNC_ARGS)
|
|||||||
*colr = sin(frequency*q + 0) * 127 + 128;
|
*colr = sin(frequency*q + 0) * 127 + 128;
|
||||||
*colg = sin(frequency*q + 2) * 127 + 128;
|
*colg = sin(frequency*q + 2) * 127 + 128;
|
||||||
*colb = sin(frequency*q + 4) * 127 + 128;
|
*colb = sin(frequency*q + 4) * 127 + 128;
|
||||||
|
*pixel_mode |= EFFECT_LINES;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
int graphics_PRTI(GRAPHICS_FUNC_ARGS)
|
int graphics_PRTI(GRAPHICS_FUNC_ARGS)
|
||||||
@ -173,6 +174,7 @@ int graphics_PRTI(GRAPHICS_FUNC_ARGS)
|
|||||||
*fireg = 0;
|
*fireg = 0;
|
||||||
*fireb = 0;
|
*fireb = 0;
|
||||||
*pixel_mode |= EFFECT_GRAVIN;
|
*pixel_mode |= EFFECT_GRAVIN;
|
||||||
|
*pixel_mode |= EFFECT_LINES;
|
||||||
*pixel_mode &= ~PMODE;
|
*pixel_mode &= ~PMODE;
|
||||||
*pixel_mode |= PMODE_ADD;
|
*pixel_mode |= PMODE_ADD;
|
||||||
return 1;
|
return 1;
|
||||||
@ -184,6 +186,7 @@ int graphics_PRTO(GRAPHICS_FUNC_ARGS)
|
|||||||
*fireg = 0;
|
*fireg = 0;
|
||||||
*fireb = 255;
|
*fireb = 255;
|
||||||
*pixel_mode |= EFFECT_GRAVOUT;
|
*pixel_mode |= EFFECT_GRAVOUT;
|
||||||
|
*pixel_mode |= EFFECT_LINES;
|
||||||
*pixel_mode &= ~PMODE;
|
*pixel_mode &= ~PMODE;
|
||||||
*pixel_mode |= PMODE_ADD;
|
*pixel_mode |= PMODE_ADD;
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -2428,6 +2428,25 @@ void render_parts(pixel *vid)
|
|||||||
addpixel(vid, nx+nxo, ny+nyo, colr, colg, colb, 255-orbd[r]);
|
addpixel(vid, nx+nxo, ny+nyo, colr, colg, colb, 255-orbd[r]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ((pixel_mode & EFFECT_LINES) && DEBUG_MODE)
|
||||||
|
{
|
||||||
|
if (mousex==(nx) && mousey==(ny))//draw lines connecting wifi/portal channels
|
||||||
|
{
|
||||||
|
int z;
|
||||||
|
int type = parts[i].type;
|
||||||
|
if (type == PT_PRTI)
|
||||||
|
type = PT_PRTO;
|
||||||
|
else if (type == PT_PRTO)
|
||||||
|
type = PT_PRTI;
|
||||||
|
for (z = 0; z<NPART; z++) {
|
||||||
|
if (parts[z].type)
|
||||||
|
{
|
||||||
|
if (parts[z].type==type&&parts[z].tmp==parts[i].tmp)
|
||||||
|
xor_line(nx,ny,(int)(parts[z].x+0.5f),(int)(parts[z].y+0.5f),vid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
//Fire effects
|
//Fire effects
|
||||||
if(firea && (pixel_mode & FIRE_BLEND))
|
if(firea && (pixel_mode & FIRE_BLEND))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user