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.
23 lines
741 B
Python
23 lines
741 B
Python
import glob
|
|
from PIL import Image
|
|
|
|
def analyze_edges(img_path):
|
|
img = Image.open(img_path).convert('RGB')
|
|
w, h = img.size
|
|
pixels = img.load()
|
|
|
|
top = [pixels[x, 0] for x in range(w)]
|
|
bottom = [pixels[x, h-1] for x in range(w)]
|
|
left = [pixels[0, y] for y in range(h)]
|
|
right = [pixels[w-1, y] for y in range(h)]
|
|
|
|
print(f"File: {img_path}")
|
|
print(f"Top edge unique colors: {set(top)}")
|
|
print(f"Bottom edge unique colors: {set(bottom)}")
|
|
print(f"Left edge unique colors: {set(left)}")
|
|
print(f"Right edge unique colors: {set(right)}")
|
|
print("---------------------------------")
|
|
|
|
for f in ['BMP_1_GRASS_1.png', 'BMP_1_GRASS_2.png', 'BMP_1_N.png']:
|
|
analyze_edges(f'/tmp/orig_rat/{f}')
|