diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/make-jiangnan-art.py | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/scripts/make-jiangnan-art.py b/scripts/make-jiangnan-art.py index 98e357c..26db3fc 100644 --- a/scripts/make-jiangnan-art.py +++ b/scripts/make-jiangnan-art.py @@ -2,7 +2,7 @@ """Deterministic pixel-art atlases for LivingVillage.Desktop. Generates three RGBA PNGs into src/LivingVillage.Desktop/Assets: - jiangnan-world.png 416x32 (13 ground/prop tiles, 32px each) + jiangnan-world.png 448x32 (14 ground/prop tiles, 32px each) jiangnan-characters.png 1024x48 (4 variants x 4 directions x 2 frames, 32x48 cells) jiangnan-interior.png 392x96 (variable-size bottom-aligned interior cells) @@ -99,7 +99,7 @@ def verify_png(path, expected_w, expected_h): def build_world_atlas(): - c = Canvas(416, 32) + c = Canvas(448, 32) tile = 32 def slot(index): @@ -294,6 +294,22 @@ def build_world_atlas(): c.rect(x0 + 19, 18, 3, 3, (196, 158, 74, 255)) c.rect(x0 + 6, 29, 20, 3, (83, 52, 39, 255)) + x0 = slot(13) + c.rect(x0, 0, 32, 32, water) + c.rect(x0 + 4, 3, 2, 26, water_deep) + c.rect(x0 + 19, 8, 2, 22, water_deep) + for y in (9, 20, 29): + for x in range(3, 29): + if (x * 3 + y) % 5 != 0: + c.set(x0 + x, y, water_light) + for y in (14, 25): + for x in range(5, 27): + if (x + y * 2) % 6 == 0: + c.set(x0 + x, y, water_deep) + for sx, sy in ((9, 6), (24, 13), (15, 24), (5, 19)): + c.set(x0 + sx, sy, (214, 231, 238, 255)) + c.set(x0 + sx + 1, sy, (214, 231, 238, 120)) + return c @@ -513,7 +529,7 @@ def build_interior_atlas(): def main(): ASSET_DIR.mkdir(parents=True, exist_ok=True) targets = [ - ("jiangnan-world.png", build_world_atlas(), 416, 32), + ("jiangnan-world.png", build_world_atlas(), 448, 32), ("jiangnan-characters.png", build_character_atlas(), 1024, 48), ("jiangnan-interior.png", build_interior_atlas(), 392, 96), ] |
