ld a, GM_GAME
ld [game_mode], a
+ ; player starts the turn
+ ld a, WHO_PLAYER
+ ld [who], a
+
call mbc1_init
ret
; MBC1 functions
; ==============
- ; if the first byte of sram is not this
- ; value clear it all
-#define MBC1_SRAM_MAGIC 0xA1
mbc1_init:
call mbc1_ram_enable
game_mode: .adv 1
+
+#define WHO_PLAYER 0xFF
+ ; who is currently in control of the game
+ ; if set to FF
+ ; the player is active
+ ; otherwise it is the actor index
+ ; actors may still run update code like animations
+ ; but may *never* act when they are not currently enabled
+who: .adv 1
+
; collision tile tmp values
ct_poy: .adv 1
ct_pox: .adv 1