Prev: 99A0 Up: Map Next: 9A08
99B1: Shot hit mine
Used by the routine at handle_shot_collision.
Input
IX Sprite data of shot
IY Mine data
shot_hit_mine 99B1 LD D,$0F Color
99B3 CALL remove_shot Remove shot
99B6 LD A,(IY+$06) Get mine data ?
99B9 CP $80 If not $80
99BB JR NZ,shot_hit_mine_0 Then jump ahead
99BD LD A,$08 Play sound
99BF CALL call_play_sound ...
99C2 LD A,(other_flags) If double shot is enabled
99C5 BIT 1,A ...
99C7 JR NZ,shot_hit_mine_0 Then skip offering double shot
99C9 LD HL,offset_double_shot_flag Set flag for offering double shot
99CC SET 0,(HL) ...
99CE LD DE,$0500 Points
99D1 JR shot_hit_mine_1 Jump ahead
shot_hit_mine_0 99D3 LD A,$04 Play sound
99D5 CALL call_play_sound ...
99D8 LD HL,mines_destroyed Get mines destroyed
99DB LD A,(HL) ...
99DC INC (HL) Increment mines destroyed
99DD ADD A,A x2
99DE LD HL,score_table Score table
99E1 RST $08 Add A to HL
99E2 LD D,(HL) Get points (hundreds)
99E3 INC HL Next address in table
99E4 LD A,(HL) Get points sprite type ($06 - $0B)
99E5 LD (IX+$06),A Save in sprite data
99E8 LD E,$00 LSB of points
This entry point is used by the routine at shot_hit_mine.
shot_hit_mine_1 99EA PUSH DE Save score
99EB LD (IY+$04),$00 Remove mine
99EF LD (IY+$05),$00 ...
99F3 PUSH IX
99F5 CALL display_background_patterns Display background patterns
99F8 LD HL,mines_left Decrement mines left
99FB DEC (HL) ...
99FC JR NZ,shot_hit_mine_2 Skip ahead if any left
99FE LD HL,other_flags Clear mines flag
9A01 RES 2,(HL) ...
shot_hit_mine_2 9A03 POP IX
9A05 POP DE Restore score
9A06 JR add_points_in_de Add points to score
Prev: 99A0 Up: Map Next: 9A08