mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
tilemap.c: Respect gfx_element::colors() just like drawgfx.c does. Add temporary assert to catch regressions (i.e. drivers that didn't define their gfx elements correctly) (nw)
This commit is contained in:
parent
f4b87dcd55
commit
4fe7a56192
1 changed files with 2 additions and 1 deletions
|
@ -443,8 +443,9 @@ struct tile_data
|
|||
{
|
||||
gfx_element *gfx = decoder->gfx(_gfxnum);
|
||||
int code = rawcode % gfx->elements();
|
||||
assert(rawcolor < gfx->colors()); // TEMPORARY ASSERT
|
||||
pen_data = gfx->get_data(code);
|
||||
palette_base = gfx->colorbase() + gfx->granularity() * rawcolor;
|
||||
palette_base = gfx->colorbase() + gfx->granularity() * (rawcolor % gfx->colors());
|
||||
flags = _flags;
|
||||
gfxnum = _gfxnum;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue