mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-19 06:31:26 +02:00
added Day&Night life particles
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
|
||||
#define THUMB_CACHE_SIZE 256
|
||||
|
||||
#define NGOL 5
|
||||
#define NGOL 6
|
||||
|
||||
#define IMGCONNS 3
|
||||
#define TIMEOUT 100
|
||||
|
@@ -120,7 +120,8 @@
|
||||
#define PT_HLIF 79
|
||||
#define PT_ASIM 80
|
||||
#define PT_2x2 81
|
||||
#define PT_NUM 82
|
||||
#define PT_DANI 82
|
||||
#define PT_NUM 83
|
||||
|
||||
#define R_TEMP 22
|
||||
#define MAX_TEMP 9999
|
||||
@@ -292,6 +293,7 @@ static const part_type ptypes[PT_NUM] =
|
||||
{"HLIF", PIXPACK(0xFF0000), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 100, SC_LIFE, 9000.0f, 40, "High Life! (like GOL)", TYPE_SOLID},
|
||||
{"ASIM", PIXPACK(0x0000FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 100, SC_LIFE, 9000.0f, 40, "Assimilation! (like GOL)", TYPE_SOLID},
|
||||
{"2x2", PIXPACK(0xFFFF00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 100, SC_LIFE, 9000.0f, 40, "2x2! (like GOL)", TYPE_SOLID},
|
||||
{"DANI", PIXPACK(0x00FFFF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 100, SC_LIFE, 9000.0f, 40, "Day and Night! (like GOL)", TYPE_SOLID},
|
||||
//Name Colour Advec Airdrag Airloss Loss Collid Grav Diffus Hotair Fal Burn Exp Mel Hrd M Weights Section H Ins(real world, by triclops200) Description
|
||||
};
|
||||
|
||||
|
@@ -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;
|
||||
|
35
src/powder.c
35
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)
|
||||
|
Reference in New Issue
Block a user