Add mode $8800 tilemap conversion tool
This commit is contained in:
4
Makefile
4
Makefile
@@ -48,6 +48,10 @@ ASMFILES := $(wildcard $(SRCDIR)/*.asm)
|
|||||||
%.pb16: %
|
%.pb16: %
|
||||||
src/tools/pb16.py $< $@
|
src/tools/pb16.py $< $@
|
||||||
|
|
||||||
|
# RGBGFX generates tilemaps with sequential tile IDs, which works fine for $8000 mode but not $8800 mode; `bit7ify.py` takes care to flip bit 7 so maps become $8800-compliant
|
||||||
|
%.bit7.tilemap: src/tools/bit7ify.py %.tilemap
|
||||||
|
$^ $@
|
||||||
|
|
||||||
|
|
||||||
CLEANTARGETS := $(BINDIR) $(DEPSDIR) $(OBJDIR) dummy # The list of things that must be cleared; expanded by the resource Makefiles
|
CLEANTARGETS := $(BINDIR) $(DEPSDIR) $(OBJDIR) dummy # The list of things that must be cleared; expanded by the resource Makefiles
|
||||||
INITTARGETS :=
|
INITTARGETS :=
|
||||||
|
|||||||
8
src/tools/bit7ify.py
Normal file
8
src/tools/bit7ify.py
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
from sys import argv
|
||||||
|
|
||||||
|
|
||||||
|
with open(argv[1], "rb") as input:
|
||||||
|
with open(argv[2], "wb") as output:
|
||||||
|
output.write(bytes((byte ^ 0x80 for byte in input.read())))
|
||||||
Reference in New Issue
Block a user