Closed thobbsinteractive closed 2 months ago
When the player is hit the pallet is adjusted using PaletteChanges_47760
.
This calls sub_41A90_VGA_Palette_install(...)
that calls VGA_Set_Palette(...)
and eventually SDL_SetPaletteColors(m_gamePalletisedSurface->format->palette, m_currentPalletColours, 0, 256);
Looking at the diagnostic window, this looks fine. The code is running very fast (1ms or less).
If could be the fade back to normal that is costing time.
Calling: sub_90B27_VGA_pal_fadein_fadeout()
seems to be costing 15ms
Okay, so there is a manual delay of 10ms in fix_sub_9A0FC_wait_to_screen_beam();
. Before I remove this I must be sure of its impact
This seems to happen as the red flash is applied to the colour pallet. There are many possible causes (thread locking), but the pallet shift should not be one of them. It would be interesting to see what is taking the processing time.