input_held BTNUP
jr z, @notup REL
- ; call unit_try_abort_move_up
- ; call scroll_center
+ call unit_try_move_up
@notup:
ldnull bc
ret
+ ; moves a unit up
+ ; moves are aborted
+ ; if no more initiative is left
+ ; a wall is hit, another unit is hit
+ ; or the edge of the map is hit
+ ; inputs:
+ ; de: actor
+ ; updates:
+ ; actor initiative based on tile flags
+ ; actor position
+unit_try_move_up:
+ ret
+
+ ; centers the current scroll on the selected unit
+ ; snaps to corners of the map
+ ; inputs:
+ ; de: actor
+unit_scroll_center:
+ ret
+
unit_demo_1:
st_def 0x00, unit_demo_1_init, st_unit_demo_1_update
act_def ACT_T_DEMO_1, 0, 1, 1, 1, 1, 1, 2, 2, 0