diff options
Diffstat (limited to 'scripts/make-jiangnan-art.py')
| -rw-r--r-- | scripts/make-jiangnan-art.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/scripts/make-jiangnan-art.py b/scripts/make-jiangnan-art.py index cdae4e9..c484d91 100644 --- a/scripts/make-jiangnan-art.py +++ b/scripts/make-jiangnan-art.py @@ -3,7 +3,7 @@ Generates three RGBA PNGs into src/LivingVillage.Desktop/Assets: jiangnan-world.png 672x32 (21 ground/prop tiles, 32px each) - jiangnan-characters.png 1280x48 (5 variants x 4 directions x 2 frames, 32x48 cells) + jiangnan-characters.png 2560x48 (5 variants x 4 directions x 4 frames, 32x48 cells) jiangnan-interior.png 392x96 (variable-size bottom-aligned interior cells) Cell geometry is mirrored in VillageArt.fs; keep both in sync. @@ -445,6 +445,7 @@ DIRECTIONS = ["north", "south", "west", "east"] def draw_character_cell(c, ox, variant, direction, frame): + # frame: 0 neutral stand, 1 left stride, 2 neutral stand (higher torso bob), 3 right stride robe = variant["robe"] light = variant["light"] dark = variant["dark"] @@ -456,15 +457,20 @@ def draw_character_cell(c, ox, variant, direction, frame): c.rect(ox + 8, 44, 16, 1, (23, 31, 34, 110)) c.rect(ox + 10, 45, 12, 1, (23, 31, 34, 90)) - if frame == 0: + if frame in (0, 2): c.rect(ox + 10, 36, 4, 7, dark) c.rect(ox + 9, 42, 6, 3, SHOE) c.rect(ox + 18, 36, 4, 5, dark) c.rect(ox + 18, 39, 6, 3, SHOE) + elif frame == 1: + c.rect(ox + 9, 36, 5, 7, dark) + c.rect(ox + 9, 42, 6, 3, SHOE) + c.rect(ox + 18, 36, 3, 5, dark) + c.rect(ox + 18, 39, 6, 3, SHOE) else: c.rect(ox + 18, 36, 4, 7, dark) c.rect(ox + 18, 42, 6, 3, SHOE) - c.rect(ox + 10, 36, 4, 5, dark) + c.rect(ox + 12, 36, 3, 5, dark) c.rect(ox + 10, 39, 6, 3, SHOE) c.rect(ox + 7, 22, 18, 14, robe) @@ -531,7 +537,7 @@ def draw_character_cell(c, ox, variant, direction, frame): def build_character_atlas(): - c = Canvas(1280, 48) + c = Canvas(2560, 48) cell = 0 for variant in VARIANTS: for direction in DIRECTIONS: @@ -674,7 +680,7 @@ def main(): ASSET_DIR.mkdir(parents=True, exist_ok=True) targets = [ ("jiangnan-world.png", build_world_atlas(), 672, 32), - ("jiangnan-characters.png", build_character_atlas(), 1280, 48), + ("jiangnan-characters.png", build_character_atlas(), 2560, 48), ("jiangnan-interior.png", build_interior_atlas(), 392, 96), ] for name, canvas, w, h in targets: |
