Prev: 8D7D Up: Map Next: 8DCD
8D7F: Play death tune
Used by the routine at 946E.
8D7F LD HL,$FFE0 FFE0 is the "dead Monty" graphic.
8D82 LD ($ECE0),HL Store this.
8D85 LD HL,($5C7B) Get the current position.
8D88 LD ($ECDE),HL Store this as the place to print.
8D8B CALL $EBE0 Print the graphic.
8D8E LD HL,$0000
8D91 LD ($9177),HL
8D94 CALL $D254 Copy the screen to the graphic buffer.
8D97 LD IX,$8D52 Set Monty as being in mid-air.
8D9B SET 1,(IX+$01)
8D9F EI Enable interrupts
8DA0 LD IX,$5C7D Load IX with the start of the death tune.
8DA4 PUSH IX Remember this, as the ROM routine overwrites it.
8DA6 LD E,(IX+$00) Put the length in DE.
8DA9 LD D,(IX+$01)
8DAC LD L,(IX+$02) Put the frequency in HL.
8DAF LD H,(IX+$03)
8DB2 CALL $03B6 BEEP without enabling interrupts.
8DB5 LD B,$FF Pause between notes.
8DB7 DJNZ $8DB7
8DB9 POP IX Restore IX.
8DBB LD A,($9179) Get the current frame number.
8DBE CP $FF Is it #$FF, meaning the angel has gone?
8DC0 RET Z Return if so.
8DC1 LD DE,$0004 Move forward to the next bit of tune data.
8DC4 ADD IX,DE
8DC6 XOR A Is the length 0?
8DC7 OR (IX+$00)
8DCA JR NZ,$8DA4 If not, move back to play more of the tune.
8DCC RET Otherwise return.
Prev: 8D7D Up: Map Next: 8DCD