; returns:
; bc: next action
unit_action_attack:
- jp unit_switch_to_active
+ call ui_status_line_clear
+ ld bc, st_unit_delay_to_active_template
ret
; default attack state
#define DISTANCE_BGTA 1
#define DISTANCE_AGTB 0
-
+
+ ; alias for directions
+.def int DIRUP = BTNUP
+.def int DIRDOWN = BTNDOWN
+.def int DIRLEFT = BTNLEFT
+.def int DIRRIGHT = BTNRIGHT
STR_ATTACK_DIRECTION:
.str "attack direction?"
+.db 0
+
+STR_STATUS_CLEAR:
+.str " "
.db 0
; print a 0-terminated string to the screen
ld hl, STR_TEST
ld de, shadow_ui + 34
call puts
-
ret
-
+
+ ; clears the status line
+ ; and requests a UI redraw
+ui_status_line_clear:
+ ld hl, STR_STATUS_CLEAR
+ ld de, UI_STATUS_LINE
+ call puts
+ jp ui_request_redraw
; requests a redraw
; this will set up redraw_bg