Prev: 912C Up: Map Next: 9177
9148: Check that a crusher has killed Monty
This is done by checking the area three lines under the crusher is empty
If not, Monty must be underneath it, and is crushed!
9148 LD A,(IY+$01) Get the crusher Y co-ordinate.
914B SUB $09 Convert it to a screen offset.
914D LD L,A
914E LD H,$00
9150 ADD HL,HL
9151 LD DE,$EA60 Add to the screen offset buffer EA60 to get the right screen position.
9154 ADD HL,DE
9155 LD A,(HL) Put the screen position in HL.
9156 INC HL
9157 LD H,(HL)
9158 LD L,A
9159 LD D,$00 Add the X co-ordinate to get the correct screen address.
915B LD E,(IY+$00)
915E ADD HL,DE
915F EX DE,HL Convert the screen offset to an offset in the buffer at D260.
9160 LD HL,$9260
9163 ADD HL,DE
9164 LD C,$00 Current line.
9166 LD B,$03 Number of lines.
9168 LD A,(DE) Get the line from the screen.
9169 XOR (HL) Check for any bits on screen found. and copy from the previous line.
916A OR C
916B LD C,A Store next line data.
916C INC HL Move to next column on screen.
916D INC DE
916E DJNZ $9168 Loop back if there is more to do.
9170 LD A,C Were any bits set?
9171 OR A
9172 RET Z Return if not.
9173 DI Otherwise, something was in the way of the crusher, which must have been Monty, so kill him.
9174 JP $946E
Prev: 912C Up: Map Next: 9177