; player perform action a
player_do_action_a:
call player_load_target_tile
- call map_get_tile
-
+ ld de, player
ld a, [player_action_a]
ld h, a
ld a, [player_action_a+1]
ld l, a
jp action_exec
+
+
+ ; player perform action b
+player_do_action_b:
+ call player_load_target_tile
+ ld de, player
+ ld a, [player_action_b]
+ ld h, a
+ ld a, [player_action_b+1]
+ ld l, a
+ jp action_exec
; moves the player
; does not move out of bounds
player_handle_move:
ld b, BTNA
input_just
- jr z, @not_attack REL
- ld de, player
+ jr z, @not_action_a REL
call player_do_action_a
-@not_attack:
+@not_action_a:
+
+ ld b, BTNB
+ input_just
+ jr z, @not_action_b REL
+ call player_do_action_b
+@not_action_b:
ld b, DIRLEFT
input_held