battle: Added stub for battle mode
authorLukas Krickl <lukas@krickl.dev>
Wed, 13 Aug 2025 16:21:12 +0000 (18:21 +0200)
committerLukas Krickl <lukas@krickl.dev>
Wed, 13 Aug 2025 16:21:12 +0000 (18:21 +0200)
src/battle.s [new file with mode: 0644]
src/main.s

diff --git a/src/battle.s b/src/battle.s
new file mode 100644 (file)
index 0000000..6d4c2d1
--- /dev/null
@@ -0,0 +1,26 @@
+       ; transitions to battle view
+       ; redraws the tilemap to battle view
+       ; and sets up battle UI
+       ;        *if* the player is being touched by 
+       ; an enemy. All adjacent enemies to the player are
+       ; moved into combat.
+       ; the current map's state is preserved.
+       ; transitions game state to battle
+       ; inputs:
+       ;               de: player actor
+battle_enter:
+       ret
+
+       ; exits battle mode
+       ; and reloads the map
+       ; without re-generating it.
+       ; the map simply needs to be drawn again
+battle_exit:
+       ret
+
+battle_update:
+       ldnull bc
+       ret
+
+st_update_battle:
+       st_def 0x00, battle_update, st_update_battle
index 677a7f4e3ab8d3e44c6e3cfbd45837252ac02218..14b03a7b3b9db2e273c1e1eb57d501048b630060 100644 (file)
@@ -77,6 +77,7 @@ main:
 #include "mainmenu.s"
 #include "actsave.s"
 #include "objanim.s"
+#include "battle.s"
 
 ; fill bank
 .fill 0xFF, 0x4000 - $