summaryrefslogtreecommitdiff
path: root/src/graphics.c
diff options
context:
space:
mode:
authorCracker64 <cracker642@gmail.com>2010-12-10 19:05:06 (GMT)
committer Cracker64 <cracker642@gmail.com>2010-12-10 19:05:06 (GMT)
commit95c4e49f53cc5da31a3bfef3e3ee957b824e08d6 (patch)
tree987fc5c09da1c9ffb81c823db3002893b768313a /src/graphics.c
parentd017764fbef66fffa058a79d0e3d569f75121a1e (diff)
downloadpowder-95c4e49f53cc5da31a3bfef3e3ee957b824e08d6.zip
powder-95c4e49f53cc5da31a3bfef3e3ee957b824e08d6.tar.gz
Lots of small changes/fixes mentioned in my mod post.
Diffstat (limited to 'src/graphics.c')
-rw-r--r--src/graphics.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/graphics.c b/src/graphics.c
index 9b89f79..90a1438 100644
--- a/src/graphics.c
+++ b/src/graphics.c
@@ -1402,7 +1402,7 @@ void draw_parts(pixel *vid)
isplayer = 1; //It's a secret. Tssss...
}
- if(cmode==CM_NOTHING && t!=PT_PIPE && t!=PT_SWCH && t!=PT_LCRY && t!=PT_PUMP && t!=PT_FILT)//nothing display but show needed color changes
+ if(cmode==CM_NOTHING && t!=PT_PIPE && t!=PT_SWCH && t!=PT_LCRY && t!=PT_PUMP && t!=PT_FILT && t!=PT_HSWC && t!=PT_PCLN && t!=PT_DEUT && t!=PT_WIFI)//nothing display but show needed color changes
{
if(t==PT_PHOT)
{
@@ -1587,12 +1587,23 @@ void draw_parts(pixel *vid)
}
else if(t==PT_WIFI)
{
- float frequency = 0.25;
+ float frequency = 0.0628;
int q = parts[i].tmp;
cr = sin(frequency*q + 0) * 127 + 128;
cg = sin(frequency*q + 2) * 127 + 128;
cb = sin(frequency*q + 4) * 127 + 128;
- blendpixel(vid, nx, ny, cr, cg, cb, 255);
+ blendpixel(vid, nx, ny, cr, cg, cb, 255);
+ if(mousex==(nx) && mousey==(ny))
+ {
+ int z;
+ for(z = 0; z<NPART; z++) {
+ if(parts[z].type)
+ {
+ if(parts[z].type==PT_WIFI&&parts[z].tmp==parts[i].tmp)
+ xor_line(nx,ny,(int)(parts[z].x+0.5f),(int)(parts[z].y+0.5f),vid);
+ }
+ }
+ }
}
else if(t==PT_PIPE)
{
@@ -2859,7 +2870,7 @@ pixel *prerender_save(void *save, int size, int *width, int *height)
if(!(j%2) && !(i%2))
fb[(ry+j)*w+(rx+i)] = PIXPACK(0xC0C0C0);
break;
- case WL_STREAM:
+ case WL_FAN:
for(j=0; j<CELL; j+=2)
for(i=(j>>1)&1; i<CELL; i+=2)
fb[(ry+j)*w+(rx+i)] = PIXPACK(0x8080FF);