astyle again.

This commit is contained in:
Felix Wallin 2010-09-26 19:50:50 +02:00
parent 9707323109
commit 2d5558491f
3 changed files with 97 additions and 97 deletions

View File

@ -1710,14 +1710,14 @@ void draw_parts(pixel *vid)
blendpixel(vid, nx-1, ny, GR, GR, GR, 223); 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, 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);
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); uint8 GR = 0x3B+(parts[i].life*19);
vid[ny*(XRES+BARSIZE)+nx] = PIXRGB(GR, GR, 10); 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-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, 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);
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); uint8 GR = 0x3B+(parts[i].life*19);
vid[ny*(XRES+BARSIZE)+nx] = PIXRGB(GR, 10, 10); 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-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, 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);
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; float ttemp = (float)parts[i].life;
int caddress = restrict_flt(restrict_flt(ttemp, 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3); int caddress = restrict_flt(restrict_flt(ttemp, 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3);

178
powder.c
View File

@ -1364,76 +1364,76 @@ void update_particles_i(pixel *vid, int start, int inc)
} }
} }
} }
else if(t==PT_PCLN) else if(t==PT_PCLN)
{ {
for(nx=-2; nx<3; nx++) for(nx=-2; nx<3; nx++)
for(ny=-2; ny<3; ny++) for(ny=-2; ny<3; ny++)
if(x+nx>=0 && y+ny>0 && if(x+nx>=0 && y+ny>0 &&
x+nx<XRES && y+ny<YRES && (nx || ny)) x+nx<XRES && y+ny<YRES && (nx || ny))
{ {
r = pmap[y+ny][x+nx]; r = pmap[y+ny][x+nx];
if((r>>8)>=NPART || !r) if((r>>8)>=NPART || !r)
continue; continue;
rt = parts[r>>8].type; rt = parts[r>>8].type;
if(rt==PT_SPRK) if(rt==PT_SPRK)
{ {
if(parts[r>>8].ctype==PT_PSCN) if(parts[r>>8].ctype==PT_PSCN)
{ {
parts[i].life = 10; parts[i].life = 10;
} }
else if(parts[r>>8].ctype==PT_NSCN) else if(parts[r>>8].ctype==PT_NSCN)
{ {
parts[i].life = 9; parts[i].life = 9;
} }
} }
if(rt==PT_PCLN) if(rt==PT_PCLN)
{ {
if(parts[i].life==10&&parts[r>>8].life<10&&parts[r>>8].life>0) if(parts[i].life==10&&parts[r>>8].life<10&&parts[r>>8].life>0)
{ {
parts[i].life = 9; parts[i].life = 9;
} }
else if(parts[i].life==0&&parts[r>>8].life==10) else if(parts[i].life==0&&parts[r>>8].life==10)
{ {
parts[i].life = 10; parts[i].life = 10;
} }
} }
} }
} }
else if(t==PT_HSWC) else if(t==PT_HSWC)
{ {
for(nx=-2; nx<3; nx++) for(nx=-2; nx<3; nx++)
for(ny=-2; ny<3; ny++) for(ny=-2; ny<3; ny++)
if(x+nx>=0 && y+ny>0 && if(x+nx>=0 && y+ny>0 &&
x+nx<XRES && y+ny<YRES && (nx || ny)) x+nx<XRES && y+ny<YRES && (nx || ny))
{ {
r = pmap[y+ny][x+nx]; r = pmap[y+ny][x+nx];
if((r>>8)>=NPART || !r) if((r>>8)>=NPART || !r)
continue; continue;
rt = parts[r>>8].type; rt = parts[r>>8].type;
if(rt==PT_SPRK) if(rt==PT_SPRK)
{ {
if(parts[r>>8].ctype==PT_PSCN) if(parts[r>>8].ctype==PT_PSCN)
{ {
parts[i].life = 10; parts[i].life = 10;
} }
else if(parts[r>>8].ctype==PT_NSCN) else if(parts[r>>8].ctype==PT_NSCN)
{ {
parts[i].life = 9; parts[i].life = 9;
} }
} }
if(rt==PT_HSWC) if(rt==PT_HSWC)
{ {
if(parts[i].life==10&&parts[r>>8].life<10&&parts[r>>8].life>0) if(parts[i].life==10&&parts[r>>8].life<10&&parts[r>>8].life>0)
{ {
parts[i].life = 9; parts[i].life = 9;
} }
else if(parts[i].life==0&&parts[r>>8].life==10) else if(parts[i].life==0&&parts[r>>8].life==10)
{ {
parts[i].life = 10; parts[i].life = 10;
} }
} }
} }
} }
else if(t==PT_AMTR) else if(t==PT_AMTR)
{ {
for(nx=-1; nx<2; nx++) for(nx=-1; nx<2; nx++)
@ -2170,25 +2170,25 @@ killed:
else else
create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype);
} }
if(parts[i].type==PT_PCLN) if(parts[i].type==PT_PCLN)
{ {
if(!parts[i].ctype) if(!parts[i].ctype)
for(nx=-1; nx<2; nx++) for(nx=-1; nx<2; nx++)
for(ny=-1; ny<2; ny++) for(ny=-1; ny<2; ny++)
if(x+nx>=0 && y+ny>0 && if(x+nx>=0 && y+ny>0 &&
x+nx<XRES && y+ny<YRES && x+nx<XRES && y+ny<YRES &&
pmap[y+ny][x+nx] && pmap[y+ny][x+nx] &&
(pmap[y+ny][x+nx]&0xFF)!=PT_CLNE && (pmap[y+ny][x+nx]&0xFF)!=PT_CLNE &&
(pmap[y+ny][x+nx]&0xFF)!=PT_PCLN && (pmap[y+ny][x+nx]&0xFF)!=PT_PCLN &&
(pmap[y+ny][x+nx]&0xFF)!=PT_SPRK && (pmap[y+ny][x+nx]&0xFF)!=PT_SPRK &&
(pmap[y+ny][x+nx]&0xFF)!=PT_NSCN && (pmap[y+ny][x+nx]&0xFF)!=PT_NSCN &&
(pmap[y+ny][x+nx]&0xFF)!=PT_PSCN && (pmap[y+ny][x+nx]&0xFF)!=PT_PSCN &&
(pmap[y+ny][x+nx]&0xFF)!=PT_STKM && (pmap[y+ny][x+nx]&0xFF)!=PT_STKM &&
(pmap[y+ny][x+nx]&0xFF)!=0xFF) (pmap[y+ny][x+nx]&0xFF)!=0xFF)
parts[i].ctype = pmap[y+ny][x+nx]&0xFF; parts[i].ctype = pmap[y+ny][x+nx]&0xFF;
if(parts[i].ctype && parts[i].life==10) if(parts[i].ctype && parts[i].life==10)
create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype);
} }
if(t==PT_YEST) if(t==PT_YEST)
{ {
if(parts[i].temp>303&&parts[i].temp<317) { if(parts[i].temp>303&&parts[i].temp<317) {

View File

@ -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."}, {"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."}, {"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"}, {"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."}, {"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"}, {"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 //Name Colour Advec Airdrag Airloss Loss Collid Grav Diffus Hotair Fal Burn Exp Mel Hrd M Section H Ins(real world, by triclops200) Description
}; };