atzensty... astyle

This commit is contained in:
Felix Wallin 2010-09-26 14:00:15 +02:00
parent 26c67a303e
commit 0424907d28
3 changed files with 155 additions and 155 deletions

View File

@ -2034,7 +2034,7 @@ int search_ui(pixel *vid_buf)
if(!search_dates[pos] && own)
{
fillrect(vid_buf, gx-5, gy+YRES/GRID_S-3, 7, 8, 255, 255, 255, 255);
if(dap == pos){
if(dap == pos) {
drawtext(vid_buf, gx-6, gy+YRES/GRID_S-4, "\xA6", 200, 100, 80, 255);
} else {
drawtext(vid_buf, gx-6, gy+YRES/GRID_S-4, "\xA6", 160, 70, 50, 255);

View File

@ -239,7 +239,7 @@ inline int create_part(int p, int x, int y, int t)
parts[i].life = 150;
}
End Testing*/
if(t==PT_FUSE){
if(t==PT_FUSE) {
parts[i].life = 50;
parts[i].tmp = 50;
}
@ -1030,7 +1030,7 @@ void update_particles_i(pixel *vid, int start, int inc)
}
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)){
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;
@ -1393,8 +1393,8 @@ void update_particles_i(pixel *vid, int start, int inc)
}
}
}
else if(t==PT_FIRW){
if(parts[i].tmp==0){
else if(t==PT_FIRW) {
if(parts[i].tmp==0) {
for(nx=-1; nx<2; nx++)
for(ny=-1; ny<2; ny++)
if(x+nx>=0 && y+ny>0 &&
@ -1411,22 +1411,22 @@ void update_particles_i(pixel *vid, int start, int inc)
}
}
}
else if(parts[i].tmp==1){
if(parts[i].life==0){
else if(parts[i].tmp==1) {
if(parts[i].life==0) {
parts[i].tmp=2;
} else {
float newVel = parts[i].life/50;
parts[i].flags = parts[i].flags&0xFFFFFFFE;
if((pmap[(int)(ly-newVel)][(int)lx]&0xFF)==PT_NONE){
if((pmap[(int)(ly-newVel)][(int)lx]&0xFF)==PT_NONE) {
parts[i].vy = -newVel;
ly-=newVel;
iy-=newVel;
}
}
}
else if(parts[i].tmp==2){
for(nx=-2; nx<3; nx++){
for(ny=-2; ny<3; ny++){
else if(parts[i].tmp==2) {
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))
{
int tmul = rand()%7;
@ -1434,7 +1434,7 @@ void update_particles_i(pixel *vid, int start, int inc)
r = pmap[y+ny][x+nx];
if((r>>8)>=NPART || !r)
continue;
if(parts[r>>8].type==PT_FIRW){
if(parts[r>>8].type==PT_FIRW) {
parts[r>>8].vx = (rand()%3-1)*tmul;
parts[r>>8].vy = (rand()%3-1)*tmul;
parts[r>>8].tmp = 3;
@ -1446,8 +1446,8 @@ void update_particles_i(pixel *vid, int start, int inc)
}
pv[y/CELL][x/CELL] += 20;
kill_part(i);
} else if(parts[i].tmp==3){
if(parts[i].life<=0){
} else if(parts[i].tmp==3) {
if(parts[i].life<=0) {
kill_part(i);
}
}

0
powder.h Executable file → Normal file
View File