shithub: rgbds

Download patch

ref: 92eb0a133b3355aa884b20a046388498adcf7129
parent: b02ccf8f4a06d750d1638af30c06a51e0e7c4f06
author: ISSOtm <eldredhabert0@gmail.com>
date: Thu Aug 4 16:50:07 EDT 2022

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.

--- a/src/gfx/reverse.cpp
+++ b/src/gfx/reverse.cpp
@@ -274,7 +274,7 @@
 			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];