add ga, ufo, and bbq logos
This commit is contained in:
@@ -157,6 +157,8 @@ def main():
|
||||
help="brightness floor (0-255) for non-black pixels so dark logos stay visible; 0 disables")
|
||||
p.add_argument("--colors", type=int, default=0, help="quantize to N colours (0 = off); try 6-8")
|
||||
p.add_argument("--c-header", action="store_true", help="also write logos.h")
|
||||
p.add_argument("--native", type=Path,
|
||||
help="folder of finished 16x16 pixel art (e.g. UFO.png, GA.png) copied in unchanged, no processing")
|
||||
p.add_argument("--only", nargs="*", help="only these codes")
|
||||
a = p.parse_args()
|
||||
|
||||
@@ -180,6 +182,16 @@ def main():
|
||||
items.append((code, im))
|
||||
print(f"ok {code}")
|
||||
|
||||
if a.native:
|
||||
for f in sorted(x for x in a.native.iterdir() if x.suffix.lower() == ".png"):
|
||||
im = Image.open(f).convert("RGB")
|
||||
if im.size != (a.size, a.size):
|
||||
sys.exit(f"{f.name}: native art must be exactly {a.size}x{a.size}, got {im.size}")
|
||||
code = f.stem.upper()
|
||||
items = [(c, i) for c, i in items if c != code] + [(code, im)]
|
||||
im.save(a.out / "png" / f"{code}.png")
|
||||
print(f"ok {code} (native)")
|
||||
|
||||
S = a.size
|
||||
# atlas: magic, size(u8), count(u16), then per entry: 4-byte code + RGB888
|
||||
with open(a.out / "atlas.bin", "wb") as fh:
|
||||
|
||||
Reference in New Issue
Block a user