GB Video: Fix off-by-one tiles

This commit is contained in:
Jeffrey Pfau 2016-02-17 20:00:41 -08:00
parent 526a9ce446
commit 1898634857
1 changed files with 3 additions and 0 deletions

View File

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