Adjustments to ARAY read/write feature

This commit is contained in:
Rebmiami 2023-12-12 14:55:13 -05:00
parent cb40d869cd
commit 19461e315e
2 changed files with 22 additions and 0 deletions

View File

@ -173,6 +173,8 @@ static int update(UPDATE_FUNC_ARGS)
if (parts[r].tmp & 0x10) if (parts[r].tmp & 0x10)
{ {
// Read // Read
// End reading state early
parts[r].tmp = 0;
if ((parts[r].life >> 24) & 0x1) if ((parts[r].life >> 24) & 0x1)
{ {
break; break;
@ -232,6 +234,8 @@ static int update(UPDATE_FUNC_ARGS)
if (parts[r].tmp & 0x10) if (parts[r].tmp & 0x10)
{ {
// Read // Read
// End reading state early
parts[r].tmp = 0;
if ((parts[r].life >> 24) & 0x1) if ((parts[r].life >> 24) & 0x1)
{ {
break; break;

View File

@ -134,5 +134,23 @@ static int graphics(GRAPHICS_FUNC_ARGS)
*colg -= (int)restrict_flt((maxtemp-450)*1.4f,0,230); *colg -= (int)restrict_flt((maxtemp-450)*1.4f,0,230);
*colb -= (int)restrict_flt((maxtemp-450)*1.7f,0,197); *colb -= (int)restrict_flt((maxtemp-450)*1.7f,0,197);
} }
if (cpart->tmp)
{
*pixel_mode |= PMODE_GLOW;
float flash = (cpart->tmp & 0xF) / 15.f;
*cola = flash * 200;
*colr = int(*colr * (1 - flash));
*colg = int(*colg * (1 - flash));
*colb = int(*colb * (1 - flash));
if (cpart->tmp & 0x10)
{
*colr += int(255 * flash);
}
else
{
*colg += int(255 * flash);
*colb += int(255 * flash);
}
}
return 0; return 0;
} }