From 92eb0a133b3355aa884b20a046388498adcf7129 Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Thu, 4 Aug 2022 20:50:07 +0200 Subject: [PATCH] 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. --- src/gfx/reverse.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gfx/reverse.cpp b/src/gfx/reverse.cpp index 0a52fbb0..e8e0fa74 100644 --- a/src/gfx/reverse.cpp +++ b/src/gfx/reverse.cpp @@ -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];