From 380d74403d63768fa808dfc0bcfa5102ae66cc58 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Thu, 4 Sep 2025 19:02:08 -0700 Subject: Fix carving of images when handling single-image tile sets. --- tools/mkasset.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/mkasset.py b/tools/mkasset.py index c8311b6..a402e3c 100644 --- a/tools/mkasset.py +++ b/tools/mkasset.py @@ -65,8 +65,9 @@ def carve_image(rgba_bytes, tile_width, tile_height, columns) -> Generator[bytea image_y = image_y0 + y # y of current pixel inside image for x in range(tile_width): image_x = image_x0 + x # x of current pixel inside image - tile_bytes[(y * tile_width + x) * 4] = ( - rgba_bytes)[(image_y * image_width + image_x) * 4] + for c in range(4): + tile_bytes[((y * tile_width + x) * 4) + c] = ( + rgba_bytes)[((image_y * image_width + image_x) * 4) + c] yield tile_bytes.copy() -- cgit v1.2.3