FILT mode for old QRTZ scattering, for Catelite.

FILT graphics could maybe do with changing in this mode.
This commit is contained in:
jacksonmj 2013-08-29 18:28:49 +01:00
parent 268158f1dd
commit c3d3f9fc2a
2 changed files with 13 additions and 0 deletions

View File

@ -104,6 +104,14 @@ int Element_FILT::interactWavelengths(Particle* cpart, int origWl)
return origWl ^ filtWl; // XOR colours
case 8:
return (~origWl) & mask; // Invert colours
case 9:
{
int t1, t2, t3, r;
t1 = (origWl & 0x0000FF)+(rand()%5)-2;
t1 = ((origWl & 0x00FF00)>>8)+(rand()%5)-2;
t3 = ((origWl & 0xFF0000)>>16)+(rand()%5)-2;
return (origWl & 0xFF000000) | (t3<<16) | (t2<<8) | t1;
}
default:
return filtWl;
}

View File

@ -88,6 +88,11 @@ int Element_PHOT::update(UPDATE_FUNC_ARGS)
parts[i].ctype = 0x1F<<(rand()%26);
parts[i].life++; //Delay death
}
else if ((r&0xFF) == PT_FILT && parts[r>>8].tmp==9)
{
parts[i].vx += ((float)(rand()%1000-500))/1000.0f;
parts[i].vy += ((float)(rand()%1000-500))/1000.0f;
}
}
return 0;
}