summaryrefslogtreecommitdiff
path: root/scripts/make-cc0-art.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/make-cc0-art.py')
-rw-r--r--scripts/make-cc0-art.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/make-cc0-art.py b/scripts/make-cc0-art.py
index f5c97ee..b26cba1 100644
--- a/scripts/make-cc0-art.py
+++ b/scripts/make-cc0-art.py
@@ -98,16 +98,19 @@ def verify_png(path, expected_w, expected_h):
def build_cc0_tile_atlas():
"""Four 32x32 ground tiles from Kenney Tiny Farm, upscaled 2x.
- Tile selection is fixed by grid coordinates chosen from the pack's
- tilemap_packed.png (grass: two greens; stone path: pale slab; dirt: apricot).
+ Source is the *packed* sheet (tilemap_packed.png) which has NO spacing between
+ tiles: 192x176 = 12x11 tiles at a 16px pitch (the spaced tilemap.png is 203x186
+ at 17px pitch; mixing the two misaligns every non-zero cell). Tile selection is
+ fixed by grid coordinates: two full grass shades (9,8)/(10,8) for the checker
+ ground, then two grey stone slabs (4,8)/(4,9) for the paved path.
"""
c = Canvas(128, 32)
packed = Image.open(THIRD / "kenney_tiny-farm" / "Tilemap" / "tilemap_packed.png").convert("RGBA")
def tile(grid_x, grid_y):
- return packed.crop((grid_x * 17, grid_y * 17, grid_x * 17 + 16, grid_y * 17 + 16))
+ return packed.crop((grid_x * 16, grid_y * 16, grid_x * 16 + 16, grid_y * 16 + 16))
- choices = [(10, 9), (9, 7), (6, 7), (6, 9)]
+ choices = [(9, 8), (10, 8), (4, 8), (4, 9)]
for index, (gx, gy) in enumerate(choices):
t = tile(gx, gy)
c.blit(t, index * 32, 0, scale=2)