Prev: B833 Up: Map Next: B889
B870: Find the special beam's record
Used by the routines at beam_hits_ground_object and end_special_beam.
Looks through the first three shot records for one that is not a missile and has +15 bit 7 set. If none of the three is, IY is left at the fourth, unchecked. Also used by beam_hits_ground_object.
Output
IY the record
find_special_beam B870 LD IY,shot_records the first three records
B874 LD DE,$0018
B877 LD B,$03
find_special_beam_0 B879 BIT 7,(IY+$16)
B87D JR NZ,find_special_beam_1
B87F BIT 7,(IY+$15)
B883 RET NZ
find_special_beam_1 B884 ADD IY,DE
B886 DJNZ find_special_beam_0
B888 RET
Prev: B833 Up: Map Next: B889