Prev: EB49 Up: Map Next: EBD8
EB8D: Handler: Unlock Door
Used by the routine at Handler_Player.
Handler_UnlockDoor EB8D LD A,$05 Write 05 to *SoundFlag_General.
EB8F LD ($FFFE),A
EB92 PUSH IX Stash IX on the stack.
EB94 PUSH HL IX=HL (using the stack).
EB95 POP IX
EB97 PUSH BC Stash BC and DE on the stack.
EB98 PUSH DE
EB99 LD C,(IX+$00) C=*IX+00.
EB9C LD B,(IX+$01) B=*IX+01.
EB9F DEC B Decrease B by one.
EBA0 LD (IX+$05),$00 Write 00 to *IX+05.
EBA4 PUSH BC Stash BC on the stack.
EBA5 PUSH IX Stash IX on the stack.
EBA7 LD DE,$0032 DE=0032.
EBAA LD HL,$00C8 HL=00C8.
EBAD CALL $03B5 Call BEEPER.
EBB0 POP IX Restore IX from the stack.
EBB2 POP BC Restore BC from the stack.
EBB3 LD HL,($5C36) Stash *CHARS on the stack.
EBB6 PUSH HL
EBB7 LD HL,$9F6C Write 9F6C (Graphics_MaskSprite) to *CHARS.
EBBA LD ($5C36),HL
EBBD LD D,$04 DE=Set the sprite width/ height (01/ 04).
EBBF LD E,$01
EBC1 LD A,$00 A=00.
EBC3 CALL $E72F Call E72F.
EBC6 LD A,$20 A=20.
EBC8 CALL PrintSprite Call PrintSprite.
EBCB POP HL Restore the previous value of *CHARS from the stack.
EBCC LD ($5C36),HL
EBCF POP DE Restore DE, BC and IX from the stack.
EBD0 POP BC
EBD1 POP IX
EBD3 LD (IX+$10),$00 Write 00 to *IX+10.
EBD7 RET Return.
Prev: EB49 Up: Map Next: EBD8