Made it go faster, once per frame, and cool heat colors.

This commit is contained in:
Philip 2010-11-05 01:22:43 -04:00
parent 4ed5b47bff
commit 068076a4ae
4 changed files with 11 additions and 4 deletions

View File

@ -106,6 +106,7 @@ typedef struct stamp stamp;
int MSIGN;
int NGOL;
int CGOL;
int GSPEED;
int gol[XRES][YRES];
extern sign signs[MAXSIGNS];
extern stamp stamps[STAMP_MAX];

View File

@ -285,7 +285,7 @@ static const part_type ptypes[PT_NUM] =
{"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, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Heat switch. Conducts Heat only when activated", TYPE_SOLID},
{"IRON", PIXPACK(0x707070), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 50, 0, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "Rusts with salt, can be used for electrlosis of WATR", TYPE_SOLID},
{"MORT", PIXPACK(0xE0E0E0), 0.0f, 0.00f * CFDS, 1.00f, 1.00f, -0.99f, 0.0f, 0.01f, 0.002f * CFDS, 0, 0, 0, 0, 0, 0, -1, SC_NUCLEAR, R_TEMP+4.0f +273.15f, 60, "Steam Train.", TYPE_PART},
{"GOL", PIXPACK(0x0CAC00), 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_SPECIAL, R_TEMP+0.0f +273.15f, 0, "Game Of Life!", TYPE_SOLID},
{"GOL", PIXPACK(0x0CAC00), 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_SPECIAL, 9000.0f, 0, "Game Of Life!", 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
};

View File

@ -104,6 +104,7 @@ int FPSB = 0;
int MSIGN =-1;
int NGOL = 0;
int CGOL = 0;
int GSPEED = 1;
sign signs[MAXSIGNS];

View File

@ -824,7 +824,7 @@ void update_particles_i(pixel *vid, int start, int inc)
int starti = (start*-1);
if(sys_pause&&!framerender)
return;
if(CGOL>=8)
if(CGOL>=GSPEED)
{
CGOL = 0;
create_part(-1,0,0,PT_GOL);
@ -862,7 +862,7 @@ void update_particles_i(pixel *vid, int start, int inc)
for(nx=0;nx<XRES;nx++)
for(ny=0;ny<YRES;ny++){
r = pmap[ny][nx];
if(gol[nx][ny]>=5){
if(gol[nx][ny]>=5&&(parts[r>>8].type==PT_NONE||parts[r>>8].type==PT_GOL)){
parts[r>>8].type=PT_NONE;
}
else if(gol[nx][ny]==3){
@ -871,7 +871,7 @@ void update_particles_i(pixel *vid, int start, int inc)
else if(gol[nx][ny]==2&&parts[r>>8].type==PT_GOL){
parts[r>>8].type=PT_NONE;
}
else if(gol[nx][ny]==1){
else if(gol[nx][ny]==1&&(parts[r>>8].type==PT_NONE||parts[r>>8].type==PT_GOL)){
parts[r>>8].type=PT_NONE;
}
gol[nx][ny]=0;
@ -1843,6 +1843,11 @@ void update_particles_i(pixel *vid, int start, int inc)
else if(t==PT_MORT) {
create_part(-1, x, y-1, PT_SMKE);
}
else if(t==PT_GOL)
{
if(parts[i].temp>0)
parts[i].temp -= 50.0f;
}
else if(t==PT_LCRY)
{
for(nx=-1; nx<2; nx++)