Add NDS icon

This commit is contained in:
Michael Theall 2020-04-26 20:45:26 -05:00
parent 2f668bd7c2
commit f46efc9286
2 changed files with 6 additions and 22 deletions

View File

@ -140,21 +140,13 @@ export INCLUDE := $(foreach dir,$(INCLUDES),-iquote $(CURDIR)/$(dir))\
-I$(CURDIR)/$(BUILD) -I$(CURDIR)/$(BUILD)
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib)
ifeq ($(strip $(ICON)),) icons := $(wildcard $(dir $(TARGET))*.bmp)
icons := $(wildcard *.bmp)
ifneq (,$(findstring $(TARGET).bmp,$(icons))) ifneq (,$(findstring $(TARGET).bmp,$(icons)))
export GAME_ICON := $(CURDIR)/$(TARGET).bmp export GAME_ICON := $(CURDIR)/$(TARGET).bmp
else
ifneq (,$(findstring icon.bmp,$(icons)))
export GAME_ICON := $(CURDIR)/icon.bmp
endif
endif
else else
ifeq ($(suffix $(ICON)), .grf) ifneq (,$(findstring $(dir $(TARGET))icon.bmp,$(icons)))
export GAME_ICON := $(CURDIR)/$(ICON) export GAME_ICON := $(CURDIR)/$(dir $(TARGET))icon.bmp
else
export GAME_ICON := $(CURDIR)/$(BUILD)/$(notdir $(basename $(ICON))).grf
endif endif
endif endif
@ -179,7 +171,7 @@ else
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# main targets # main targets
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
$(OUTPUT).nds: $(OUTPUT).elf $(GAME_ICON) $(OUTPUT).nds: $(OUTPUT).elf
$(OUTPUT).elf: $(OFILES) $(OUTPUT).elf: $(OFILES)
# need to build soundbank first # need to build soundbank first
@ -208,14 +200,6 @@ $(SOUNDBANK) : $(MODFILES)
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
grit $< -fts -o$* grit $< -fts -o$*
#---------------------------------------------------------------------------------
# Convert non-GRF game icon to GRF if needed
#---------------------------------------------------------------------------------
$(GAME_ICON): $(notdir $(ICON))
#---------------------------------------------------------------------------------
@echo convert $(notdir $<)
@grit $< -g -gt -gB4 -gT FF00FF -m! -p -pe 16 -fh! -ftr
-include $(DEPSDIR)/*.d -include $(DEPSDIR)/*.d
#--------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------

BIN
nds/icon.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 B