all repos — mgba @ 20506226c9f73791bf4070ae2fcb63e4ee18dec9

mGBA Game Boy Advance Emulator

GBA Video: Fix map cache for 256-color mode 1 backgrounds
Vicki Pfau vi@endrift.com
Mon, 08 Jan 2018 08:24:23 -0800
commit

20506226c9f73791bf4070ae2fcb63e4ee18dec9

parent

373fbe89708dc4fc195dec926b281c42e198c505

1 files changed, 5 insertions(+), 2 deletions(-)

jump to
M src/gba/renderers/cache-set.csrc/gba/renderers/cache-set.c

@@ -101,8 +101,11 @@ mMapCacheSetGetPointer(&cache->maps, 1)->mapParser = mapParser0;

mMapCacheSetGetPointer(&cache->maps, 2)->mapParser = mapParser2; mMapCacheSetGetPointer(&cache->maps, 3)->mapParser = mapParser2; - mMapCacheSetGetPointer(&cache->maps, 0)->tileCache = mTileCacheSetGetPointer(&cache->tiles, 0); - mMapCacheSetGetPointer(&cache->maps, 1)->tileCache = mTileCacheSetGetPointer(&cache->tiles, 0); + mMapCacheSetGetPointer(&cache->maps, 0)->tileCache = mTileCacheSetGetPointer(&cache->tiles, + mMapCacheSystemInfoGetPaletteBPP(mMapCacheSetGetPointer(&cache->maps, 0)->sysConfig) == 3); + mMapCacheSetGetPointer(&cache->maps, 1)->tileCache = mTileCacheSetGetPointer(&cache->tiles, + mMapCacheSystemInfoGetPaletteBPP(mMapCacheSetGetPointer(&cache->maps, 1)->sysConfig) == 3); + mMapCacheSetGetPointer(&cache->maps, 2)->tileCache = mTileCacheSetGetPointer(&cache->tiles, 1); mMapCacheSetGetPointer(&cache->maps, 3)->tileCache = mTileCacheSetGetPointer(&cache->tiles, 1); break;