diff options
| author | Philip <philip@philip-linuxlaptop.(none)> | 2010-11-06 23:03:35 (GMT) |
|---|---|---|
| committer | Philip <philip@philip-linuxlaptop.(none)> | 2010-11-06 23:03:35 (GMT) |
| commit | 75922ae31df9df98f258cf2a5995524b3e4fc63b (patch) | |
| tree | e54c1cedbc069991fe1ba6e2be68ae721e2c1caa /src | |
| parent | a2c8443c369daaa693e7a820500465acd8334df9 (diff) | |
| download | powder-75922ae31df9df98f258cf2a5995524b3e4fc63b.zip powder-75922ae31df9df98f258cf2a5995524b3e4fc63b.tar.gz | |
added Day&Night life particles
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.c | 2 | ||||
| -rw-r--r-- | src/powder.c | 35 |
2 files changed, 36 insertions, 1 deletions
@@ -528,6 +528,8 @@ int parse_save(void *save, int size, int replace, int x0, int y0) gol[x][y] = 3; if(j == PT_2x2) gol[x][y] = 4; + if(j == PT_DANI) + gol[x][y] = 5; if(j == PT_PHOT) parts[k].ctype = 0x3fffffff; parts[k].x = (float)x; diff --git a/src/powder.c b/src/powder.c index daaef91..9486299 100644 --- a/src/powder.c +++ b/src/powder.c @@ -850,7 +850,11 @@ void update_particles_i(pixel *vid, int start, int inc) else if(parts[r>>8].type==PT_2x2) { gol[nx][ny] = 4; - } + } + else if(parts[r>>8].type==PT_DANI) + { + gol[nx][ny] = 5; + } } for(nx=4;nx<XRES-4;nx++) for(ny=4;ny<YRES-4;ny++) @@ -904,7 +908,12 @@ void update_particles_i(pixel *vid, int start, int inc) else if(v==3&&gol[nx][ny]==0&&gol2[nx][ny][4]>=2) { create_part(-1,nx,ny,PT_2x2); + } + else if(v==3&&gol[nx][ny]==0&&gol2[nx][ny][5]>=2) + { + create_part(-1,nx,ny,PT_DANI); } + else if(v==3&&gol[nx][ny]==0&&gol2[nx][ny][1]==1) { create_part(-1,nx,ny,PT_GOL); @@ -913,6 +922,10 @@ void update_particles_i(pixel *vid, int start, int inc) { create_part(-1,nx,ny,PT_HLIF); } + else if(v==3&&gol[nx][ny]==0&&gol2[nx][ny][4]==1) + { + create_part(-1,nx,ny,PT_2x2); + } else if(v==4&&gol[nx][ny]==0&&gol2[nx][ny][3]>=2) { @@ -931,6 +944,20 @@ void update_particles_i(pixel *vid, int start, int inc) { create_part(-1,nx,ny,PT_2x2); } + else if(v==6&&gol[nx][ny]==0&&gol2[nx][ny][5]>=3) + { + create_part(-1,nx,ny,PT_DANI); + } + + else if(v==7&&gol[nx][ny]==0&&gol2[nx][ny][5]>=4) + { + create_part(-1,nx,ny,PT_DANI); + } + + else if(v==8&&gol[nx][ny]==0&&gol2[nx][ny][5]>=4) + { + create_part(-1,nx,ny,PT_DANI); + } else if(v>=5&&gol[nx][ny]==1) parts[r>>8].type = PT_NONE; @@ -957,10 +984,16 @@ void update_particles_i(pixel *vid, int start, int inc) else if(v<=1&&gol[nx][ny]==4) parts[r>>8].type = PT_NONE; + else if(v==6&&gol[nx][ny]==5) + parts[r>>8].type = PT_NONE; + else if(v<=3&&gol[nx][ny]==5) + parts[r>>8].type = PT_NONE; + gol2[nx][ny][1]=0; gol2[nx][ny][2]=0; gol2[nx][ny][3]=0; gol2[nx][ny][4]=0; + gol2[nx][ny][5]=0; } CGOL++; for(i=start; i<(NPART-starti); i+=inc) |
