Prev: 42117 Up: Map Next: 42144
42123: Sound Effect Eating
The handler of the sound entity for the sound set up by SoundsEating. The count in the second byte of the entity is decreased on each pass of the main loop. When it goes below zero the entity is cleared. Until then it plays a tone of 8 cycles, and the count picks the half period from the table at TableTonesEating.
Input
IX The sound entity
SoundEffectEating 42123 DEC (IX+1) Decrease the count of notes, and jump to ClearSound if it is below zero.
42126 JP M,ClearSound
42129 LD C,(IX+1) Fetch the count.
42132 LD B,0 B=0.
42134 LD HL,42144 Point HL at the eating tones at TableTonesEating.
42137 ADD HL,BC Add the count to the address of the table.
42138 LD B,(HL) Fetch the half period from the table.
42139 LD C,8 C=8 (the number of cycles).
42141 JP SoundsBeep Jump to SoundsBeep to play the tone.
Prev: 42117 Up: Map Next: 42144