From 893d7d162ac6b9656d4c87d3f3db3404e378044a Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Sat, 9 Oct 2021 22:28:36 +0300 Subject: [PATCH] Don't try to render tiles 100-3FF --- Core/sgb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/sgb.c b/Core/sgb.c index 65800820..fc19f1b0 100644 --- a/Core/sgb.c +++ b/Core/sgb.c @@ -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); } -#include static void render_boot_animation (GB_gameboy_t *gb) { #include "graphics/sgb_animation_logo.inc" @@ -765,6 +764,7 @@ void GB_sgb_render(GB_gameboy_t *gb) continue; } 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_y = (tile & 0x8000)? 7:0; uint8_t palette = (tile >> 10) & 3;