diff options
author | Astatin <[email protected]> | 2025-06-03 14:51:59 +0200 |
---|---|---|
committer | Astatin <[email protected]> | 2025-06-03 14:51:59 +0200 |
commit | eca91612b60b5379f9e8d6ce6f51366db54aacc3 (patch) | |
tree | c5fad4dc000a5430958fa8b354f69b3ba6628fe6 /Makefile | |
parent | f3a70613f78023c25d9a075231cb55639a75ee99 (diff) |
Add loading from pregenerated collision map
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 23 |
1 files changed, 19 insertions, 4 deletions
@@ -1,18 +1,28 @@ all: run -.PHONY: build/main.rom.unsigned build/main.rom clean +.PHONY: clean sclean tileset.gbasm: ./scripts/generate-tiledata.py $(wildcard ./sprites/**/* ./sprites/*) - python ./scripts/generate-tiledata.py > tileset.gbasm + @echo "; THIS FILE IS GENERATED AUTOMATICALLY, DO NOT CHANGE" > $@ + python ./scripts/generate-tiledata.py >> $@ %.gbasm: ./%.gbtxt ./scripts/generate_from_gbtxt.py - python ./scripts/generate_from_gbtxt.py $< > $@ + @echo "; THIS FILE IS GENERATED AUTOMATICALLY, DO NOT CHANGE" > $@ + python ./scripts/generate_from_gbtxt.py $< >> $@ + +%.map.gbasm: ./%.ldtk ./scripts/parse-ldtkmap.py + @echo "; THIS FILE IS GENERATED AUTOMATICALLY, DO NOT CHANGE" > $@ + python ./scripts/parse-ldtkmap.py $< >> $@ + +map/maps.gbasm: $(subst .ldtk,.map.gbasm,$(wildcard ./map/maps/*.ldtk)) + @echo "; THIS FILE IS GENERATED AUTOMATICALLY, DO NOT CHANGE" > $@ + ls ./map/maps/*.map.gbasm | sed 's/^\.\///' | awk '{print ".INCLUDE \""$$0"\"" }' >> $@ build/main.rom: build/main.rom.unsigned cp build/main.rom.unsigned build/main.rom python scripts/set_checksums.py build/main.rom -build/main.rom.unsigned: main.gbasm tileset.gbasm text.gbasm dialogues/text.gbasm +build/main.rom.unsigned: main.gbasm tileset.gbasm text.gbasm dialogues/text.gbasm map/maps.gbasm $(wildcard ./*.gbasm) $(wildcard ./**/*.gbasm) mkdir -p build gbasm $< $@ > build/main.sym @@ -28,3 +38,8 @@ gearboy: build/main.rom clean: rm -rf build + +sclean: clean + rm tileset.gbasm + find . -name "*.gbtxt" | sed 's/\.gbtxt$/.gbasm/' | xargs rm + rm map/maps/*.map.gbasm map/maps.gbasm |