diff --git a/graphics.c b/graphics.c index 3ea0635e9..aafe8973d 100644 --- a/graphics.c +++ b/graphics.c @@ -1710,14 +1710,14 @@ void draw_parts(pixel *vid) blendpixel(vid, nx-1, ny, GR, GR, GR, 223); blendpixel(vid, nx, ny+1, GR, GR, GR, 223); blendpixel(vid, nx, ny-1, GR, GR, GR, 223); - + blendpixel(vid, nx+1, ny-1, GR, GR, GR, 112); blendpixel(vid, nx-1, ny-1, GR, GR, GR, 112); blendpixel(vid, nx+1, ny+1, GR, GR, GR, 112); blendpixel(vid, nx-1, ny+1, GR, GR, GR, 112); } } - else if(t==PT_PCLN) + else if(t==PT_PCLN) { uint8 GR = 0x3B+(parts[i].life*19); vid[ny*(XRES+BARSIZE)+nx] = PIXRGB(GR, GR, 10); @@ -1726,14 +1726,14 @@ void draw_parts(pixel *vid) blendpixel(vid, nx-1, ny, GR, GR, 10, 223); blendpixel(vid, nx, ny+1, GR, GR, 10, 223); blendpixel(vid, nx, ny-1, GR, GR, 10, 223); - + blendpixel(vid, nx+1, ny-1, GR, GR, 10, 112); blendpixel(vid, nx-1, ny-1, GR, GR, 10, 112); blendpixel(vid, nx+1, ny+1, GR, GR, 10, 112); blendpixel(vid, nx-1, ny+1, GR, GR, 10, 112); } } - else if(t==PT_HSWC) + else if(t==PT_HSWC) { uint8 GR = 0x3B+(parts[i].life*19); vid[ny*(XRES+BARSIZE)+nx] = PIXRGB(GR, 10, 10); @@ -1742,14 +1742,14 @@ void draw_parts(pixel *vid) blendpixel(vid, nx-1, ny, GR, 10, 10, 223); blendpixel(vid, nx, ny+1, GR, 10, 10, 223); blendpixel(vid, nx, ny-1, GR, 10, 10, 223); - + blendpixel(vid, nx+1, ny-1, GR, 10, 10, 112); blendpixel(vid, nx-1, ny-1, GR, 10, 10, 112); blendpixel(vid, nx+1, ny+1, GR, 10, 10, 112); blendpixel(vid, nx-1, ny+1, GR, 10, 10, 112); } } - else if(t==PT_PLSM) + else if(t==PT_PLSM) { float ttemp = (float)parts[i].life; int caddress = restrict_flt(restrict_flt(ttemp, 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3); diff --git a/powder.c b/powder.c index 5438c6bd6..b62a68ace 100644 --- a/powder.c +++ b/powder.c @@ -1364,76 +1364,76 @@ void update_particles_i(pixel *vid, int start, int inc) } } } - else if(t==PT_PCLN) - { - for(nx=-2; nx<3; nx++) - for(ny=-2; ny<3; ny++) - if(x+nx>=0 && y+ny>0 && - x+nx>8)>=NPART || !r) - continue; - rt = parts[r>>8].type; - if(rt==PT_SPRK) - { - if(parts[r>>8].ctype==PT_PSCN) - { - parts[i].life = 10; - } - else if(parts[r>>8].ctype==PT_NSCN) - { - parts[i].life = 9; - } - } - if(rt==PT_PCLN) - { - if(parts[i].life==10&&parts[r>>8].life<10&&parts[r>>8].life>0) - { - parts[i].life = 9; - } - else if(parts[i].life==0&&parts[r>>8].life==10) - { - parts[i].life = 10; - } - } - } - } - else if(t==PT_HSWC) - { - for(nx=-2; nx<3; nx++) - for(ny=-2; ny<3; ny++) - if(x+nx>=0 && y+ny>0 && - x+nx>8)>=NPART || !r) - continue; - rt = parts[r>>8].type; - if(rt==PT_SPRK) - { - if(parts[r>>8].ctype==PT_PSCN) - { - parts[i].life = 10; - } - else if(parts[r>>8].ctype==PT_NSCN) - { - parts[i].life = 9; - } - } - if(rt==PT_HSWC) - { - if(parts[i].life==10&&parts[r>>8].life<10&&parts[r>>8].life>0) - { - parts[i].life = 9; - } - else if(parts[i].life==0&&parts[r>>8].life==10) - { - parts[i].life = 10; - } - } - } - } + else if(t==PT_PCLN) + { + for(nx=-2; nx<3; nx++) + for(ny=-2; ny<3; ny++) + if(x+nx>=0 && y+ny>0 && + x+nx>8)>=NPART || !r) + continue; + rt = parts[r>>8].type; + if(rt==PT_SPRK) + { + if(parts[r>>8].ctype==PT_PSCN) + { + parts[i].life = 10; + } + else if(parts[r>>8].ctype==PT_NSCN) + { + parts[i].life = 9; + } + } + if(rt==PT_PCLN) + { + if(parts[i].life==10&&parts[r>>8].life<10&&parts[r>>8].life>0) + { + parts[i].life = 9; + } + else if(parts[i].life==0&&parts[r>>8].life==10) + { + parts[i].life = 10; + } + } + } + } + else if(t==PT_HSWC) + { + for(nx=-2; nx<3; nx++) + for(ny=-2; ny<3; ny++) + if(x+nx>=0 && y+ny>0 && + x+nx>8)>=NPART || !r) + continue; + rt = parts[r>>8].type; + if(rt==PT_SPRK) + { + if(parts[r>>8].ctype==PT_PSCN) + { + parts[i].life = 10; + } + else if(parts[r>>8].ctype==PT_NSCN) + { + parts[i].life = 9; + } + } + if(rt==PT_HSWC) + { + if(parts[i].life==10&&parts[r>>8].life<10&&parts[r>>8].life>0) + { + parts[i].life = 9; + } + else if(parts[i].life==0&&parts[r>>8].life==10) + { + parts[i].life = 10; + } + } + } + } else if(t==PT_AMTR) { for(nx=-1; nx<2; nx++) @@ -2170,25 +2170,25 @@ killed: else create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); } - if(parts[i].type==PT_PCLN) - { - if(!parts[i].ctype) - for(nx=-1; nx<2; nx++) - for(ny=-1; ny<2; ny++) - if(x+nx>=0 && y+ny>0 && - x+nx=0 && y+ny>0 && + x+nx303&&parts[i].temp<317) { diff --git a/powder.h b/powder.h index 5bca4c71f..eda30d2ca 100644 --- a/powder.h +++ b/powder.h @@ -264,8 +264,8 @@ static const part_type ptypes[PT_NUM] = {"FUSE", PIXPACK(0x0A5706), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.0f, 0.0f * CFDS, 0, 0, 0, 0, 20, 1, SC_SOLIDS, R_TEMP+0.0f +273.15f, 200, "Solid. Burns slowly. Ignites at somewhat high temperatures and electricity."}, {"FSEP", PIXPACK(0x63AD5F), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 30, 1, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Fuse Powder. See FUSE."}, {"AMTR", PIXPACK(0x808080), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.00f, 0.10f, 1.00f, 0.0000f * CFDS, 0, 0, 0, 0, 0, 1, SC_NUCLEAR, R_TEMP+0.0f +273.15f, 70, "Anti-Matter, Destroys a majority of particles"}, - {"PCLN", PIXPACK(0x3B3B10), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Solid. When actived, duplicates any particles it touches."}, - {"HSWC", PIXPACK(0x3B1010), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Heat switch. Conducts Heat only when activated"}, + {"PCLN", PIXPACK(0x3B3B10), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Solid. When actived, duplicates any particles it touches."}, + {"HSWC", PIXPACK(0x3B1010), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Heat switch. Conducts Heat only when activated"}, //Name Colour Advec Airdrag Airloss Loss Collid Grav Diffus Hotair Fal Burn Exp Mel Hrd M Section H Ins(real world, by triclops200) Description };