shoot: Added stub for shoot action
authorLukas Krickl <lukas@krickl.dev>
Mon, 8 Sep 2025 03:20:18 +0000 (05:20 +0200)
committerLukas Krickl <lukas@krickl.dev>
Mon, 8 Sep 2025 03:20:18 +0000 (05:20 +0200)
src/action_menu.s
src/shoot.s

index f4dc62ab4bc7f56ae22d8694bb30db4d749ad640..ea34afddfa224c6c9a7bad9031bc23eabb68c13d 100644 (file)
@@ -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:
 
index 6f1c05ed32fcfc2227c49eef6d0e8cfa5629b25f..fd35b0035dc288f48e6f6e15ce1c0b5d10eaa453 100644 (file)
@@ -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