diff --git a/.gitignore b/.gitignore index 9b9f4205..dcc08de7 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ # Ignore generated files in the libdragon FS /filesystem/FiraMonoBold.font64 /filesystem/*.wav64 +/filesystem/*.sprite # Ignore external development tools /tools/* diff --git a/Makefile b/Makefile index eac1f424..d8cf4edf 100644 --- a/Makefile +++ b/Makefile @@ -85,6 +85,30 @@ SOUNDS = \ error.wav \ settings.wav +JOYPAD_IMAGES = \ + joypad_a.png \ + joypad_b.png \ + joypad_c_down.png \ + joypad_c_left.png \ + joypad_c_right.png \ + joypad_c_up.png \ + joypad_d_down.png \ + joypad_d_left.png \ + joypad_d_right.png \ + joypad_d_up.png \ + joypad_l.png \ + joypad_r.png \ + joypad_start.png \ + joypad_z.png +# joypad_j_east.png \ +# joypad_j_north.png \ +# joypad_j_northeast.png \ +# joypad_j_northwest.png \ +# joypad_j_south.png \ +# joypad_j_southeast.png \ +# joypad_j_southwest.png \ +# joypad_j_west.png \ + OBJS = $(addprefix $(BUILD_DIR)/, $(addsuffix .o,$(basename $(SRCS)))) MINIZ_OBJS = $(filter $(BUILD_DIR)/libs/miniz/%.o,$(OBJS)) SPNG_OBJS = $(filter $(BUILD_DIR)/libs/libspng/%.o,$(OBJS)) @@ -92,7 +116,8 @@ DEPS = $(OBJS:.o=.d) FILESYSTEM = \ $(addprefix $(FILESYSTEM_DIR)/, $(notdir $(FONTS:%.ttf=%.font64))) \ - $(addprefix $(FILESYSTEM_DIR)/, $(notdir $(SOUNDS:%.wav=%.wav64))) + $(addprefix $(FILESYSTEM_DIR)/, $(notdir $(SOUNDS:%.wav=%.wav64))) \ + $(addprefix $(FILESYSTEM_DIR)/, $(notdir $(JOYPAD_IMAGES:%.png=%.sprite))) $(MINIZ_OBJS): N64_CFLAGS+=-DMINIZ_NO_TIME -fcompare-debug-second $(SPNG_OBJS): N64_CFLAGS+=-isystem $(SOURCE_DIR)/libs/miniz -DSPNG_USE_MINIZ -fcompare-debug-second @@ -101,14 +126,18 @@ $(FILESYSTEM_DIR)/%.wav64: AUDIOCONV_FLAGS=--wav-compress 1 $(@info $(shell mkdir -p ./$(FILESYSTEM_DIR) &> /dev/null)) -$(FILESYSTEM_DIR)/%.font64: $(ASSETS_DIR)/%.ttf +$(FILESYSTEM_DIR)/%.font64: $(ASSETS_DIR)/fonts/%.ttf @echo " [FONT] $@" @$(N64_MKFONT) $(MKFONT_FLAGS) -o $(FILESYSTEM_DIR) "$<" -$(FILESYSTEM_DIR)/%.wav64: $(ASSETS_DIR)/%.wav +$(FILESYSTEM_DIR)/%.wav64: $(ASSETS_DIR)/sounds/%.wav @echo " [AUDIO] $@" @$(N64_AUDIOCONV) $(AUDIOCONV_FLAGS) -o $(FILESYSTEM_DIR) "$<" +$(FILESYSTEM_DIR)/%.sprite: $(ASSETS_DIR)/images/joypad/%.png + @echo " [SPRITE] $@" + @$(N64_MKSPRITE) $(MKSPRITE_FLAGS) -o $(dir $@) "$<" + $(BUILD_DIR)/$(PROJECT_NAME).dfs: $(FILESYSTEM) $(BUILD_DIR)/menu/views/credits.o: .FORCE diff --git a/assets/FiraMonoBold.ttf b/assets/fonts/FiraMonoBold.ttf similarity index 100% rename from assets/FiraMonoBold.ttf rename to assets/fonts/FiraMonoBold.ttf diff --git a/assets/images/joypad/joypad_a.png b/assets/images/joypad/joypad_a.png new file mode 100644 index 00000000..9e6e6493 Binary files /dev/null and b/assets/images/joypad/joypad_a.png differ diff --git a/assets/images/joypad/joypad_b.png b/assets/images/joypad/joypad_b.png new file mode 100644 index 00000000..e5874cff Binary files /dev/null and b/assets/images/joypad/joypad_b.png differ diff --git a/assets/images/joypad/joypad_c_down.png b/assets/images/joypad/joypad_c_down.png new file mode 100644 index 00000000..773e1391 Binary files /dev/null and b/assets/images/joypad/joypad_c_down.png differ diff --git a/assets/images/joypad/joypad_c_left.png b/assets/images/joypad/joypad_c_left.png new file mode 100644 index 00000000..2896b627 Binary files /dev/null and b/assets/images/joypad/joypad_c_left.png differ diff --git a/assets/images/joypad/joypad_c_right.png b/assets/images/joypad/joypad_c_right.png new file mode 100644 index 00000000..7eca4a87 Binary files /dev/null and b/assets/images/joypad/joypad_c_right.png differ diff --git a/assets/images/joypad/joypad_c_up.png b/assets/images/joypad/joypad_c_up.png new file mode 100644 index 00000000..487eee68 Binary files /dev/null and b/assets/images/joypad/joypad_c_up.png differ diff --git a/assets/images/joypad/joypad_d_down.png b/assets/images/joypad/joypad_d_down.png new file mode 100644 index 00000000..4223ec3b Binary files /dev/null and b/assets/images/joypad/joypad_d_down.png differ diff --git a/assets/images/joypad/joypad_d_left.png b/assets/images/joypad/joypad_d_left.png new file mode 100644 index 00000000..fb467603 Binary files /dev/null and b/assets/images/joypad/joypad_d_left.png differ diff --git a/assets/images/joypad/joypad_d_right.png b/assets/images/joypad/joypad_d_right.png new file mode 100644 index 00000000..d9f3fd93 Binary files /dev/null and b/assets/images/joypad/joypad_d_right.png differ diff --git a/assets/images/joypad/joypad_d_up.png b/assets/images/joypad/joypad_d_up.png new file mode 100644 index 00000000..9689c3df Binary files /dev/null and b/assets/images/joypad/joypad_d_up.png differ diff --git a/assets/images/joypad/joypad_l.png b/assets/images/joypad/joypad_l.png new file mode 100644 index 00000000..e4d4e01d Binary files /dev/null and b/assets/images/joypad/joypad_l.png differ diff --git a/assets/images/joypad/joypad_r.png b/assets/images/joypad/joypad_r.png new file mode 100644 index 00000000..5d0ecb0a Binary files /dev/null and b/assets/images/joypad/joypad_r.png differ diff --git a/assets/images/joypad/joypad_start.png b/assets/images/joypad/joypad_start.png new file mode 100644 index 00000000..99c1ebb5 Binary files /dev/null and b/assets/images/joypad/joypad_start.png differ diff --git a/assets/images/joypad/joypad_z.png b/assets/images/joypad/joypad_z.png new file mode 100644 index 00000000..f3cb289e Binary files /dev/null and b/assets/images/joypad/joypad_z.png differ diff --git a/assets/back.wav b/assets/sounds/back.wav similarity index 100% rename from assets/back.wav rename to assets/sounds/back.wav diff --git a/assets/cursorsound.wav b/assets/sounds/cursorsound.wav similarity index 100% rename from assets/cursorsound.wav rename to assets/sounds/cursorsound.wav diff --git a/assets/enter.wav b/assets/sounds/enter.wav similarity index 100% rename from assets/enter.wav rename to assets/sounds/enter.wav diff --git a/assets/error.wav b/assets/sounds/error.wav similarity index 100% rename from assets/error.wav rename to assets/sounds/error.wav diff --git a/assets/settings.wav b/assets/sounds/settings.wav similarity index 100% rename from assets/settings.wav rename to assets/sounds/settings.wav