First release of the mod

This commit is contained in:
Philip 2010-11-12 12:46:02 -05:00
parent 383b2ad709
commit ebcded767e
4 changed files with 60 additions and 7 deletions

View File

@ -129,7 +129,9 @@
#define PT_LLIF 88 #define PT_LLIF 88
#define PT_STAN 89 #define PT_STAN 89
#define PT_CRAC 90 #define PT_CRAC 90
#define PT_NUM 91 #define PT_RIME 91
#define PT_FOG 92
#define PT_NUM 93
#define R_TEMP 22 #define R_TEMP 22
#define MAX_TEMP 9999 #define MAX_TEMP 9999
@ -311,6 +313,8 @@ static const part_type ptypes[PT_NUM] =
{"LLIF", PIXPACK(0x505050), 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, "Long Life! (5/345)", TYPE_SOLID}, {"LLIF", PIXPACK(0x505050), 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, "Long Life! (5/345)", TYPE_SOLID},
{"STAN", PIXPACK(0x5000FF), 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, "Stains! (235678/3678)", TYPE_SOLID}, {"STAN", PIXPACK(0x5000FF), 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, "Stains! (235678/3678)", TYPE_SOLID},
{"CRAC", PIXPACK(0xFFBE30), 0.00f, 0.00f * CFDS, 0.00f, 1.00f, 0.00f, 0.0f, 0.00f, 0.000f * CFDS, 0, 20, 0, 1, 30, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "cracker64 - Spongey, Made by himself",TYPE_SOLID}, {"CRAC", PIXPACK(0xFFBE30), 0.00f, 0.00f * CFDS, 0.00f, 1.00f, 0.00f, 0.0f, 0.00f, 0.000f * CFDS, 0, 20, 0, 1, 30, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "cracker64 - Spongey, Made by himself",TYPE_SOLID},
{"RIME", PIXPACK(0xCCCCCC), 0.00f, 0.00f * CFDS, 0.00f, 1.00f, 0.00f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 30, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 100, "from FOG",TYPE_SOLID},
{"FOG", PIXPACK(0xAAAAAA), 0.0f, 0.00f * CFDS, 0.4f, 0.95f, -0.1f, 0.0f, 0.50f, 0.001f * CFDS, 0, 0, 0, 0, 30, 1, 1, SC_GAS, R_TEMP+0.0f +273.15f, 100, "hmmm",TYPE_GAS},
//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 //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
}; };
@ -408,6 +412,8 @@ static part_state pstates[PT_NUM] =
/* GOL */ {ST_NONE, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f}, /* GOL */ {ST_NONE, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
/* GOL */ {ST_NONE, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f}, /* GOL */ {ST_NONE, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
/* Crac */ {ST_SOLID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_FIRE, 22730.0f}, /* Crac */ {ST_SOLID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_FIRE, 22730.0f},
/* RIME */ {ST_SOLID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
/* FOG */ {ST_GAS, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
}; };
static int grule[NGOL][9] = static int grule[NGOL][9] =
{ {

View File

@ -170,7 +170,7 @@ void add_sign_ui(pixel *vid_buf, int mx, int my)
draw_icon(vid_buf, x0+68, y0+42, 0x9E, ju == 1); draw_icon(vid_buf, x0+68, y0+42, 0x9E, ju == 1);
draw_icon(vid_buf, x0+86, y0+42, 0x9F, ju == 2); draw_icon(vid_buf, x0+86, y0+42, 0x9F, ju == 2);
drawrect(vid_buf,x0+104,y0+42,26,15,255,255,255,255);
@ -180,6 +180,8 @@ void add_sign_ui(pixel *vid_buf, int mx, int my)
drawtext(vid_buf, x0+138, y0+45, "\x85", 255, 255, 255, 255); drawtext(vid_buf, x0+138, y0+45, "\x85", 255, 255, 255, 255);
drawtext(vid_buf, x0+152, y0+46, "Delete", 255, 255, 255, 255); drawtext(vid_buf, x0+152, y0+46, "Delete", 255, 255, 255, 255);
drawrect(vid_buf, x0+134, y0+42, 50, 15, 255, 255, 255, 255); drawrect(vid_buf, x0+134, y0+42, 50, 15, 255, 255, 255, 255);
drawrect(vid_buf,x0+104,y0+42,26,15,255,255,255,255);
drawtext(vid_buf, x0+110, y0+48, "Mv.", 255, 255, 255, 255);
} }
drawtext(vid_buf, x0+5, y0+69, "OK", 255, 255, 255, 255); drawtext(vid_buf, x0+5, y0+69, "OK", 255, 255, 255, 255);
@ -196,7 +198,7 @@ void add_sign_ui(pixel *vid_buf, int mx, int my)
if(b && !bq && mx>=x0+86 && mx<=x0+103 && my>=y0+42 && my<=y0+59) if(b && !bq && mx>=x0+86 && mx<=x0+103 && my>=y0+42 && my<=y0+59)
ju = 2; ju = 2;
if(b && !bq && mx>=x0+104 && mx<=x0+130 && my>=y0+42 && my<=y0+59) if(!nm && b && !bq && mx>=x0+104 && mx<=x0+130 && my>=y0+42 && my<=y0+59)
{ {
MSIGN = i; MSIGN = i;
break; break;

View File

@ -102,8 +102,8 @@ int death = 0, framerender = 0;
int amd = 1; int amd = 1;
int FPSB = 0; int FPSB = 0;
int MSIGN =-1; int MSIGN =-1;
int CGOL = 0; //int CGOL = 0;
int GSPEED = 1;//causes my .exe to crash.. //int GSPEED = 1;//causes my .exe to crash..
sign signs[MAXSIGNS]; sign signs[MAXSIGNS];
@ -2064,7 +2064,7 @@ int main(int argc, char *argv[])
if(currentTime-pastFPS>=1000) if(currentTime-pastFPS>=1000)
{ {
#ifdef BETA #ifdef BETA
sprintf(uitext, "Version %d (Beta %d) FPS:%d", SAVE_VERSION, MINOR_VERSION, FPS); sprintf(uitext, "Cracker's Version %d (Beta %d) FPS:%d", SAVE_VERSION, MINOR_VERSION, FPS);
//printf("%s\n", uitext); //printf("%s\n", uitext);
#else #else
sprintf(uitext, "Version %d.%d FPS:%d", SAVE_VERSION, MINOR_VERSION, FPS); sprintf(uitext, "Version %d.%d FPS:%d", SAVE_VERSION, MINOR_VERSION, FPS);

View File

@ -929,7 +929,7 @@ void update_particles_i(pixel *vid, int start, int inc)
{ {
if(!(parts[i].life==10&&(parts[i].type==PT_LCRY||parts[i].type==PT_PCLN||parts[i].type==PT_HSWC))) if(!(parts[i].life==10&&(parts[i].type==PT_LCRY||parts[i].type==PT_PCLN||parts[i].type==PT_HSWC)))
parts[i].life--; parts[i].life--;
if(parts[i].life<=0 && t!=PT_METL && t!=PT_IRON && t!=PT_FIRW && t!=PT_PCLN && t!=PT_HSWC && t!=PT_WATR && t!=PT_RBDM && t!=PT_LRBD && t!=PT_SLTW && t!=PT_BRMT && t!=PT_PSCN && t!=PT_NSCN && t!=PT_NTCT && t!=PT_PTCT && t!=PT_BMTL && t!=PT_SPRK && t!=PT_LAVA && t!=PT_ETRD&&t!=PT_LCRY && t!=PT_INWR && t!=PT_GLOW) if(parts[i].life<=0 && t!=PT_METL && t!=PT_IRON && t!=PT_FIRW && t!=PT_PCLN && t!=PT_HSWC && t!=PT_WATR && t!=PT_RBDM && t!=PT_LRBD && t!=PT_SLTW && t!=PT_BRMT && t!=PT_PSCN && t!=PT_NSCN && t!=PT_NTCT && t!=PT_PTCT && t!=PT_BMTL && t!=PT_SPRK && t!=PT_LAVA && t!=PT_ETRD&&t!=PT_LCRY && t!=PT_INWR && t!=PT_GLOW && t!= PT_FOG)
{ {
kill_part(i); kill_part(i);
continue; continue;
@ -1995,6 +1995,51 @@ void update_particles_i(pixel *vid, int start, int inc)
} }
} }
} }
else if(t==PT_FOG)
{
for(nx=-1; nx<2; nx++)
for(ny=-1; ny<2; 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;
if(pstates[parts[r>>8].type].state==ST_SOLID&&5>=rand()%50&&parts[i].life==0&&!(parts[r>>8].type==PT_CLNE||parts[r>>8].type==PT_PCLN))
{
t = parts[i].type = PT_RIME;
parts[i].vx = 0;
parts[i].vy = 0;
}
if(parts[r>>8].type==PT_SPRK)
{
parts[i].life += rand()%20;
}
}
}
else if(t==PT_RIME)
{
for(nx=-1; nx<2; nx++)
for(ny=-1; ny<2; 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;
rt = parts[r>>8].type;
if(rt==PT_SPRK)
{
t = parts[i].type = PT_FOG;
parts[i].life = rand()%50 + 60;
}
else if(rt==PT_FOG&&parts[r>>8].life>0)
{
t = parts[i].type = PT_FOG;
parts[i].life = parts[r>>8].life/2;
}
}
}
else if(t==PT_LCRY) else if(t==PT_LCRY)
{ {
for(nx=-1; nx<2; nx++) for(nx=-1; nx<2; nx++)