diff --git a/src/elements/aray.c b/src/elements/aray.c index 32f112444..d9f87ad49 100644 --- a/src/elements/aray.c +++ b/src/elements/aray.c @@ -63,7 +63,7 @@ int update_ARAY(UPDATE_FUNC_ARGS) { if (np!=-1) { parts[np].temp = parts[r>>8].temp; - parts[np].life = parts[r>>8].flags; + parts[np].life = parts[r>>8].tmp2; parts[np].tmp = parts[r>>8].pavg[0]; parts[np].ctype = parts[r>>8].pavg[1]; parts[r>>8].tmp = 0; diff --git a/src/elements/firw.c b/src/elements/firw.c index 7415dcdfa..2e7d68ddf 100644 --- a/src/elements/firw.c +++ b/src/elements/firw.c @@ -23,7 +23,7 @@ int update_FIRW(UPDATE_FUNC_ARGS) { parts[i].tmp=2; } else { float newVel = parts[i].life/25; - parts[i].flags = parts[i].flags&0xFFFFFFFE; + parts[i].flags &= ~FLAG_STAGNANT; /* TODO: if ((pmap[(int)(ly-newVel)][(int)lx]&0xFF)==PT_NONE && ly-newVel>0) { parts[i].vy = -newVel; diff --git a/src/elements/fwrk.c b/src/elements/fwrk.c index 0fa744ff7..3000a6427 100644 --- a/src/elements/fwrk.c +++ b/src/elements/fwrk.c @@ -38,7 +38,7 @@ int update_FWRK(UPDATE_FUNC_ARGS) { parts[np].vx = ((rand()%2)*2-1)*rand()%(5+5)+(parts[i].vx)*2 ; parts[np].life= rand()%37+18; parts[np].tmp=q; - parts[np].flags=w; + parts[np].tmp2=w; parts[np].ctype=e; parts[np].temp= rand()%20+6000; parts[np].dcolour = parts[i].dcolour; diff --git a/src/elements/newgraphics.c b/src/elements/newgraphics.c index cf7b9a89e..cd420b8bd 100644 --- a/src/elements/newgraphics.c +++ b/src/elements/newgraphics.c @@ -107,7 +107,7 @@ int graphics_DUST(GRAPHICS_FUNC_ARGS) if(cpart->life >= 1) { *firea = 120; - *firer = *colr = cpart->flags; + *firer = *colr = cpart->tmp2; *fireg = *colg = cpart->tmp; *fireb = *colb = cpart->ctype; if (decorations_enable && cpart->dcolour) diff --git a/src/elements/pipe.c b/src/elements/pipe.c index b387b7d1f..5487eca89 100644 --- a/src/elements/pipe.c +++ b/src/elements/pipe.c @@ -1,5 +1,7 @@ #include +#define PFLAG_NORMALSPEED 0x00010000 + signed char pos_1_rx[] = {-1,-1,-1, 0, 0, 1, 1, 1}; signed char pos_1_ry[] = {-1, 0, 1,-1, 1,-1, 0, 1}; @@ -31,11 +33,11 @@ void pushParticle(int i, int count, int original) { parts[r>>8].tmp = (parts[r>>8].tmp&~0xFF) | (parts[i].tmp&0xFF); parts[r>>8].temp = parts[i].temp; - parts[r>>8].flags = parts[i].flags; + parts[r>>8].tmp2 = parts[i].tmp2; parts[r>>8].pavg[0] = parts[i].pavg[0]; parts[r>>8].pavg[1] = parts[i].pavg[1]; if (r>>8 > original) - parts[r>>8].tmp2 = 1;//skip particle push, normalizes speed + parts[r>>8].flags |= PFLAG_NORMALSPEED;//skip particle push, normalizes speed parts[i].tmp &= ~0xFF; count++; pushParticle(r>>8,count,original); @@ -54,11 +56,11 @@ void pushParticle(int i, int count, int original) { parts[r>>8].tmp = (parts[r>>8].tmp&~0xFF) | (parts[i].tmp&0xFF); parts[r>>8].temp = parts[i].temp; - parts[r>>8].flags = parts[i].flags; + parts[r>>8].tmp2 = parts[i].tmp2; parts[r>>8].pavg[0] = parts[i].pavg[0]; parts[r>>8].pavg[1] = parts[i].pavg[1]; if (r>>8 > original) - parts[r>>8].tmp2 = 1;//skip particle push, normalizes speed + parts[r>>8].flags |= PFLAG_NORMALSPEED;//skip particle push, normalizes speed parts[i].tmp &= ~0xFF; count++; pushParticle(r>>8,count,original); @@ -111,9 +113,9 @@ int update_PIPE(UPDATE_FUNC_ARGS) { } else { - if (parts[i].tmp2 == 1)//skip particle push to prevent particle number being higher causeing speed up + if (parts[i].flags&PFLAG_NORMALSPEED)//skip particle push to prevent particle number being higher causeing speed up { - parts[i].tmp2 = 0 ; + parts[i].flags &= ~PFLAG_NORMALSPEED; } else { @@ -138,7 +140,7 @@ int update_PIPE(UPDATE_FUNC_ARGS) { if (np!=-1) { parts[np].temp = parts[i].temp;//pipe saves temp and life now - parts[np].life = parts[i].flags; + parts[np].life = parts[i].tmp2; parts[np].tmp = parts[i].pavg[0]; parts[np].ctype = parts[i].pavg[1]; parts[i].tmp &= ~0xFF; @@ -151,7 +153,7 @@ int update_PIPE(UPDATE_FUNC_ARGS) { detach(r>>8); parts[i].tmp = (parts[i].tmp&~0xFF) | parts[r>>8].type; parts[i].temp = parts[r>>8].temp; - parts[i].flags = parts[r>>8].life; + parts[i].tmp2 = parts[r>>8].life; parts[i].pavg[0] = parts[r>>8].tmp; parts[i].pavg[1] = parts[r>>8].ctype; kill_part(r>>8); @@ -160,7 +162,7 @@ int update_PIPE(UPDATE_FUNC_ARGS) { { parts[i].tmp = parts[r>>8].tmp; parts[i].temp = parts[r>>8].temp; - parts[i].flags = parts[r>>8].flags; + parts[i].tmp2 = parts[r>>8].tmp2; parts[i].pavg[0] = parts[r>>8].pavg[0]; parts[i].pavg[1] = parts[r>>8].pavg[1]; parts[r>>8].tmp = 0; @@ -253,7 +255,7 @@ int graphics_PIPE(GRAPHICS_FUNC_ARGS) memset(&tpart, 0, sizeof(particle)); tpart.type = cpart->tmp&0xFF; tpart.temp = cpart->temp; - tpart.life = cpart->flags; + tpart.life = cpart->tmp2; tpart.tmp = cpart->pavg[0]; tpart.ctype = cpart->pavg[1]; t = tpart.type; diff --git a/src/elements/stor.c b/src/elements/stor.c index 16cd2c353..58059045b 100644 --- a/src/elements/stor.c +++ b/src/elements/stor.c @@ -15,7 +15,7 @@ int update_STOR(UPDATE_FUNC_ARGS) { { parts[i].tmp = parts[r>>8].type; parts[i].temp = parts[r>>8].temp; - parts[i].flags = parts[r>>8].life; + parts[i].tmp2 = parts[r>>8].life; parts[i].pavg[0] = parts[r>>8].tmp; parts[i].pavg[1] = parts[r>>8].ctype; kill_part(r>>8); @@ -28,7 +28,7 @@ int update_STOR(UPDATE_FUNC_ARGS) { if (np!=-1) { parts[np].temp = parts[i].temp; - parts[np].life = parts[i].flags; + parts[np].life = parts[i].tmp2; parts[np].tmp = parts[i].pavg[0]; parts[np].ctype = parts[i].pavg[1]; parts[i].tmp = 0;