Prev: 50077 Up: Map Next: 50109
50090: Play Bump Sound
Used by the routines at UpdateCreature and UpdatePlayerBody.
Plays a burst of noise, if the object at IX has been drawn in the view (bit 1 of its flags).
Input
IX Object
PlayBumpSound 50090 BIT 1,(IX+7) Return if the object has not been drawn in the view, because it can't be heard.
50094 RET Z
50095 LD C,16 Set a counter for sixteen tones.
PlayBumpSound_Loop 50097 LD A,C Play a short tone, with a pitch that depends on the counter, and loop back until all sixteen tones have been played.
50098 XOR 165
50100 ADD A,C
50101 LD B,A
50102 CALL PlaySquareWave
50105 DEC C
50106 JR NZ,PlayBumpSound_Loop
50108 RET Return.
View the equivalent code in;
Prev: 50077 Up: Map Next: 50109