all repos — mgba @ 189863485788b2a5bfa8acf9386313980ca6fe6e

mGBA Game Boy Advance Emulator

GB Video: Fix off-by-one tiles
Jeffrey Pfau jeffrey@endrift.com
Wed, 17 Feb 2016 20:00:41 -0800
commit

189863485788b2a5bfa8acf9386313980ca6fe6e

parent

526a9ce44665cfda05b8d33e03449d9e419c3aa8

1 files changed, 3 insertions(+), 0 deletions(-)

jump to
M src/gb/renderers/software.csrc/gb/renderers/software.c

@@ -288,6 +288,9 @@ if (GBRegisterLCDCIsObjSize(renderer->lcdc) && y - obj->y >= -8) {

++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) {