Prev: A3C2 Up: Map Next: A3D8
A3C7: 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 60 and 40.
SoundsWalking A3C7 LD HL,$5E2F Point HL at the walk counter at WalkCounter.
A3CA INC (HL) Increase the counter by one.
A3CB LD A,(HL) Fetch the counter.
A3CC BIT 1,A Jump to SoundsWalkLow if bit 1 of the walk counter is not set.
A3CE JR Z,SoundsWalkLow
A3D0 AND %00000001 Keep only bit 0.
A3D2 RET Z Return if the counter is even.
A3D3 LD BC,$4004 B=40 (the half period) and C=04 (the number of cycles).
A3D6 JR SoundsBeep Jump to SoundsBeep to play the tone.
Prev: A3C2 Up: Map Next: A3D8