Prev: C34D Up: Map Next: C3AA
C39D: Play Ending Ghost Sound
Used by the routine at UpdateEndingGhost.
Plays a tone that is one step lower every time it is called. It is played for the ghosts of the ending (see UpdateEndingGhost).
PlayEndingGhostSound C39D LD HL,$BBF9 Point at the counter that holds the pitch of the sound.
C3A0 INC (HL) Raise it, so that the sound falls in pitch each time.
C3A1 LD A,(HL) Fetch the counter.
C3A2 ADD A,$40 Add 40 to make the pitch higher than the lowest.
C3A4 LD B,A Set the pitch.
C3A5 LD C,$0C Set the length of the tone.
C3A7 JP PlayTone Jump to PlayTone to play the tone.
View the equivalent code in;
Prev: C34D Up: Map Next: C3AA