Allow rgbgfx -r to read an infinite amount of tiles without tilemap

Previously, indices would be wrapped after 256 even without a tilemap;
since RGBGFX can generate arbitrarily large tile data if `-N` is not used,
it should be possible to read those in.

Of course, this won't work if a tilemap is provided, but such "big blobs"
can't generate a meaningful tilemap anyway.
This commit is contained in:
ISSOtm
2022-08-04 20:50:07 +02:00
parent b02ccf8f4a
commit 92eb0a133b

View File

@@ -274,7 +274,7 @@ void reverse() {
uint8_t attribute = attrmap.has_value() ? (*attrmap)[index] : 0x00;
bool bank = attribute & 0x08;
// Get the tile ID at this location
uint8_t tileID = index;
size_t tileID = index;
if (tilemap.has_value()) {
tileID =
(*tilemap)[index] - options.baseTileIDs[bank] + bank * options.maxNbTiles[0];