#define PISTOL_SPRITE 0x82
+; projectile flags
+.se 1
+.de PROJECTILE_F_PLAYER, 1
+
; spawns a pistol projectile for player
; inputs:
; hl: actor ptr
act_spawn_projectile_pistol_player:
ld a, ACT_T_PISTOL_BULLET
ld [hl], a ; write type
-
+
+ push hl
ld de, act_pos_y
add hl, de
; hl = new pos y
ld a, [player+act_pos_x]
add a, 4
ld [hl+], a
+ pop hl
+
+ ; set to player type
+ ld de, act_p0
+ add hl, de
+ ld a, PROJECTILE_F_PLAYER
+ ld [hl], a
+
ret