From 2892d18f75e4899c8fefe226bb2665dbe374d9e4 Mon Sep 17 00:00:00 2001 From: glankk Date: Mon, 26 Dec 2016 16:07:26 +0100 Subject: [PATCH] fixed a bug in the explorer room cycling commands enabled bilinear interpolation texture filtering for item wheel changed room input base to decimal updated USAGE.md --- USAGE.md | 3 ++- src/gz/explorer.c | 10 ++++------ src/gz/gz.c | 4 +++- src/gz/item_option.c | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/USAGE.md b/USAGE.md index 68a38146..0c5c35d6 100644 --- a/USAGE.md +++ b/USAGE.md @@ -217,7 +217,8 @@ For example, a command with the button combo `R + A` will only be activated if you press R first and then A, or R and A at the same time. `A + R`, or `R + B + A` will not activate the corresponding command. -If two or more button combos interfere with one another, the most recently activated will take priority. +If the set of buttons in one button combo is a subset of those in another button combo, +the former will be overridden by the latter when both are active simultaneously. The following commands are available: - **show/hide menu**: Opens the utility menu if it's closed, closes it if it's opened. diff --git a/src/gz/explorer.c b/src/gz/explorer.c index 5d31128f..813aa2b9 100644 --- a/src/gz/explorer.c +++ b/src/gz/explorer.c @@ -192,8 +192,6 @@ static int enter_proc(struct menu_item *item) { input_reserve(BUTTON_D_UP | BUTTON_D_DOWN | BUTTON_D_LEFT | BUTTON_D_RIGHT | BUTTON_Z); - input_bind_set_override(COMMAND_PREVROOM, 1); - input_bind_set_override(COMMAND_NEXTROOM, 1); input_bind_set_disable(COMMAND_PREVROOM, 0); input_bind_set_disable(COMMAND_NEXTROOM, 0); return 0; @@ -203,8 +201,6 @@ static int leave_proc(struct menu_item *item) { input_free(BUTTON_D_UP | BUTTON_D_DOWN | BUTTON_D_LEFT | BUTTON_D_RIGHT | BUTTON_Z); - input_bind_set_override(COMMAND_PREVROOM, 0); - input_bind_set_override(COMMAND_NEXTROOM, 0); input_bind_set_disable(COMMAND_PREVROOM, 1); input_bind_set_disable(COMMAND_NEXTROOM, 1); return 0; @@ -231,8 +227,10 @@ static int draw_proc(struct menu_item *item, static Gfx null_dl = gsSPEndDisplayList(); struct item_data *data = item->data; /* handle input */ - uint16_t pad = input_pad(); - if (!(pad & BUTTON_R)) { + if (!input_bind_held(COMMAND_PREVROOM) && + !input_bind_held(COMMAND_NEXTROOM)) + { + uint16_t pad = input_pad(); if (pad & BUTTON_Z) { if (pad & BUTTON_D_UP) data->y += 50.f; diff --git a/src/gz/gz.c b/src/gz/gz.c index 98517010..0760aa6d 100644 --- a/src/gz/gz.c +++ b/src/gz/gz.c @@ -1848,7 +1848,7 @@ ENTRY void _start() menu_add_static(&menu_scene, 0, 4, "room", 0xC0C0C0); { struct menu_item *item; - item = menu_add_intinput(&menu_scene, 5, 4, 16, 2, NULL, NULL); + item = menu_add_intinput(&menu_scene, 5, 4, 10, 2, NULL, NULL); menu_add_button(&menu_scene, 0, 5, "load room", load_room_proc, item); } { @@ -2436,6 +2436,8 @@ ENTRY void _start() } input_bind_set_override(COMMAND_MENU, 1); input_bind_set_override(COMMAND_RETURN, 1); + input_bind_set_override(COMMAND_PREVROOM, 1); + input_bind_set_override(COMMAND_NEXTROOM, 1); input_bind_set_disable(COMMAND_PREVROOM, 1); input_bind_set_disable(COMMAND_NEXTROOM, 1); } diff --git a/src/gz/item_option.c b/src/gz/item_option.c index 0e564c81..f4825a3d 100644 --- a/src/gz/item_option.c +++ b/src/gz/item_option.c @@ -129,7 +129,7 @@ static int wheel_draw_proc(struct menu_item *item, gsDPSetTextureLUT(G_TT_NONE), gsDPSetTextureLOD(G_TL_TILE), /* texture filter */ - gsDPSetTextureFilter(G_TF_POINT), + gsDPSetTextureFilter(G_TF_BILERP), gsDPSetTextureConvert(G_TC_FILT), /* color combiner */ gsDPSetCombineKey(G_OFF),