Prev: F518 Up: Map Next: F5A8
F51A: Routine at F51A
Used by the routines at Update_Room00 and Invaders_Loop.
Input
Output
_f51a F51A LD HL,($F518)
F51D LD A,L
F51E CP $FF
F520 RET Z
F521 EX DE,HL
F522 LD HL,_f2cd
F525 LD B,$18
_f51a_0 F527 LD A,(HL)
F528 CP $FE
F52A JR NZ,_f51a_4
_f51a_1 F52C INC HL
_f51a_2 F52D INC HL
F52E DJNZ _f51a_0
F530 LD HL,($F518)
F533 LD (BitmapX),HL
F536 LD A,$BF
F538 CALL Bitmap16Draw
F53B LD A,H
F53C DEC A
F53D DEC A
F53E DEC A
F53F CP $30
F541 JR C,_f51a_3
F543 LD ($F519),A
F546 LD (BitmapY),A
F549 LD A,$BF
F54B CALL Bitmap16Draw
F54E RET
_f51a_3 F54F LD A,$FF
F551 LD ($F518),A
F554 RET
_f51a_4 F555 LD A,E
F556 SUB (HL)
F557 SUB $10
F559 CP $E0
F55B JR C,_f51a_1
F55D INC HL
F55E LD A,D
F55F SUB (HL)
F560 SUB $10
F562 CP $E0
F564 JR C,_f51a_2
F566 DEC HL
F567 LD (BitmapX),DE
F56B LD A,$FF
F56D LD ($F518),A
F570 LD A,$BF
F572 CALL Bitmap16Draw
F575 LD E,(HL)
F576 LD (HL),$FE
F578 INC HL
F579 LD D,(HL)
F57A LD (BitmapX),DE
F57E DEC HL
F57F LD DE,($F3A4)
F583 DEC DE
F584 AND A
F585 SBC HL,DE
F587 JR NC,_f51a_5
F589 LD A,($F3A1)
F58C JR _f51a_6
_f51a_5 F58E LD A,(_f3a0)
_f51a_6 F591 CALL Bitmap16Draw
F594 LD HL,(BitmapX)
F597 CALL Arcade_CreateExplosions
F59A LD HL,$F4F5
F59D DEC (HL)
F59E RET NZ
F59F CALL $F46F
F5A2 LD SP,$0000
F5A5 JP Invaders_Loop
Prev: F518 Up: Map Next: F5A8