Prev: 68AC Up: Map Next: 68E8
68AD: Routine at 68AD
Used by the routines at 6AAC, 6C00, 6E18, 763C and 76D7.
RemoveSprite 68AD LD A,($781B) Return if *781B is zero.
68B0 AND A
68B1 RET Z
68B2 LD HL,($781C) HL=*781C.
68B5 LD B,A B=A.
68B6 LD C,$00 C=00.
RemoveSprite_0 68B8 DEC HL Decrease HL by one.
68B9 LD D,(HL) D=*HL.
68BA DEC HL Decrease HL by one.
68BB LD E,(HL) E=*HL.
68BC DEC HL Decrease HL by one.
68BD LD A,(HL) A=*HL.
68BE LD (DE),A Write A to *DE.
68BF DEC HL Decrease HL by one.
68C0 LD A,D A=D.
68C1 SUB $11 A-=11.
68C3 OR %00000111 Set bits 0-2.
68C5 LD D,A D=A.
68C6 EX DE,HL Exchange the DE and HL registers.
68C7 LD (HL),C Write C to *HL.
68C8 DEC H Decrease H by one.
68C9 LD A,(DE) A=*DE.
68CA LD (HL),A Write A to *HL.
68CB DEC DE Decrease DE by one.
68CC DEC H Decrease H by one.
68CD LD (HL),C Write C to *HL.
68CE DEC H Decrease H by one.
68CF LD A,(DE) A=*DE.
68D0 LD (HL),A Write A to *HL.
68D1 DEC DE Decrease DE by one.
68D2 DEC H Decrease H by one.
68D3 LD (HL),C Write C to *HL.
68D4 DEC H Decrease H by one.
68D5 LD A,(DE) A=*DE.
68D6 LD (HL),A Write A to *HL.
68D7 DEC DE Decrease DE by one.
68D8 DEC H Decrease H by one.
68D9 LD (HL),C Write C to *HL.
68DA DEC H Decrease H by one.
68DB LD A,(DE) A=*DE.
68DC LD (HL),A Write A to *HL.
68DD EX DE,HL Exchange the DE and HL registers.
68DE DJNZ RemoveSprite_0 Decrease counter by one and loop back to RemoveSprite_0 until counter is zero.
68E0 LD ($781C),HL Write HL to *781C.
68E3 XOR A Write 00 to *781B.
68E4 LD ($781B),A
68E7 RET Return.
Prev: 68AC Up: Map Next: 68E8