Prev: 26686 Up: Map Next: 26730
26708: Play Level Tone
Used by the routine at HandleLevelIntroduction.
Plays eight cycles of a square wave. The period of the wave is taken from the table at LevelTonePeriods, using byte 6 of the actor as the index, which is then increased by one ready for the next call. This is used by the actor for the level introduction parade (see IntroductionCharlie). The audio is three calls, which are eight frames apart.
Input
IX Actor
LevelStartJingle 26708 LD C,(IX+6) Fetch the index (byte 6 of the actor).
26711 INC (IX+6) Increase the index by one, ready for the next call.
26714 LD B,0 Find the period in the table at LevelTonePeriods using the index.
26716 LD HL,26730
26719 ADD HL,BC
26720 LD D,(HL) Fetch the period of the wave.
26721 LD C,8 Set the cycle counter to 8.
This entry point is used by the routine at GameStartJingle.
LevelStartJingle_Loop 26723 CALL PlaySquareWave Play a cycle using PlaySquareWave.
26726 DEC C Decrease the cycle counter by one.
26727 JR NZ,LevelStartJingle_Loop Loop back to LevelStartJingle_Loop until the cycle counter is zero.
26729 RET Return.
Prev: 26686 Up: Map Next: 26730