From 189863485788b2a5bfa8acf9386313980ca6fe6e Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Wed, 17 Feb 2016 20:00:41 -0800 Subject: [PATCH] GB Video: Fix off-by-one tiles --- src/gb/renderers/software.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gb/renderers/software.c b/src/gb/renderers/software.c index 085fac1d4..2f43568de 100644 --- a/src/gb/renderers/software.c +++ b/src/gb/renderers/software.c @@ -288,6 +288,9 @@ static void GBVideoSoftwareRendererDrawObj(struct GBVideoSoftwareRenderer* rende ++tileOffset; } } + if (GBRegisterLCDCIsObjSize(renderer->lcdc) && obj->tile & 1) { + --tileOffset; + } uint8_t mask = GBObjAttributesIsPriority(obj->attr) ? ~0x1C : ~0x1F; int p; if (renderer->model >= GB_MODEL_CGB) {