#define NULL 0
-#define ACTS_PLAYER_PROJECTILES 3
+#define ACTS_PLAYER_PROJECTILES 6
#define ACTS_ENEMY 6
#define ACTS_ENEMY_PROJECTILES 6
#define ACTS_MAX (ACTS_PLAYER_PROJECTILES + ACTS_ENEMY + ACTS_ENEMY_PROJECTILES)
@not_right:
ld b, BTNA
- input_just
+ input_held
jr z, @not_a REL
call player_shoot
@not_a:
ld a, 8
call actor_draw
ret
-
+
+
+#define PLAYER_SHOOT_DELAY 15
; shoots the player's current weapon
player_shoot:
+ ld a, [player_shoot_delay]
+ cp a, 0
+ jp nz, @tick
+
; TODO: check player curr weapon
call actor_try_add_player_projectile
ret z
call act_spawn_projectile_pistol_player
+
+ ld a, PLAYER_SHOOT_DELAY
+ ld [player_shoot_delay], a
+
+ ret
+@tick:
+ dec a
+ ld [player_shoot_delay], a
ret
; combination of update and draw call
; if player y < next_scroll
; advance if possible
player_next_scroll_y: .adv 1
-
+
+player_shoot_delay: .adv 1
; y/x sub pixel movement for player
player_sub_pixel_y: .adv 1