Update to use the actual flappy bird font in score

This commit is contained in:
breadone
2023-03-11 15:25:46 +13:00
parent bb4b48b677
commit 984a32a25d
17 changed files with 38 additions and 36 deletions

View File

@@ -37,7 +37,6 @@ SOURCES := source
DATA := data
INCLUDES := include
GRAPHICS := gfx
#GFXBUILD := $(BUILD)
ROMFS := romfs
GFXBUILD := $(ROMFS)/gfx
@@ -88,6 +87,7 @@ SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
PICAFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.v.pica)))
SHLISTFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.shlist)))
GFXFILES := $(foreach dir,$(GRAPHICS),$(notdir $(wildcard $(dir)/*.t3s)))
FONTFILES := $(foreach dir,$(GRAPHICS),$(notdir $(wildcard $(dir)/*.ttf)))
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
#---------------------------------------------------------------------------------
@@ -108,10 +108,12 @@ endif
ifeq ($(GFXBUILD),$(BUILD))
#---------------------------------------------------------------------------------
export T3XFILES := $(GFXFILES:.t3s=.t3x)
export EFONTFILES := $(FONTFILES:.ttf=.bcfnt)
#---------------------------------------------------------------------------------
else
#---------------------------------------------------------------------------------
export ROMFS_T3XFILES := $(patsubst %.t3s, $(GFXBUILD)/%.t3x, $(GFXFILES))
export ROMFS_FONTFILES := $(patsubst %.ttf, $(GFXBUILD)/%.bcfnt, $(FONTFILES))
export T3XHFILES := $(patsubst %.t3s, $(BUILD)/%.h, $(GFXFILES))
#---------------------------------------------------------------------------------
endif
@@ -121,7 +123,7 @@ export OFILES_SOURCES := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o)
export OFILES_BIN := $(addsuffix .o,$(BINFILES)) \
$(PICAFILES:.v.pica=.shbin.o) $(SHLISTFILES:.shlist=.shbin.o) \
$(addsuffix .o,$(T3XFILES))
$(addsuffix .o,$(T3XFILES)) $(addsuffix .o,$(EFONTFILES))
export OFILES := $(OFILES_BIN) $(OFILES_SOURCES)
@@ -161,7 +163,7 @@ endif
.PHONY: all clean
#---------------------------------------------------------------------------------
all: $(BUILD) $(GFXBUILD) $(DEPSDIR) $(ROMFS_T3XFILES) $(T3XHFILES)
all: $(BUILD) $(GFXBUILD) $(DEPSDIR) $(ROMFS_T3XFILES) $(ROMFS_FONTFILES) $(T3XHFILES)
@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
$(BUILD):
@@ -188,6 +190,12 @@ $(GFXBUILD)/%.t3x $(BUILD)/%.h : %.t3s
@echo $(notdir $<)
@tex3ds -i $< -H $(BUILD)/$*.h -d $(DEPSDIR)/$*.d -o $(GFXBUILD)/$*.t3x
#---------------------------------------------------------------------------------
$(GFXBUILD)/%.bcfnt : %.ttf
#---------------------------------------------------------------------------------
@echo $(notdir $<)
@mkbcfnt -o $(GFXBUILD)/$*.bcfnt $<
#---------------------------------------------------------------------------------
else
@@ -209,13 +217,19 @@ $(OUTPUT).elf : $(OFILES)
@$(bin2o)
#---------------------------------------------------------------------------------
.PRECIOUS : %.t3x
.PRECIOUS : %.t3x %.bcfnt
#---------------------------------------------------------------------------------
%.t3x.o %_t3x.h : %.t3x
#---------------------------------------------------------------------------------
@echo $(notdir $<)
@$(bin2o)
#---------------------------------------------------------------------------------
%.bcfnt.o %_bcfnt.h : %.bcfnt
#---------------------------------------------------------------------------------
@echo $(notdir $<)
@$(bin2o)
#---------------------------------------------------------------------------------
# rules for assembling GPU shaders
#---------------------------------------------------------------------------------
@@ -248,6 +262,12 @@ endef
@echo $(notdir $<)
@tex3ds -i $< -H $*.h -d $*.d -o $*.t3x
#---------------------------------------------------------------------------------
%.bcfnt : %.ttf
#---------------------------------------------------------------------------------
@echo $(notdir $<)
@mkbcfnt -o $*.bcfnt $<
-include $(DEPSDIR)/*.d
#---------------------------------------------------------------------------------------