Prev: 6DA8 Up: Map Next: 6F43
6E18: Remove Sprite?
Used by the routine at 6C00.
6E18 CALL RemoveSprite Call RemoveSprite.
6E1B LD HL,($783A) HL=*783A.
6E1E LD A,(HL) A=*HL.
6E1F CP $F0 Jump to 6E57 if A is higher than F0.
6E21 JR NC,$6E57
6E23 LD ($7834),A Write A to *7834.
6E26 INC HL Increment HL by one.
6E27 LD A,(HL) A=*HL.
6E28 AND %00001111 Keep only bits 0-3.
6E2A LD ($781A),A Write A to *781A.
6E2D LD A,(HL) A=*HL.
6E2E INC HL Increment HL by one.
6E2F LD ($783A),HL Write HL to *783A.
6E32 LD HL,$7833 HL=7833.
6E35 RLCA RLCA.
6E36 JR NC,$6E39 Jump to 6E39 if {} is higher.
6E38 DEC (HL) Decrease *HL by one.
6E39 RLCA RLCA.
6E3A JR NC,$6E3D Jump to 6E3D if {} is higher.
6E3C INC (HL) Increment *HL by one.
6E3D RLCA RLCA.
6E3E JR NC,$6E48 Jump to 6E48 if {} is higher.
6E40 CALL $659C Call 659C.
6E43 CALL Controller_ScrollPlayarea Call Controller_ScrollPlayarea.
6E46 JR $6E51 Jump to 6E51.
6E48 RLCA RLCA.
6E49 JR NC,$6E51 Jump to 6E51 if {} is higher.
6E4B CALL $6650 Call 6650.
6E4E CALL Controller_ScrollPlayarea Call Controller_ScrollPlayarea.
6E51 CALL $6B2D Call 6B2D.
6E54 CALL $6D50 Call 6D50.
6E57 PUSH AF Stash AF on the stack.
6E58 NOP No operation.
6E59 NOP
6E5A NOP
6E5B NOP
6E5C NOP
6E5D NOP
6E5E CALL $6B2D Call 6B2D.
6E61 POP AF Restore AF from the stack.
6E62 AND %00001111 Keep only bits 0-3.
6E64 SUB $08 A-=08.
6E66 LD B,A B=A.
6E67 LD A,($7822) A=*Speed.
6E6A BIT 7,A Test bit 7 of A.
6E6C LD A,$12 A=12.
6E6E JR Z,$6E72 Jump to 6E72 if {} is zero.
6E70 LD A,$0D A=0D.
6E72 ADD A,B A+=B.
6E73 LD L,A L=A.
6E74 LD A,($7833) A=*7833.
6E77 SUB $02 A-=02.
6E79 LD H,$40 H=40.
6E7B CP $08 Jump to 6E81 if A is lower than 08.
6E7D JR C,$6E81
6E7F LD H,$48 H=48.
6E81 AND %00000111 Keep only bits 0-2.
6E83 RRCA RRCA.
6E84 RRCA
6E85 RRCA
6E86 ADD A,L A+=L.
6E87 LD L,A L=A.
6E88 PUSH HL Stash HL on the stack.
6E89 DEC L Decrease L by two.
6E8A DEC L
6E8B LD DE,$78E0 DE=78E0.
6E8E LD C,$28 C=28.
6E90 EX DE,HL Exchange the DE and HL registers.
6E91 LD B,$04 B=04.
6E93 LDI LDI.
6E95 DJNZ $6E93 Decrease counter by one and loop back to 6E93 until counter is zero.
6E97 LD A,E A=E.
6E98 SUB $04 A-=04.
6E9A LD E,A E=A.
6E9B INC D Increment D by one.
6E9C DEC C Decrease C by one.
6E9D JR NZ,$6E91 Jump to 6E91 until C is zero.
6E9F LD A,D A=D.
6EA0 SUB $49 A-=49.
6EA2 SBC A,A A-=A.
6EA3 ADD A,$59 A+=59.
6EA5 LD D,A D=A.
6EA6 LD B,$04 B=04.
6EA8 LD A,$06 A=06.
6EAA LD (DE),A Write A to *DE.
6EAB INC E Increment E by one.
6EAC DJNZ $6EAA Decrease counter by one and loop back to 6EAA until counter is zero.
6EAE POP HL Restore HL from the stack.
Play the "player dead" audio.
6EAF LD B,$14 B=14 (counter; 14 loops).
Handler_PlayerDead 6EB1 PUSH BC Stash BC and HL on the stack.
6EB2 PUSH HL
6EB3 LD A,B A=B.
6EB4 AND %00000111 Keep only bits 0-2.
6EB6 LD D,$00 D=00.
PlayAudioDead 6EB8 OUT ($FE),A Send to the speaker.
6EBA XOR %00010000 Flip the speaker (bit 4) on/ off.
6EBC LD B,D B=D.
AudioDead_Loop 6EBD DJNZ AudioDead_Loop Decrease counter by one and loop back to AudioDead_Loop until counter is zero.
6EBF DEC D Decrease D by one.
6EC0 JR NZ,PlayAudioDead Jump to PlayAudioDead until D is zero.
6EC2 LD B,$08 B=08 (counter; height of the carousel).
Carousel_Loop 6EC4 XOR A A=00.
6EC5 RLD RLD.
6EC7 DEC L Decrease L by one.
6EC8 RLD RLD.
6ECA INC L Increment L by one.
6ECB OR (HL) Set the bits from *HL.
6ECC LD (HL),A Write A to *HL.
6ECD INC H Increment H by one.
6ECE DJNZ Carousel_Loop Decrease counter by one and loop back to Carousel_Loop until counter is zero.
6ED0 POP HL Restore HL and BC from the stack.
6ED1 POP BC
6ED2 DJNZ Handler_PlayerDead Decrease counter by one and loop back to Handler_PlayerDead until counter is zero.
This entry point is used by the routines at 7161 and 76D7.
6ED4 CALL RemoveSprite Call RemoveSprite.
6ED7 LD A,($7838) A=*7838.
6EDA BIT 7,A Test bit 7 of A.
6EDC LD HL,$BB00 HL=BB00.
6EDF LD A,$80 A=80.
6EE1 JR Z,$6EE6 Jump to 6EE6 if {} is zero.
6EE3 DEC A Decrease A by one.
6EE4 LD L,$04 L=04.
6EE6 LD ($7831),HL Write HL to *7831.
6EE9 LD HL,$7830 HL=7830.
6EEC LD (HL),$03 Write 03 to *HL.
6EEE JR Z,$6EF1 Jump to 6EF1 if {} is zero.
6EF0 INC (HL) Increment *HL by one.
6EF1 LD L,$21 L=21.
6EF3 LD B,$03 B=03.
6EF5 LD (HL),A Write A to *HL.
6EF6 INC L Increment L by one.
6EF7 DJNZ $6EF5 Decrease counter by one and loop back to 6EF5 until counter is zero.
6EF9 LD B,$08 B=08.
6EFB LD (HL),$00 Write 00 to *HL.
6EFD INC L Increment L by one.
6EFE DJNZ $6EFB Decrease counter by one and loop back to 6EFB until counter is zero.
6F00 LD L,$1A L=1A.
6F02 LD (HL),$01 Write 01 to *HL.
6F04 LD HL,$0000 HL=0000.
6F07 LD ($7814),HL Write HL to *7814.
6F0A LD HL,($7836) HL=*7836.
6F0D LD ($782E),HL Write HL to *782E.
6F10 BIT 7,A Test bit 7 of A.
6F12 LD B,$03 B=03.
6F14 JR NZ,$6F17 Jump to 6F17 if {} is not zero.
6F16 INC B Increment B by one.
6F17 LD A,H A=H.
6F18 SUB $99 A-=99.
6F1A SUB $05 A-=05.
6F1C JR NC,$6F1A Jump to 6F1A if {} is higher.
6F1E ADD A,$05 A+=05.
6F20 ADD A,A A+=A.
6F21 ADD A,A A+=A.
6F22 DEC A Decrease A by one.
6F23 LD ($7833),A Write A to *7833.
6F26 LD A,$9E A=9E.
6F28 ADD A,$05 A+=05.
6F2A CP H Jump to 6F28 if A is lower than H.
6F2B JR C,$6F28
6F2D SUB $05 A-=05.
6F2F LD H,A H=A.
6F30 LD A,L L-=B.
6F31 SUB B
6F32 LD L,A
6F33 JR NC,$6F39 Jump to 6F39 if {} is higher.
6F35 LD A,H H-=05.
6F36 SUB $05
6F38 LD H,A
6F39 XOR A A=00.
6F3A CALL $6800 Call 6800.
6F3D CALL SpendLife Call SpendLife.
6F40 CALL GameInitialisation_6 Call GameInitialisation_6.
Prev: 6DA8 Up: Map Next: 6F43