diff --git a/Makefile.nds b/Makefile.nds index a45f3f7..1385a6b 100644 --- a/Makefile.nds +++ b/Makefile.nds @@ -140,21 +140,13 @@ export INCLUDE := $(foreach dir,$(INCLUDES),-iquote $(CURDIR)/$(dir))\ -I$(CURDIR)/$(BUILD) export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) -ifeq ($(strip $(ICON)),) - icons := $(wildcard *.bmp) +icons := $(wildcard $(dir $(TARGET))*.bmp) - ifneq (,$(findstring $(TARGET).bmp,$(icons))) - export GAME_ICON := $(CURDIR)/$(TARGET).bmp - else - ifneq (,$(findstring icon.bmp,$(icons))) - export GAME_ICON := $(CURDIR)/icon.bmp - endif - endif +ifneq (,$(findstring $(TARGET).bmp,$(icons))) + export GAME_ICON := $(CURDIR)/$(TARGET).bmp else - ifeq ($(suffix $(ICON)), .grf) - export GAME_ICON := $(CURDIR)/$(ICON) - else - export GAME_ICON := $(CURDIR)/$(BUILD)/$(notdir $(basename $(ICON))).grf + ifneq (,$(findstring $(dir $(TARGET))icon.bmp,$(icons))) + export GAME_ICON := $(CURDIR)/$(dir $(TARGET))icon.bmp endif endif @@ -179,7 +171,7 @@ else #--------------------------------------------------------------------------------- # main targets #--------------------------------------------------------------------------------- -$(OUTPUT).nds: $(OUTPUT).elf $(GAME_ICON) +$(OUTPUT).nds: $(OUTPUT).elf $(OUTPUT).elf: $(OFILES) # need to build soundbank first @@ -208,14 +200,6 @@ $(SOUNDBANK) : $(MODFILES) #--------------------------------------------------------------------------------- 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 #--------------------------------------------------------------------------------------- diff --git a/nds/icon.bmp b/nds/icon.bmp new file mode 100644 index 0000000..801ca64 Binary files /dev/null and b/nds/icon.bmp differ