From: Lukas Krickl Date: Sun, 13 Jul 2025 15:31:55 +0000 (+0200) Subject: mainmenu: added stubs for main menu X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=ddaf5055cfc69994bf25ba3c6bcc94a880af0d79;p=gbrg%2F.git mainmenu: added stubs for main menu --- diff --git a/src/main.s b/src/main.s index 1de7290..dc000d2 100644 --- a/src/main.s +++ b/src/main.s @@ -72,6 +72,7 @@ main: #include "actortables.s" #include "exittables.s" #include "demos.s" +#include "mainmenu.s" ; fill bank .fill 0xFF, 0x7FFF - $ diff --git a/src/mainmenu.s b/src/mainmenu.s new file mode 100644 index 0000000..7dc3fba --- /dev/null +++ b/src/mainmenu.s @@ -0,0 +1,19 @@ + + ; update main menu state + ; handles cursor sprite drawing + ; handles file/new game selection +main_menu_update: + ldnull bc + ret + + ; inits main menu + ; draws the menu screen to SCRN0 +main_menu_init: + ldnull bc + ret + +st_main_menu_update: + st_def 0x00, main_menu_update, st_main_menu_update + +st_main_menu_init: + st_def 0x00, main_menu_init, st_main_menu_update diff --git a/src/state.s b/src/state.s index 3ddd966..98a687c 100644 --- a/src/state.s +++ b/src/state.s @@ -81,10 +81,4 @@ st_null_fn: st_null: st_def 0xFF, st_null_fn, st_null -st_update_game: - st_def 0x00, update_game, st_update_game -st_update_pause: - st_def 0x00, update_pause, st_update_pause -st_update_game_over: - st_def 0x00, update_game_over, st_update_game_over diff --git a/src/update.s b/src/update.s index e69854c..7f92fd1 100644 --- a/src/update.s +++ b/src/update.s @@ -1,10 +1,10 @@ update_game_over: + ldnull bc ret update_game: ; tick rng every frame call rand - call rand_save_srand ; clear oam call shadow_oam_clear @@ -36,3 +36,9 @@ update: jp st_update +st_update_game: + st_def 0x00, update_game, st_update_game +st_update_pause: + st_def 0x00, update_pause, st_update_pause +st_update_game_over: + st_def 0x00, update_game_over, st_update_game_over