Other things overwritten, and changes from jacksonmj

This commit is contained in:
Cracker64 2011-01-28 20:13:29 -05:00
parent 880ed33fc7
commit 964ecf2ecf
4 changed files with 27 additions and 24 deletions

View File

@ -501,7 +501,7 @@ static const part_type ptypes[PT_NUM] =
{"BOMB", PIXPACK(0xFFF288), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 20, 1, 30, SC_EXPLOSIVE, R_TEMP-2.0f +273.15f, 29, "Bomb.", ST_NONE, TYPE_PART, &update_BOMB},
{"C-5", PIXPACK(0x2050E0), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Cold explosive", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE, &update_C5},
{"SING", PIXPACK(0x242424), 0.7f, 0.36f * CFDS, 0.96f, 0.80f, 0.1f, 0.12f, 0.00f, -0.001f * CFDS, 1, 0, 0, 0, 0, 1, 86, SC_NUCLEAR, R_TEMP+0.0f +273.15f, 70, "Singularity", ST_SOLID, TYPE_PART, &update_SING},
{"QRTZ", PIXPACK(0xAADDDD), 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_SOLIDS, R_TEMP+0.0f +273.15f, 3, "Quartz, breakable mineral. Conducts but becomes brittle at lower temperatures.", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_HOT_GLOW, &update_QRTZ},
{"QRTZ", PIXPACK(0xAADDDD), 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_SOLIDS, R_TEMP+0.0f +273.15f, 3, "Quartz, breakable mineral. Conducts but becomes brittle at lower temperatures.", ST_SOLID, TYPE_SOLID|PROP_HOT_GLOW, &update_QRTZ},
{"PQRT", PIXPACK(0x88BBBB), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.27f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 0, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 3, "Broken quartz.", ST_SOLID, TYPE_PART| PROP_HOT_GLOW, NULL},
{"SEED", PIXPACK(0xFBEC7D), 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, "B2/S", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL},
{"MAZE", PIXPACK(0xA8E4A0), 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, "B3/S12345", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL},
@ -805,7 +805,7 @@ static void create_gain_photon(int pp);
void kill_part(int i);
#if defined(WIN32) && !defined(__GNUC__)
extern _inline void part_change_type(int n, int x, int y, int t);
extern _inline void part_change_type(int i, int x, int y, int t);
#else
extern inline void part_change_type(int i, int x, int y, int t);
#endif

View File

@ -5,7 +5,7 @@ int update_SPRK(UPDATE_FUNC_ARGS) {
int r, rx, ry, rt, conduct_sprk, nearp, pavg, ct = parts[i].ctype;
if (parts[i].life<=0)
{
if (ct==PT_WATR||ct==PT_SLTW||ct==PT_PSCN||ct==PT_NSCN||ct==PT_ETRD)
if (ct==PT_WATR||ct==PT_SLTW||ct==PT_PSCN||ct==PT_NSCN||ct==PT_ETRD||ct==PT_INWR)
parts[i].temp = R_TEMP + 273.15f;
if (!ct)
ct = PT_METL;

View File

@ -1495,13 +1495,25 @@ int main(int argc, char *argv[])
if (sdl_key=='=')
{
int nx, ny;
for (nx = 0; nx<XRES/CELL; nx++)
for (ny = 0; ny<YRES/CELL; ny++)
{
pv[ny][nx] = 0;
vx[ny][nx] = 0;
vy[ny][nx] = 0;
}
if(sdl_mod & (KMOD_CTRL))
{
for(i=0; i<NPART; i++)
if(parts[i].type==PT_SPRK)
{
parts[i].type = parts[i].ctype;
parts[i].life = 0;
}
}
else
{
for (nx = 0; nx<XRES/CELL; nx++)
for (ny = 0; ny<YRES/CELL; ny++)
{
pv[ny][nx] = 0;
vx[ny][nx] = 0;
vy[ny][nx] = 0;
}
}
}
if (sdl_key=='w' && (!isplayer2 || (sdl_mod & (KMOD_SHIFT)))) //Gravity, by Moach
@ -2036,7 +2048,6 @@ int main(int argc, char *argv[])
memset(bmap, 0, sizeof(bmap));
memset(emap, 0, sizeof(emap));
memset(parts, 0, sizeof(particle)*NPART);
memset(photons, 0, sizeof(photons));
memset(wireless, 0, sizeof(wireless));
memset(gol2, 0, sizeof(gol2));
@ -2098,10 +2109,6 @@ int main(int argc, char *argv[])
if (x>=19 && x<=35 && svf_last && svf_open && !bq) {
//int tpval = sys_pause;
parse_save(svf_last, svf_lsize, 1, 0, 0);
for (j= 0; j<99; j++) { //reset wifi on reload
wireless[j][0] = 0;
wireless[j][1] = 0;
}
//sys_pause = tpval;
}
if (x>=(XRES+BARSIZE-(510-476)) && x<=(XRES+BARSIZE-(510-491)) && !bq)

View File

@ -450,7 +450,7 @@ void kill_part(int i)
}
#if defined(WIN32) && !defined(__GNUC__)
_inline void part_change_type(int n, int x, int y, int t)
_inline void part_change_type(int i, int x, int y, int t)
#else
inline void part_change_type(int i, int x, int y, int t)
#endif
@ -465,7 +465,7 @@ inline void part_change_type(int i, int x, int y, int t)
}
#if defined(WIN32) && !defined(__GNUC__)
_inline int create_n_parts(int n, int x, int y, int t)
_inline int create_n_parts(int n, int x, int y, float vx, float vy, int t)
#else
inline int create_n_parts(int n, int x, int y, float vx, float vy, int t)
#endif
@ -577,8 +577,7 @@ inline int create_part(int p, int x, int y, int t)
if (t==PT_SPRK)
{
if (!((pmap[y][x]&0xFF)==PT_INST||(ptypes[pmap[y][x]&0xFF].properties&PROP_CONDUCTS))
|| (pmap[y][x]&0xFF)==PT_QRTZ)
if (!((pmap[y][x]&0xFF)==PT_INST||(ptypes[pmap[y][x]&0xFF].properties&PROP_CONDUCTS)))
return -1;
if (parts[pmap[y][x]>>8].life!=0)
return -1;
@ -604,8 +603,6 @@ inline int create_part(int p, int x, int y, int t)
}
}
}
if (photons[y][x] && t==PT_PHOT)
return -1;
if (pfree == -1)
return -1;
i = pfree;
@ -973,7 +970,6 @@ inline void delete_part(int x, int y)
}
else
return;
}
#if defined(WIN32) && !defined(__GNUC__)
@ -1134,7 +1130,7 @@ void update_particles_i(pixel *vid, int start, int inc)
float mv, dx, dy, ix, iy, lx, ly, nrx, nry, dp;
int fin_x, fin_y, clear_x, clear_y;
float fin_xf, fin_yf, clear_xf, clear_yf;
float nn, ct1, ct2;
float nn, ct1, ct2, swappage;
float pt = R_TEMP;
float c_heat = 0.0f;
int h_count = 0;
@ -1489,7 +1485,6 @@ void update_particles_i(pixel *vid, int start, int inc)
if (!legacy_enable)
{
if (y-2 >= 0 && y-2 < YRES && (ptypes[t].properties&TYPE_LIQUID)) {
float swappage;
r = pmap[y-2][x];
if (!((r>>8)>=NPART || !r || parts[i].type != (r&0xFF))) {
if (parts[i].temp>parts[r>>8].temp) {
@ -1561,6 +1556,7 @@ void update_particles_i(pixel *vid, int start, int inc)
if (parts[i].ctype&&parts[i].ctype!=PT_LAVA) {
if (ptransitions[parts[i].ctype].tht==PT_LAVA&&pt>=ptransitions[parts[i].ctype].thv) s = 0;
else if (parts[i].ctype==PT_THRM&&pt>=ptransitions[PT_BMTL].thv) s = 0;
else if (pt>=973.0f) s = 0; // freezing point for lava with any other (not listed in ptransitions as turning into lava) ctype
else {
t = parts[i].ctype;
parts[i].ctype = PT_NONE;