if (cpart->ctype == PT_PTSM) {
int caddress = restrict_flt(restrict_flt((float)cpart->life, 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3);
*colr = (unsigned char)flm_data[caddress];
*colg = (unsigned char)flm_data[caddress+1];
*colb = (unsigned char)flm_data[caddress];
}
else {
int caddress = restrict_flt(restrict_flt((float)cpart->life, 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3);
*colr = (unsigned char)flm_data[caddress];
*colg = (unsigned char)flm_data[caddress+1];
*colb = (unsigned char)flm_data[caddress+2];
}