mainmenu: added stubs for main menu
authorLukas Krickl <lukas@krickl.dev>
Sun, 13 Jul 2025 15:31:55 +0000 (17:31 +0200)
committerLukas Krickl <lukas@krickl.dev>
Sun, 13 Jul 2025 15:31:55 +0000 (17:31 +0200)
src/main.s
src/mainmenu.s [new file with mode: 0644]
src/state.s
src/update.s

index 1de729003281af36636de196221a1635d348758c..dc000d2a09c1937f85d08560f2037f2ae662c0ca 100644 (file)
@@ -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 (file)
index 0000000..7dc3fba
--- /dev/null
@@ -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
index 3ddd966a7472c1ede8768e0d98c718cfb0c20490..98a687c93680a7fa18d73ad338f3de4f3818fa79 100644 (file)
@@ -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
 
index e69854c6424ac1d882bcd8665e4497651bfb5c21..7f92fd15471a04c84046a2ad2a16d5145c142eab 100644 (file)
@@ -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