shithub: rgbds

Download patch

ref: 9646f15b59b88e7edfc0a339e08a1a102b130696
parent: 973fbb91bc3474006a1612bfd4ce72b466d30a3d
author: ISSOtm <[email protected]>
date: Sat May 21 11:54:21 EDT 2022

Add error message for nigh-impossible proto-palette overflow

--- a/src/gfx/process.cpp
+++ b/src/gfx/process.cpp
@@ -1010,7 +1010,7 @@
 
 		attrs.protoPaletteID = protoPalettes.size();
 		if (protoPalettes.size() == AttrmapEntry::transparent) { // Check for overflow
-			abort(); // TODO: nice error message
+			fatal("Reached %zu proto-palettes... sorry, this image is too much for me to handle :(", AttrmapEntry::transparent);
 		}
 		protoPalettes.push_back(tileColors);
 contained:;