Fix reverse-graphics check for whether the tilemap references too-high tile IDs in bank 1 (#2086)

This commit is contained in:
Rangi
2026-09-14 10:26:57 -04:00
committed by GitHub
parent 0fe43bf0cb
commit 7746ddbf2b
7 changed files with 44 additions and 18 deletions
Binary file not shown.
Binary file not shown.
+2
View File
@@ -0,0 +1,2 @@
FATAL: The tilemap references 2 tiles out of a maximum 8 in bank 0, and 2 in bank 1 (total: 10), but only 8 have been read plus 1 trimmed (total: 9)
Conversion aborted after 1 error
+4
View File
@@ -0,0 +1,4 @@
-N 8,8
-x 1
-t reverse_tilemap_oob.tilemap
-a reverse_tilemap_oob.attrmap
Binary file not shown.
+9 -3
View File
@@ -104,14 +104,20 @@ done
for f in *.[12]bpp; do
# Do not process outputs or sample outputs of other tests as test inputs themselves
if [[ "$f" = result.[12]bpp ]] || [[ "$f" = *.out.[12]bpp ]]; then
if [[ "$f" = result.[12]bpp ]] || [[ "$f" = *.in.[12]bpp ]] || [[ "$f" = *.out.[12]bpp ]]; then
continue
fi
flags="$([[ -e "${f%.[12]bpp}.flags" ]] && echo "@${f%.[12]bpp}.flags") $([[ -e "${f%.1bpp}.flags" ]] && echo "-d 1")"
newTest "$RGBGFX $flags -o $f -r 1 result.png && $RGBGFX $flags -o result.2bpp result.png"
runTest && tryCmp "$f" result.2bpp || failTest $?
if [[ -e "${f%.[12]bpp}.err" ]]; then
newTest "$RGBGFX $flags -o $f -r 1 result.png"
runTest 2>"$errtmp"
diff -au --strip-trailing-cr <(sed "s/$f/<stdin>/g" "${f%.[12]bpp}.err") "$errtmp" || failTest
else
newTest "$RGBGFX $flags -o $f -r 1 result.png && $RGBGFX $flags -o result.2bpp result.png"
runTest && tryCmp "$f" result.2bpp || failTest $?
fi
done
# Test writing to stdout