unit_demo_1_init:
ldnull bc
ret
-
+
+ ; inputs
+ ; de: actor
unit_demo_1_update:
; TODO: call with correct values
ldnull hl
ld a, 1 ; hard-coded action remaining
+ push de
call unit_handle_inputs
+ pop de
+ ; inputs
+ ; de: actor
unit_demo_1_draw:
ld b, 0x84 ; tile
ld c, 0x00 ; flags
+ push de
call unit_generic_draw
+ pop de
ldnull bc
ret
; draws any unit
; inputs:
+ ; de: actor
; b: tile
; c: flags
unit_generic_draw:
; generic unit input handler
; inputs:
+ ; de: actor
; hl: action table
; a: remaining moves
unit_handle_inputs:
+ input_held BTNUP
+ jr z, @notup REL
+
+ ; call unit_try_abort_move_up
+ ; call scroll_center
+@notup:
+
ldnull bc
ret