Skip to content

Commit

Permalink
Merge branch 'develop' into autoload-disks
Browse files Browse the repository at this point in the history
  • Loading branch information
networkfusion authored Dec 23, 2024
2 parents b0a5015 + b984b1b commit 6bcccf7
Show file tree
Hide file tree
Showing 18 changed files with 22 additions and 45 deletions.
28 changes: 2 additions & 26 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,30 +85,6 @@ 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))
Expand All @@ -117,7 +93,7 @@ DEPS = $(OBJS:.o=.d)
FILESYSTEM = \
$(addprefix $(FILESYSTEM_DIR)/, $(notdir $(FONTS:%.ttf=%.font64))) \
$(addprefix $(FILESYSTEM_DIR)/, $(notdir $(SOUNDS:%.wav=%.wav64))) \
$(addprefix $(FILESYSTEM_DIR)/, $(notdir $(JOYPAD_IMAGES:%.png=%.sprite)))
$(addprefix $(FILESYSTEM_DIR)/, $(notdir $(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
Expand All @@ -134,7 +110,7 @@ $(FILESYSTEM_DIR)/%.wav64: $(ASSETS_DIR)/sounds/%.wav
@echo " [AUDIO] $@"
@$(N64_AUDIOCONV) $(AUDIOCONV_FLAGS) -o $(FILESYSTEM_DIR) "$<"

$(FILESYSTEM_DIR)/%.sprite: $(ASSETS_DIR)/images/joypad/%.png
$(FILESYSTEM_DIR)/%.sprite: $(ASSETS_DIR)/images/%.png
@echo " [SPRITE] $@"
@$(N64_MKSPRITE) $(MKSPRITE_FLAGS) -o $(dir $@) "$<"

Expand Down
Binary file removed assets/images/joypad/joypad_a.png
Binary file not shown.
Binary file removed assets/images/joypad/joypad_b.png
Binary file not shown.
Binary file removed assets/images/joypad/joypad_c_down.png
Binary file not shown.
Binary file removed assets/images/joypad/joypad_c_left.png
Binary file not shown.
Binary file removed assets/images/joypad/joypad_c_right.png
Binary file not shown.
Binary file removed assets/images/joypad/joypad_c_up.png
Binary file not shown.
Binary file removed assets/images/joypad/joypad_d_down.png
Binary file not shown.
Binary file removed assets/images/joypad/joypad_d_left.png
Binary file not shown.
Binary file removed assets/images/joypad/joypad_d_right.png
Binary file not shown.
Binary file removed assets/images/joypad/joypad_d_up.png
Binary file not shown.
Binary file removed assets/images/joypad/joypad_l.png
Binary file not shown.
Binary file removed assets/images/joypad/joypad_r.png
Binary file not shown.
Binary file removed assets/images/joypad/joypad_start.png
Binary file not shown.
Binary file removed assets/images/joypad/joypad_z.png
Binary file not shown.
2 changes: 1 addition & 1 deletion src/menu/views/flashcart_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static void draw (menu_t *menu, surface_t *d) {
" Automatic CIC: %s.\n"
" Region Detection: %s.\n"
" Save Writeback: %s.\n"
" Update from menu: %s.\n"
" Auto F/W Updates: %s.\n"
"\n\n",
format_cart_type(),
"Not Available", // TODO get cart firmware version(s).
Expand Down
35 changes: 18 additions & 17 deletions src/menu/views/settings_editor.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ static const char *format_switch (bool state) {
}
}

static void set_pal60_type (menu_t *menu, void *arg) {
menu->settings.pal60_enabled = (bool)(uintptr_t)(arg);
settings_save(&menu->settings);
}

static void set_protected_entries_type (menu_t *menu, void *arg) {
menu->settings.show_protected_entries = (bool)(uintptr_t)(arg);
settings_save(&menu->settings);
Expand All @@ -35,6 +30,11 @@ static void set_sound_enabled_type (menu_t *menu, void *arg) {
}

#ifdef BETA_SETTINGS
static void set_pal60_type (menu_t *menu, void *arg) {
menu->settings.pal60_enabled = (bool)(uintptr_t)(arg);
settings_save(&menu->settings);
}

static void set_bgm_enabled_type (menu_t *menu, void *arg) {
menu->settings.bgm_enabled = (bool)(uintptr_t)(arg);
settings_save(&menu->settings);
Expand All @@ -52,12 +52,6 @@ static void set_rumble_enabled_type (menu_t *menu, void *arg) {
#endif


static component_context_menu_t set_pal60_type_context_menu = { .list = {
{.text = "On", .action = set_pal60_type, .arg = (void *)(uintptr_t)(true) },
{.text = "Off", .action = set_pal60_type, .arg = (void *) (false) },
COMPONENT_CONTEXT_MENU_LIST_END,
}};

static component_context_menu_t set_protected_entries_type_context_menu = { .list = {
{.text = "On", .action = set_protected_entries_type, .arg = (void *)(uintptr_t)(true) },
{.text = "Off", .action = set_protected_entries_type, .arg = (void *)(uintptr_t)(false) },
Expand All @@ -77,6 +71,12 @@ static component_context_menu_t set_use_saves_folder_type_context_menu = { .list
}};

#ifdef BETA_SETTINGS
static component_context_menu_t set_pal60_type_context_menu = { .list = {
{.text = "On", .action = set_pal60_type, .arg = (void *)(uintptr_t)(true) },
{.text = "Off", .action = set_pal60_type, .arg = (void *) (false) },
COMPONENT_CONTEXT_MENU_LIST_END,
}};

static component_context_menu_t set_bgm_enabled_type_context_menu = { .list = {
{.text = "On", .action = set_bgm_enabled_type, .arg = (void *)(uintptr_t)(true) },
{.text = "Off", .action = set_bgm_enabled_type, .arg = (void *)(uintptr_t)(false) },
Expand All @@ -91,11 +91,11 @@ static component_context_menu_t set_rumble_enabled_type_context_menu = { .list =
#endif

static component_context_menu_t options_context_menu = { .list = {
{ .text = "PAL60 Mode", .submenu = &set_pal60_type_context_menu },
{ .text = "Show Hidden Files", .submenu = &set_protected_entries_type_context_menu },
{ .text = "Sound Effects", .submenu = &set_sound_enabled_type_context_menu },
{ .text = "Use Saves Folder", .submenu = &set_use_saves_folder_type_context_menu },
#ifdef BETA_SETTINGS
{ .text = "PAL60 Mode", .submenu = &set_pal60_type_context_menu },
{ .text = "Background Music", .submenu = &set_bgm_enabled_type_context_menu },
{ .text = "Rumble Feedback", .submenu = &set_rumble_enabled_type_context_menu },
// { .text = "Restore Defaults", .action = set_use_default_settings },
Expand Down Expand Up @@ -136,27 +136,28 @@ static void draw (menu_t *menu, surface_t *d) {
ALIGN_LEFT, VALIGN_TOP,
"\n\n"
" Default Directory : %s\n\n"
" Autoload ROM : %s\n"
" Autoload ROM : %s\n\n"
"To change the following menu settings, press 'A':\n"
"* PAL60 Mode : %s\n"
" Show Hidden Files : %s\n"
" Use Saves folder : %s\n"
" Sound Effects : %s\n"
#ifdef BETA_SETTINGS
"* PAL60 Mode : %s\n"
" Background Music : %s\n"
" Rumble Feedback : %s\n"
#endif
"\n\n"
"Note: Certain settings have the following caveats:\n"
"* Requires rebooting the N64 Console.\n",
"* Requires rebooting the N64 Console.\n"
#endif
,
menu->settings.default_directory,
format_switch(menu->settings.rom_autoload_enabled),
format_switch(menu->settings.pal60_enabled),
format_switch(menu->settings.show_protected_entries),
format_switch(menu->settings.use_saves_folder),
format_switch(menu->settings.sound_enabled)
#ifdef BETA_SETTINGS
,
format_switch(menu->settings.pal60_enabled),
format_switch(menu->settings.bgm_enabled),
format_switch(menu->settings.rumble_enabled)
#endif
Expand Down

0 comments on commit 6bcccf7

Please sign in to comment.