ld a, PROJECTILE_F_PLAYER
ld [hl], a
-
ret
; updates a simple pistol projectile
; inputs:
; de: actor ptr
act_projectile_pistol_update:
+ ; is this a player actor?
+ ld hl, act_p0
+ add hl, de
+ ld a, [hl] ; load projectile p0 flags
+ and a, PROJECTILE_F_PLAYER
+ jp nz, @player
+
+ ; TODO:
+ ; enemy projectile logic
+
+ ret
+@player:
ld hl, act_pos_y
add hl, de
ld b, a
ld a, [hl]
ld c, a ; c = x pos
-
+
push de
ld a, RF_PLAYER
call actor_write_default_collider
; check enemy collision
- ; TODO: if player projectile check enemies, otherwise
- ; check player
pop de
push de