Prev: A766 Up: Map Next: A7E2
A796: Routine at A796
Used by the routine at LaserBeam_Animate.
A796 LD HL,$61B0 HL=Alien_States.
A799 LD DE,$0018 DE=0018.
A79C LD B,$06 B=06.
A79E CALL $A7CB Call A7CB.
A7A1 LD HL,$6108 HL=6108.
A7A4 LD B,$01 B=01.
A7A6 CALL $A7CB Call A7CB.
A7A9 LD HL,$6138 HL=6138.
A7AC LD B,$01 B=01.
A7AE CALL $A7CB Call A7CB.
A7B1 LD HL,$6120 HL=6120.
A7B4 LD A,(HL) A=HL.
A7B5 SUB $C8 A-=C8.
A7B7 CP $04
A7B9 JR NC,$A7C0
A7BB LD B,$01 B=01.
A7BD CALL $A7CB Call A7CB.
A7C0 LD HL,$6150 HL=6150.
A7C3 LD A,(HL) A=HL.
A7C4 SUB $C8 A-=C8.
A7C6 CP $04
A7C8 RET NC
A7C9 LD B,$01 B=01.
A7CB LD A,(HL) A=HL.
A7CC AND A
A7CD JR Z,$A7DE
A7CF BIT 2,(IX+$02)
A7D3 JR Z,$A7DE
A7D5 PUSH BC Stash BC, DE and HL on the stack.
A7D6 PUSH DE
A7D7 PUSH HL
A7D8 CALL $A7E2 Call A7E2.
A7DB POP HL Restore HL, DE and BC from the stack.
A7DC POP DE
A7DD POP BC
A7DE ADD HL,DE HL+=DE.
A7DF DJNZ $A7CB Decrease counter by one and loop back to A7CB until counter is zero.
A7E1 RET Return.
Prev: A766 Up: Map Next: A7E2