summaryrefslogtreecommitdiff
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
parent9707323109bb04e78b1e8ed4c317c8c75f5494eb (diff)
downloadpowder-2d5558491fa864f340668df05a7869ca820ddef1.zip
powder-2d5558491fa864f340668df05a7869ca820ddef1.tar.gz
astyle again.
-rw-r--r--graphics.c12
-rw-r--r--powder.c178
-rw-r--r--powder.h4
3 files changed, 97 insertions, 97 deletions
diff --git a/graphics.c b/graphics.c
index 3ea0635..aafe897 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 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) {
diff --git a/powder.h b/powder.h
index 5bca4c7..eda30d2 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
};