summaryrefslogtreecommitdiff
path: root/powder.c
diff options
context:
space:
mode:
authorFelix Wallin <nibbler.v1@gmail.com>2010-09-26 17:50:50 (GMT)
committer Felix Wallin <nibbler.v1@gmail.com>2010-09-26 17:50:50 (GMT)
commit2d5558491fa864f340668df05a7869ca820ddef1 (patch)
tree89222d3adc345ca3eca7ac0c4403d705af36f13d /powder.c
parent9707323109bb04e78b1e8ed4c317c8c75f5494eb (diff)
downloadpowder-2d5558491fa864f340668df05a7869ca820ddef1.zip
powder-2d5558491fa864f340668df05a7869ca820ddef1.tar.gz
astyle again.
Diffstat (limited to 'powder.c')
-rw-r--r--powder.c178
1 files changed, 89 insertions, 89 deletions
diff --git a/powder.c b/powder.c
index 5438c6b..b62a68a 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<XRES && y+ny<YRES && (nx || ny))
- {
- r = pmap[y+ny][x+nx];
- if((r>>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<XRES && y+ny<YRES && (nx || ny))
- {
- r = pmap[y+ny][x+nx];
- if((r>>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<XRES && y+ny<YRES && (nx || ny))
+ {
+ r = pmap[y+ny][x+nx];
+ if((r>>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<XRES && y+ny<YRES && (nx || ny))
+ {
+ r = pmap[y+ny][x+nx];
+ if((r>>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<XRES && y+ny<YRES &&
- pmap[y+ny][x+nx] &&
- (pmap[y+ny][x+nx]&0xFF)!=PT_CLNE &&
- (pmap[y+ny][x+nx]&0xFF)!=PT_PCLN &&
- (pmap[y+ny][x+nx]&0xFF)!=PT_SPRK &&
- (pmap[y+ny][x+nx]&0xFF)!=PT_NSCN &&
- (pmap[y+ny][x+nx]&0xFF)!=PT_PSCN &&
- (pmap[y+ny][x+nx]&0xFF)!=PT_STKM &&
- (pmap[y+ny][x+nx]&0xFF)!=0xFF)
- parts[i].ctype = pmap[y+ny][x+nx]&0xFF;
- if(parts[i].ctype && parts[i].life==10)
- 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<XRES && y+ny<YRES &&
+ pmap[y+ny][x+nx] &&
+ (pmap[y+ny][x+nx]&0xFF)!=PT_CLNE &&
+ (pmap[y+ny][x+nx]&0xFF)!=PT_PCLN &&
+ (pmap[y+ny][x+nx]&0xFF)!=PT_SPRK &&
+ (pmap[y+ny][x+nx]&0xFF)!=PT_NSCN &&
+ (pmap[y+ny][x+nx]&0xFF)!=PT_PSCN &&
+ (pmap[y+ny][x+nx]&0xFF)!=PT_STKM &&
+ (pmap[y+ny][x+nx]&0xFF)!=0xFF)
+ parts[i].ctype = pmap[y+ny][x+nx]&0xFF;
+ if(parts[i].ctype && parts[i].life==10)
+ create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype);
+ }
if(t==PT_YEST)
{
if(parts[i].temp>303&&parts[i].temp<317) {