OC := arm-none-eabi-objcopy
name := Corbenik
-cons ?= n3ds
+
+# If unset, the primary folder is /corbenik.
fw_folder ?= corbenik
dir_source := source
$(call rwildcard, $(dir_source), *.s *.c)))
.PHONY: all
-all: a9lh modules external host/langemu.conf
+all: host/langemu.conf a9lh modules external
.PHONY: modules
modules:
.PHONY: clean
clean:
+ rm -f host/langemu.conf
make -C modules clean
make -C external clean
- rm -f host/langemu.conf
rm -rf $(dir_out) $(dir_build)
.PHONY: $(dir_out)/arm9loaderhax.bin
};
static int cursor_y = 0;
+static int cursor_max = 0;
static int which_menu = 1;
static int need_redraw = 1;
{
set_cursor(TOP_SCREEN, 0, 0);
+ // Figure out the max if unset.
+ if (cursor_max == 0) {
+ cursor_max=0;
+ while(options[cursor_max].index != -1)
+ ++cursor_max;
+ }
+
header("A:Enter B:Back DPAD:Nav");
int i = 0;
switch (key) {
case BUTTON_UP:
cursor_y -= 1;
- if (cursor_y < 0)
- cursor_y = 0;
break;
case BUTTON_DOWN:
cursor_y += 1;
- if (options[cursor_y].index == -1)
- cursor_y -= 1;
+ break;
+ case BUTTON_LEFT:
+ cursor_y -= 5;
+ break;
+ case BUTTON_RIGHT:
+ cursor_y += 5;
break;
case BUTTON_A:
// TODO - Value options
break;
}
+ if (cursor_y < 0) {
+ cursor_y = cursor_max - 1;
+ }
+ else if (cursor_y > cursor_max - 1) {
+ cursor_y = 0;
+ }
+
return 0;
}