Prev: 9924 Up: Map Next: 9978
9934: Shot hit sprite enemy
Used by the routine at shot_hit_sprite.
Input
A Sound to play
IX Sprite data of shot
IY Sprite data of enemy
shot_hit_sprite_enemy 9934 LD A,$04 Sound = 4
This entry point is used by the routine at shot_hit_sprite.
shot_hit_sprite_enemy_0 9936 CALL call_play_sound Play sound
9939 PUSH IX Save shot address
993B PUSH IY Save enemy address
993D POP IX IX = enemy address
993F CALL deallocate_sprite_from_map Deallocate from map
9942 POP IX IX = shot address
9944 LD (IY+$00),$7F Set enemy sprite type to unallocated
9948 LD D,(IY+$0B) Get color
994B CALL remove_shot Remove shot
994E LD DE,$0100 Points
9951 LD HL,bonus_enemies_hit Record hit
9954 INC (HL) ...
9955 LD HL,active_enemies Decrement active enemies
9958 DEC (HL) ...
9959 JR NZ,add_points_in_de If still active enemies then add default points
995B LD A,(status_flags) Are all waves complete?
995E BIT 1,A ...
9960 JR Z,add_points_from_enemy If not add points from enemy
9962 LD A,(other_flags) Test wave flag
9965 BIT 5,A ...
9967 JR NZ,add_points_in_de If not wave then add default points
9969 LD A,(center_map_entries) Get center enemies
996C OR A Is it zero?
996D JR NZ,add_points_in_de If not, add default points
996F LD DE,$1100 A lot more points
9972 LD (IX+$06),$07 Points sprite to show?
9976 JR add_points_in_de Add points
Prev: 9924 Up: Map Next: 9978