all repos — mgba @ 1ac4a716cc6d0d5ec7ec3733116d28d45049b5fd

mGBA Game Boy Advance Emulator

Core: Fix 256-color sprites in tile cache
Jeffrey Pfau jeffrey@endrift.com
Tue, 18 Oct 2016 18:35:11 -0700
commit

1ac4a716cc6d0d5ec7ec3733116d28d45049b5fd

parent

d462b4dd7f512de20b6ccb60969049ca727d0121

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

jump to
M src/core/tile-cache.csrc/core/tile-cache.c

@@ -176,7 +176,7 @@

static void _regenerateTile256(struct mTileCache* cache, uint16_t* tile, unsigned tileId, unsigned paletteId) { uint32_t* start = (uint32_t*) &cache->vram[tileId << 5]; paletteId <<= 8; - uint16_t* palette = &cache->palette[paletteId * 16]; + uint16_t* palette = &cache->palette[paletteId]; int i; for (i = 0; i < 8; ++i) { uint32_t line = *start;