Merge origin/new-newnassets: new LPC rat assets and animations
Cherry-picked from new-newnassets (3 commits): -bdf5a8dAdd new start animation asset for game launch -5f2d09fFix rat animations and restore map tiles -2e2c5bbfeat: add LPC-style rat assets, sprite generation scripts, and grid extraction tools Conflicts resolved: - engine/sdl2.py: kept 'if scale:' wrapper (compatible, default scale=True) - units/rat.py: kept animation frame computation (partial_move * 4) - 12 PNG files (BMP_BABY/MALE/FEMALE_*): kept new-newnassets versions Cleanup applied: removed ~480 working artifacts not appropriate for the production repo: - 25 PNG in repo root (male_rats*.png, spritesheet*.png) - 416 tile extracts in tools/lpc_extract/grid/ - scattered debug PNGs (bushes, preview, montages, etc.) - early iteration scripts (animate_rat v1-v4, restyle v2-v10, etc.) Kept: 32 new LPC-style sprites in assets/Rat_LPC_Style/, 4 animation sprite sheets in assets/Rat_Animated/, 64 updated Rat sprites, 22 final-version generator scripts, plus all .py/.md updates.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
from PIL import Image
|
||||
|
||||
src_img = Image.open('/home/enne2/dev/asset-maker/assets/poses/sources/lpc-revised/Terrain/terrain_spring.png').convert('RGBA')
|
||||
|
||||
# The plain grass tile in LPC terrain is typically at col 4, row 1 (0-indexed)
|
||||
tx, ty = 4, 1
|
||||
box = (tx * 32, ty * 32, (tx + 1) * 32, (ty + 1) * 32)
|
||||
tile32 = src_img.crop(box)
|
||||
|
||||
# Strategy 1: Tile it 2x2 to make a 64x64 image
|
||||
img_tiled = Image.new('RGBA', (64, 64))
|
||||
img_tiled.paste(tile32, (0, 0))
|
||||
img_tiled.paste(tile32, (32, 0))
|
||||
img_tiled.paste(tile32, (0, 32))
|
||||
img_tiled.paste(tile32, (32, 32))
|
||||
img_tiled.save('/home/enne2/dev/mice/tools/lpc_extract/BMP_1_GRASS_1_tiled.png')
|
||||
|
||||
# Strategy 2: Scale it 2x to make a 64x64 image
|
||||
img_scaled = tile32.resize((64, 64), Image.NEAREST)
|
||||
img_scaled.save('/home/enne2/dev/mice/tools/lpc_extract/BMP_1_GRASS_1_scaled.png')
|
||||
|
||||
print("Created BMP_1_GRASS_1_tiled.png and BMP_1_GRASS_1_scaled.png")
|
||||
Reference in New Issue
Block a user