Prev: 25733 Up: Map Next: 25770
25758: Play Repellent Sound
Used by the routine at CreateWeapon.
Plays 16 square waves, alternating between a high and a low pitch.
PlayRepellentSound 25758 LD C,16 Set the wave counter in C to 16.
PlayRepellentSound_Loop 25760 LD A,C Fetch the wave counter.
25761 RRCA Rotate A right once.
25762 LD D,A Set the duration of the wave in D.
25763 CALL PlaySquareWave Call PlaySquareWave.
25766 DEC C Decrease the wave counter by one.
25767 JR NZ,PlayRepellentSound_Loop Loop back to PlayRepellentSound_Loop until all of the waves have been played.
25769 RET Return.
Prev: 25733 Up: Map Next: 25770