diff options
| author | Simon <simon@hardwired.org.uk> | 2011-01-08 18:51:22 (GMT) |
|---|---|---|
| committer | Simon <simon@hardwired.org.uk> | 2011-01-08 18:51:22 (GMT) |
| commit | 548d0520185726f916d9ac601177133b7522f1dc (patch) | |
| tree | ca7899aab2f7dbc32618b4aa24c481f5eeccc4f4 /src | |
| parent | ad7dc345d265d7d6182246c04f95960c7b54d302 (diff) | |
| parent | b4fb2bf20a807f4371a6848b3470baf2d5638ccb (diff) | |
| download | powder-548d0520185726f916d9ac601177133b7522f1dc.zip powder-548d0520185726f916d9ac601177133b7522f1dc.tar.gz | |
New Element from cracker - BOYL
Diffstat (limited to 'src')
| -rw-r--r-- | src/powder.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/powder.c b/src/powder.c index c6c90c1..f900846 100644 --- a/src/powder.c +++ b/src/powder.c @@ -1450,6 +1450,27 @@ void update_particles_i(pixel *vid, int start, int inc) pv[y/CELL+1][x/CELL+1] += 0.1f*((parts[i].temp-273.15)-pv[y/CELL+1][x/CELL+1]); } } + else if(t==PT_BOYL) + { + if(pv[y/CELL][x/CELL]<(parts[i].temp/100)) + pv[y/CELL][x/CELL] += 0.001f*((parts[i].temp/100)-pv[y/CELL][x/CELL]); + if(y+CELL<YRES && pv[y/CELL+1][x/CELL]<(parts[i].temp/100)) + pv[y/CELL+1][x/CELL] += 0.001f*((parts[i].temp/100)-pv[y/CELL+1][x/CELL]); + if(x+CELL<XRES) + { + pv[y/CELL][x/CELL+1] += 0.001f*((parts[i].temp/100)-pv[y/CELL][x/CELL+1]); + if(y+CELL<YRES) + pv[y/CELL+1][x/CELL+1] += 0.001f*((parts[i].temp/100)-pv[y/CELL+1][x/CELL+1]); + } + if(y+CELL>0 && pv[y/CELL-1][x/CELL]<(parts[i].temp/100)) + pv[y/CELL-1][x/CELL] += 0.001f*((parts[i].temp/100)-pv[y/CELL-1][x/CELL]); + if(x+CELL>0) + { + pv[y/CELL][x/CELL-1] += 0.001f*((parts[i].temp/100)-pv[y/CELL][x/CELL-1]); + if(y+CELL>0) + pv[y/CELL-1][x/CELL-1] += 0.001f*((parts[i].temp/100)-pv[y/CELL-1][x/CELL-1]); + } + } else if(t==PT_SING) { int singularity = -parts[i].life; @@ -3739,6 +3760,28 @@ void update_particles_i(pixel *vid, int start, int inc) } } } + else if(t==PT_BOYL) + { + for(nx=-1; nx<2; nx++) + for(ny=-1; ny<2; ny++) + if(x+nx>=0 && y+ny>0 && + x+nx<XRES && y+ny<YRES && (nx || ny)) + { + r = pmap[y+ny][x+nx]; + if((r>>8)>=NPART || !r) + continue; + if(parts[r>>8].type==PT_WATR && 1>rand()%30) + { + parts[r>>8].type = PT_FOG; + } + if(parts[r>>8].type==PT_O2 && 1>rand()%9) + { + parts[r>>8].type = PT_NONE; + t = parts[i].type = PT_WATR; + pv[y/CELL][x/CELL] += 4.0; + } + } + } else if(t==PT_FIRW) { if(parts[i].tmp==0) { for(nx=-1; nx<2; nx++) |
