Some games like to race with the SGB border fade

This commit is contained in:
Lior Halphon 2021-10-09 21:08:17 +03:00
parent f1761340fc
commit a7c8b702da
1 changed files with 5 additions and 2 deletions

View File

@ -648,7 +648,7 @@ void GB_sgb_render(GB_gameboy_t *gb)
}
}
if (gb->sgb->transfer_dest == TRANSFER_BORDER_DATA) {
gb->sgb->border_animation = 64;
gb->sgb->border_animation = 80;
}
}
}
@ -729,7 +729,10 @@ void GB_sgb_render(GB_gameboy_t *gb)
}
uint32_t border_colors[16 * 4];
if (gb->sgb->border_animation == 0 || gb->sgb->intro_animation < GB_SGB_INTRO_ANIMATION_LENGTH) {
if (gb->sgb->border_animation == 0 || gb->sgb->border_animation > 64 || gb->sgb->intro_animation < GB_SGB_INTRO_ANIMATION_LENGTH) {
if (gb->sgb->border_animation != 0) {
gb->sgb->border_animation--;
}
for (unsigned i = 0; i < 16 * 4; i++) {
border_colors[i] = convert_rgb15(gb, LE16(gb->sgb->border.palette[i]));
}