@@ -34,6 +34,7 @@ MID2AGB := tools/mid2agb/mid2agb$(EXE)
3434TEXTENCODE := tools/textencode/textencode$(EXE )
3535JSONPROC := tools/jsonproc/jsonproc$(EXE )
3636FETSATOOL := scripts/gfxtools/tsa_generator.py
37+ MARTOMAP := scripts/mar_to_map.py
3738
3839ifeq ($(UNAME ) ,Darwin)
3940 SED := sed -i ''
@@ -59,6 +60,7 @@ DATA_SUBDIR = data
5960DATA_SRC_SUBDIR = src/data
6061SAMPLE_SUBDIR = sound/direct_sound_samples
6162MID_SUBDIR = sound/songs/midi
63+ MAP_LAYOUT_SUBDIR = graphics/map/layout
6264
6365ROM := fireemblem8.gba
6466ELF := $(ROM:.gba=.elf )
@@ -109,6 +111,7 @@ clean:
109111 $(RM ) -f data/banim/* .bin data/banim/* .o data/banim/* .lz data/banim/* .bak
110112 # Remove converted sound samples
111113 $(RM ) -f $(SAMPLE_SUBDIR ) /* .bin
114+ $(RM ) -f $(MAP_LAYOUT_SUBDIR ) /* .bin
112115 # Remove converted songs
113116 $(RM ) -f $(MID_SUBDIR ) /* .s
114117 $(RM ) -f $(AUTO_GEN_TARGETS )
@@ -166,6 +169,7 @@ include json_data_rules.mk
166169% .lz : % ; $(GBAGFX ) $< $@
167170% .rl : % ; $(GBAGFX ) $< $@
168171% .fk : % ; ./scripts/compressor.py $< fk
172+ % .bin : % .mar ; $(MARTOMAP ) $< $@
169173sound/% .bin : sound/% .aif ; $(AIF2PCM ) $< $@
170174
171175% .4bpp.h : % .4bpp
@@ -255,9 +259,10 @@ endif
255259.SECONDEXPANSION :
256260$(ASM_OBJECTS ) : % .o: % .s $$(data_dep )
257261 $(AS ) $(ASFLAGS ) -g $< -o $@
262+ % .lz :$(MAP_LAYOUT_SUBDIR ) /% .bin ; $(GBAGFX ) $< $@
258263
259264# Don't delete intermediate files
260265.SECONDARY :
261266
262267# debug print, to use, call "make print-(your label here)"
263- print-% : ; $(info $* is a $(flavor $* ) variable set to [$($* ) ]) @true
268+ print-% : ; $(info $* is a $(flavor $* ) variable set to [$($* ) ]) @true
0 commit comments