Prev: 9A38 Up: Map Next: 9A75
9A49: Collision of ship with enemy
Used by the routine at ship_hit_sprite.
Input
A enemy type
IX Sprite data of other sprite
IY Sprite data of ship
ship_hit_enemy 9A49 CP $0E If < $0E
9A4B JR C,ship_hit_enemy_1 Then set died flag and return
9A4D CP $12 If >= $12
9A4F JR NC,ship_hit_enemy_1 Then set died flag and return
9A51 LD HL,active_enemies Decrement active enemies
9A54 DEC (HL) ...
9A55 CALL deallocate_sprite_from_map Deallocate from map
9A58 LD (IX+$00),$04 Set sprite type to destroyed
9A5C LD (IX+$03),$0F Set animation counter
9A60 LD (IX+$04),$FF Set loaded patten index to none
9A64 LD (IX+$06),$00
9A68 RST $30 Load sprite pattern
This entry point is used by the routine at ship_hit_mine.
ship_hit_enemy_0 9A69 LD HL,total_enemies Decrement total enemies
9A6C DEC (HL) ...
This entry point is used by the routine at ship_hit_sprite.
ship_hit_enemy_1 9A6D LD HL,status_flags Set died flag
9A70 SET 2,(HL) ...
9A72 JP handle_collisions_1 Jump back into collisions loop
Prev: 9A38 Up: Map Next: 9A75