Don't try to render tiles 100-3FF

This commit is contained in:
Lior Halphon 2021-10-09 22:28:36 +03:00
parent 85da5b64d3
commit 893d7d162a

View File

@ -532,7 +532,6 @@ static uint32_t convert_rgb15_with_fade(GB_gameboy_t *gb, uint16_t color, uint8_
return GB_convert_rgb15(gb, color, false); return GB_convert_rgb15(gb, color, false);
} }
#include <stdio.h>
static void render_boot_animation (GB_gameboy_t *gb) static void render_boot_animation (GB_gameboy_t *gb)
{ {
#include "graphics/sgb_animation_logo.inc" #include "graphics/sgb_animation_logo.inc"
@ -765,6 +764,7 @@ void GB_sgb_render(GB_gameboy_t *gb)
continue; continue;
} }
uint16_t tile = LE16(gb->sgb->border.map[tile_x + tile_y * 32]); uint16_t tile = LE16(gb->sgb->border.map[tile_x + tile_y * 32]);
if (tile & 0x300) continue; // Unused tile
uint8_t flip_x = (tile & 0x4000)? 0:7; uint8_t flip_x = (tile & 0x4000)? 0:7;
uint8_t flip_y = (tile & 0x8000)? 7:0; uint8_t flip_y = (tile & 0x8000)? 7:0;
uint8_t palette = (tile >> 10) & 3; uint8_t palette = (tile >> 10) & 3;