Skip to content

Commit

Permalink
fixed a bug in the explorer room cycling commands
Browse files Browse the repository at this point in the history
enabled bilinear interpolation texture filtering for item wheel
changed room input base to decimal
updated USAGE.md
  • Loading branch information
glankk committed Dec 26, 2016
1 parent cf5293b commit 2892d18
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 4 additions & 6 deletions src/gz/explorer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion src/gz/gz.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
{
Expand Down Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/gz/item_option.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 2892d18

Please sign in to comment.