From 4d04038683f1ba410239ebd209b6cc9a32ed2697 Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Mon, 8 Sep 2025 05:20:18 +0200 Subject: [PATCH] shoot: Added stub for shoot action --- src/action_menu.s | 8 ++++---- src/shoot.s | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/action_menu.s b/src/action_menu.s index f4dc62a..ea34afd 100644 --- a/src/action_menu.s +++ b/src/action_menu.s @@ -2,8 +2,8 @@ str_am_attack: .str "attack" .db 0 -str_am_eat: -.str "eat" +str_am_shoot: +.str "shoot" .db 0 str_am_rest: @@ -18,7 +18,7 @@ str_am_pick_up: action_menu_str_table: dw str_am_attack dw str_am_pick_up - dw str_am_eat + dw str_am_shoot dw str_am_rest action_menu_str_table_end: @@ -26,7 +26,7 @@ action_menu_str_table_end: action_menu_action_table: dw st_action_attack_init dw st_action_attack_init - dw st_action_attack_init + dw st_action_shoot_init dw st_action_rest action_menu_action_table_end: diff --git a/src/shoot.s b/src/shoot.s index 6f1c05e..fd35b00 100644 --- a/src/shoot.s +++ b/src/shoot.s @@ -2,3 +2,20 @@ ; cast a ray in direction ; hit first actor found ; and attacking actor plays a small shoot animation + +unit_action_shoot_pick_direction_init: + ld hl, STR_ATTACK_DIRECTION + ld de, UI_STATUS_LINE + call puts + call ui_request_redraw + ldnull bc + ret + +unit_action_shoot_pick_direction: + ld bc, st_unit_delay_to_active_template + jp unit_action_pick_direction + +st_action_shoot_init: + st_def 0x00, unit_action_shoot_pick_direction_init, st_action_shoot_pick_direction +st_action_shoot_pick_direction: + st_def 0x00, unit_action_shoot_pick_direction, st_action_shoot_pick_direction -- 2.30.2