Changes by cracker
This commit is contained in:
commit
71c5d53f7f
@ -1987,7 +1987,7 @@ void draw_parts(pixel *vid)
|
||||
blendpixel(vid, nx+1, ny+1, cr, cg, cb, 32);
|
||||
blendpixel(vid, nx-1, ny-1, cr, cg, cb, 32);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(t==PT_FILT)
|
||||
{
|
||||
int temp_bin = (int)((parts[i].temp-273.0f)*0.025f);
|
||||
|
19
src/main.c
19
src/main.c
@ -1516,8 +1516,19 @@ int main(int argc, char *argv[])
|
||||
else
|
||||
GRID_MODE = (GRID_MODE+1)%10;
|
||||
}
|
||||
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_key=='w') //Gravity, by Moach
|
||||
if(sdl_key=='w' && (!isplayer2 || (sdl_mod & (KMOD_SHIFT)))) //Gravity, by Moach
|
||||
{
|
||||
++gravityMode; // cycle gravity mode
|
||||
itc = 51;
|
||||
@ -1621,7 +1632,7 @@ int main(int argc, char *argv[])
|
||||
if(vs>=1)
|
||||
vs = 0;
|
||||
else
|
||||
vs = 2;
|
||||
vs = 3;//every other frame
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2060,6 +2071,10 @@ int main(int argc, char *argv[])
|
||||
svf_tags[0] = 0;
|
||||
svf_description[0] = 0;
|
||||
gravityMode = 1;
|
||||
isplayer2 = 0;
|
||||
isplayer = 0;
|
||||
ISSPAWN1 = 0;
|
||||
ISSPAWN2 = 0;
|
||||
|
||||
memset(fire_bg, 0, XRES*YRES*PIXELSIZE);
|
||||
memset(fire_r, 0, sizeof(fire_r));
|
||||
|
53
src/powder.c
53
src/powder.c
@ -564,11 +564,17 @@ inline int create_part(int p, int x, int y, int t)
|
||||
return -1;
|
||||
if(p==-1)//creating from anything but brush
|
||||
{
|
||||
if(pmap[y][x])
|
||||
if((pmap[y][x]&0xFF)!=PT_SPAWN&&(pmap[y][x]&0xFF)!=PT_SPAWN2)
|
||||
if(t!=PT_STKM&&t!=PT_STKM2)
|
||||
return -1;
|
||||
if(pfree == -1)
|
||||
if(pmap[y][x])
|
||||
{
|
||||
if((pmap[y][x]&0xFF)!=PT_SPAWN&&(pmap[y][x]&0xFF)!=PT_SPAWN2)
|
||||
{
|
||||
if(t!=PT_STKM&&t!=PT_STKM2)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(pfree == -1)
|
||||
return -1;
|
||||
i = pfree;
|
||||
pfree = parts[i].life;
|
||||
@ -577,19 +583,24 @@ inline int create_part(int p, int x, int y, int t)
|
||||
{
|
||||
if(pmap[y][x])
|
||||
{
|
||||
if(((pmap[y][x]&0xFF)==PT_CLNE||(pmap[y][x]&0xFF)==PT_BCLN||(pmap[y][x]&0xFF)==PT_PCLN)&&(t!=PT_CLNE&&t!=PT_PCLN&&t!=PT_BCLN))
|
||||
if(((pmap[y][x]&0xFF)==PT_CLNE||(pmap[y][x]&0xFF)==PT_BCLN||(pmap[y][x]&0xFF)==PT_PCLN)&&(t!=PT_CLNE&&t!=PT_PCLN&&t!=PT_BCLN&&t!=PT_STKM&&t!=PT_STKM2))
|
||||
{
|
||||
parts[pmap[y][x]>>8].ctype = t;
|
||||
if(((pmap[y][x]&0xFF)==PT_CLNE||(pmap[y][x]&0xFF)==PT_BCLN||(pmap[y][x]&0xFF)==PT_PCLN)&&(t!=PT_CLNE&&t!=PT_PCLN&&t!=PT_BCLN))
|
||||
{
|
||||
parts[pmap[y][x]>>8].ctype = t;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
return -1;
|
||||
if(pfree == -1)
|
||||
return -1;
|
||||
i = pfree;
|
||||
pfree = parts[i].life;
|
||||
}
|
||||
if(pfree == -1)
|
||||
return -1;
|
||||
i = pfree;
|
||||
pfree = parts[i].life;
|
||||
}
|
||||
else
|
||||
i = p;
|
||||
else
|
||||
{
|
||||
i = p;
|
||||
}
|
||||
}
|
||||
|
||||
if(t==PT_GLAS)
|
||||
{
|
||||
@ -2129,7 +2140,7 @@ void update_particles_i(pixel *vid, int start, int inc)
|
||||
}
|
||||
else if(parts[r>>8].type==PT_FILT){
|
||||
colored = parts[r>>8].ctype;
|
||||
}else if(parts[r>>8].type!=PT_INWR && parts[r>>8].type!=PT_ARAY) {
|
||||
}else if(parts[r>>8].type!=PT_INWR && parts[r>>8].type!=PT_ARAY && parts[r>>8].type!=PT_WIFI) {
|
||||
if(nyy!=0 || nxx!=0){
|
||||
create_part(-1, x+nxi+nxx, y+nyi+nyy, PT_SPRK);
|
||||
}
|
||||
@ -2143,6 +2154,8 @@ void update_particles_i(pixel *vid, int start, int inc)
|
||||
if(parts[r>>8].type==PT_BRAY){
|
||||
parts[r>>8].life = 1;
|
||||
docontinue = 1;
|
||||
} else if(parts[r>>8].type==PT_INWR || parts[r>>8].type==PT_ARAY || parts[r>>8].type==PT_WIFI) {
|
||||
docontinue = 1;
|
||||
} else {
|
||||
docontinue = 0;
|
||||
}
|
||||
@ -3376,6 +3389,12 @@ void update_particles_i(pixel *vid, int start, int inc)
|
||||
parts[r>>8].type = PT_SPRK;
|
||||
parts[r>>8].ctype = PT_PSCN;
|
||||
parts[r>>8].life = 4;
|
||||
}
|
||||
else if(parts[r>>8].type==PT_INWR&&parts[r>>8].life==0 && wireless[parts[i].tmp][0])
|
||||
{
|
||||
parts[r>>8].type = PT_SPRK;
|
||||
parts[r>>8].ctype = PT_INWR;
|
||||
parts[r>>8].life = 4;
|
||||
}
|
||||
else if(parts[r>>8].type==PT_SPRK && parts[r>>8].ctype!=PT_NSCN && parts[r>>8].life>=3 && !wireless[parts[i].tmp][0])
|
||||
{
|
||||
@ -5051,7 +5070,7 @@ killed:
|
||||
parts[i].vx *= ptypes[t].collision;
|
||||
parts[i].vy *= ptypes[t].collision;
|
||||
}
|
||||
else if(ptypes[t].falldown>1 && parts[i].vy>fabs(parts[i].vx))
|
||||
else if(ptypes[t].falldown>1 && (parts[i].vy>fabs(parts[i].vx) || gravityMode==2))
|
||||
{
|
||||
s = 0;
|
||||
if(!rt || nt) //nt is if there is an something else besides the current particle type, around the particle
|
||||
|
Reference in New Issue
Block a user