From: Lukas Krickl Date: Sun, 14 Sep 2025 15:59:11 +0000 (+0200) Subject: debug: made debug menu interactive X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=05500e08bf761fd85a30b15ed44ba2140c202922;p=gbrg%2F.git debug: made debug menu interactive --- diff --git a/src/debug.s b/src/debug.s index 408e8b6..cb60f7e 100644 --- a/src/debug.s +++ b/src/debug.s @@ -13,7 +13,7 @@ debug_menu_str_table: dw str_dbg_clear_actors debug_menu_str_table_end: -#define DEBUG_MENU_STR_TABLE_LEN (debug_menu_str_table_end - debug_menu_str_table) +#define DEBUG_MENU_STR_TABLE_LEN (debug_menu_str_table_end - debug_menu_str_table) / 2 debug_menu_action_table: debug_menu_action_table_end: @@ -32,6 +32,13 @@ update_debug_menu: ret @notb: + ; update menu + ld a, [debug_menu_cursor] + ld hl, debug_menu_str_table + ld b, DEBUG_MENU_STR_TABLE_LEN + call select_menu_update + ld [debug_menu_cursor], a + ldnull bc ret @@ -46,7 +53,7 @@ debug_menu_init: ld [hl], a ; draw initial status line - ld a, [action_menu_cursor] + ld a, [debug_menu_cursor] ld b, DEBUG_MENU_STR_TABLE_LEN ld hl, debug_menu_str_table call select_menu_draw_status diff --git a/src/wram.s b/src/wram.s index ec5fac1..82691c4 100644 --- a/src/wram.s +++ b/src/wram.s @@ -74,6 +74,7 @@ redraw_shadow: .adv 2 redraw_steps: .adv 1 action_menu_cursor: .adv 1 +debug_menu_cursor: .adv 1 ; simple menu delay timer select_menu_delay: .adv 1