mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-10 18:34:21 +02:00
atzensty... astyle
This commit is contained in:
@@ -2034,7 +2034,7 @@ int search_ui(pixel *vid_buf)
|
|||||||
if(!search_dates[pos] && own)
|
if(!search_dates[pos] && own)
|
||||||
{
|
{
|
||||||
fillrect(vid_buf, gx-5, gy+YRES/GRID_S-3, 7, 8, 255, 255, 255, 255);
|
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);
|
drawtext(vid_buf, gx-6, gy+YRES/GRID_S-4, "\xA6", 200, 100, 80, 255);
|
||||||
} else {
|
} else {
|
||||||
drawtext(vid_buf, gx-6, gy+YRES/GRID_S-4, "\xA6", 160, 70, 50, 255);
|
drawtext(vid_buf, gx-6, gy+YRES/GRID_S-4, "\xA6", 160, 70, 50, 255);
|
||||||
|
26
powder.c
26
powder.c
@@ -239,7 +239,7 @@ inline int create_part(int p, int x, int y, int t)
|
|||||||
parts[i].life = 150;
|
parts[i].life = 150;
|
||||||
}
|
}
|
||||||
End Testing*/
|
End Testing*/
|
||||||
if(t==PT_FUSE){
|
if(t==PT_FUSE) {
|
||||||
parts[i].life = 50;
|
parts[i].life = 50;
|
||||||
parts[i].tmp = 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(nx=-2; nx<3; nx++)
|
||||||
for(ny=-2; ny<3; ny++)
|
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];
|
r = pmap[y+ny][x+nx];
|
||||||
if((r>>8)>=NPART || !r)
|
if((r>>8)>=NPART || !r)
|
||||||
continue;
|
continue;
|
||||||
@@ -1393,8 +1393,8 @@ void update_particles_i(pixel *vid, int start, int inc)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(t==PT_FIRW){
|
else if(t==PT_FIRW) {
|
||||||
if(parts[i].tmp==0){
|
if(parts[i].tmp==0) {
|
||||||
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 &&
|
||||||
@@ -1411,22 +1411,22 @@ void update_particles_i(pixel *vid, int start, int inc)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(parts[i].tmp==1){
|
else if(parts[i].tmp==1) {
|
||||||
if(parts[i].life==0){
|
if(parts[i].life==0) {
|
||||||
parts[i].tmp=2;
|
parts[i].tmp=2;
|
||||||
} else {
|
} else {
|
||||||
float newVel = parts[i].life/50;
|
float newVel = parts[i].life/50;
|
||||||
parts[i].flags = parts[i].flags&0xFFFFFFFE;
|
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;
|
parts[i].vy = -newVel;
|
||||||
ly-=newVel;
|
ly-=newVel;
|
||||||
iy-=newVel;
|
iy-=newVel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(parts[i].tmp==2){
|
else if(parts[i].tmp==2) {
|
||||||
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 && x+nx<XRES && y+ny<YRES && (nx || ny))
|
if(x+nx>=0 && y+ny>0 && x+nx<XRES && y+ny<YRES && (nx || ny))
|
||||||
{
|
{
|
||||||
int tmul = rand()%7;
|
int tmul = rand()%7;
|
||||||
@@ -1434,7 +1434,7 @@ void update_particles_i(pixel *vid, int start, int inc)
|
|||||||
r = pmap[y+ny][x+nx];
|
r = pmap[y+ny][x+nx];
|
||||||
if((r>>8)>=NPART || !r)
|
if((r>>8)>=NPART || !r)
|
||||||
continue;
|
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].vx = (rand()%3-1)*tmul;
|
||||||
parts[r>>8].vy = (rand()%3-1)*tmul;
|
parts[r>>8].vy = (rand()%3-1)*tmul;
|
||||||
parts[r>>8].tmp = 3;
|
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;
|
pv[y/CELL][x/CELL] += 20;
|
||||||
kill_part(i);
|
kill_part(i);
|
||||||
} else if(parts[i].tmp==3){
|
} else if(parts[i].tmp==3) {
|
||||||
if(parts[i].life<=0){
|
if(parts[i].life<=0) {
|
||||||
kill_part(i);
|
kill_part(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user