; inputs
; de: actor
-unit_demo_1_draw:
- ld b, 0x84 ; tile
- ld c, 0x00 ; flags
+unit_draw:
push de
+ ld hl, act_oam_tile
+ add hl, de ; hl = tile
+ ld a, [hl+]
+
+ ld b, a ; tile
+ ld a, [hl]
+ ld c, a ; flags
call unit_generic_draw
pop de
ldnull bc
st_def 0x00, unit_demo_1_init, st_unit_idle
act_def ACT_T_DEMO_1, 0, 1, 2, 3, 4, 6, 2, 2, 0
act_st_def NULL, NULL, st_unit_demo_1_update, st_unit_idle
- act_def_draw unit_demo_1_draw, 0x84, 0
+ act_def_draw unit_draw, 0x84, 0
unit_demo_2:
st_def 0x00, unit_demo_1_init, st_unit_idle
act_def ACT_T_DEMO_1, 0, 1, 2, 3, 1, 5, 3, 3, 0
act_st_def NULL, NULL, st_unit_demo_1_update, st_unit_idle
- act_def_draw unit_demo_1_draw, 0x84, 0
+ act_def_draw unit_draw, 0x84, 0
unit_demo_3:
st_def 0x00, unit_demo_1_init, st_unit_idle
act_def ACT_T_DEMO_1, 0, 1, 2, 3, 0, 5, 4, 4, 0
act_st_def NULL, NULL, st_unit_demo_1_update, st_unit_idle
- act_def_draw unit_demo_1_draw, 0x84, 0
+ act_def_draw unit_draw, 0x84, 0
st_unit_demo_1_update:
st_def 0x00, unit_demo_1_update, st_unit_demo_1_update