ret
+ ; displays the current unit
+ui_display_current_unit:
+ ld a, [ui_draw_actor]
+ ld e, a
+ ld a, [ui_draw_actor+1]
+ ld d, a
+
+ ld b, CURSOR_TILE
+ ld c, 0
+ call unit_generic_draw
+
+ ret
+
; update the UI
; this should only be called
; during blanking
ui_draw:
+ call ui_display_current_unit
+
ld a, [draw_flags]
xor a, DRAWF_UPDATE_UI
ld [draw_flags], a
call unit_demo_1_draw
pop bc
ret
+
+ ; inputs
+ ; de: actor
+unit_demo_1_idle:
+ call unit_demo_1_draw
+ ret
; inputs
; de: actor
ld hl, act_moves
add hl, de
ld [hl], 0 ; moves = 0
+unit_next_no_current:
@again:
xor a, a
ld [unit_next_best_init], a
unit_demo_1:
- st_def 0x00, unit_demo_1_init, st_unit_demo_1_update
+ st_def 0x00, unit_demo_1_init, st_unit_demo_1_idle
act_def ACT_T_DEMO_1, 0, 1, 2, 3, 4, 5, 2, 2, 0
- act_st_def NULL, NULL, st_unit_demo_1_update, NULL
-
+ act_st_def NULL, NULL, st_unit_demo_1_update, st_unit_demo_1_idle
+
+
+unit_demo_2:
+ st_def 0x00, unit_demo_1_init, st_unit_demo_1_idle
+ act_def ACT_T_DEMO_1, 0, 1, 2, 3, 4, 5, 3, 3, 0
+ act_st_def NULL, NULL, st_unit_demo_1_update, st_unit_demo_1_idle
+
st_unit_demo_1_update:
st_def 0x00, unit_demo_1_update, st_unit_demo_1_update
+st_unit_demo_1_idle:
+ st_def 0x00, unit_demo_1_idle, st_unit_demo_1_idle
+
st_unit_delay:
st_def CURSOR_MOVE_TIMER, st_null_fn, st_unit_switch_to_active