Prev: 41922 Up: Map Next: 41944
41927: Sounds: Walking
Used by the routines at HandlerWizard, HandlerSerf and HandlerKnight.
Plays a footstep. The walk counter is increased each time this is called. A tone is only played when the counter is odd, which makes it every other call, and the half period alternates between 96 and 64.
SoundsWalking 41927 LD HL,24111 Point HL at the walk counter at WalkCounter.
41930 INC (HL) Increase the counter by one.
41931 LD A,(HL) Fetch the counter.
41932 BIT 1,A Jump to SoundsWalkLow if bit 1 of the walk counter is not set.
41934 JR Z,SoundsWalkLow
41936 AND %00000001 Keep only bit 0.
41938 RET Z Return if the counter is even.
41939 LD BC,16388 B=64 (the half period) and C=4 (the number of cycles).
41942 JR SoundsBeep Jump to SoundsBeep to play the tone.
Prev: 41922 Up: Map Next: 41944