Prev: A41B Up: Map Next: A438
A427: Sounds: Sword
Used by the routine at ThrowSword.
Plays 10 clicks, one straight after the other. The half period of each click is the counter rotated left twice, exclusive ORed with 07 and rotated left twice again.
SoundsSword A427 LD D,$10 D=10 (the counter).
SoundsSword_Loop A429 LD A,D Fetch the click counter.
A42A RLCA Rotate left twice.
A42B RLCA
A42C XOR %00000111 Flip bits 0-2.
A42E RLCA Rotate left twice.
A42F RLCA
A430 LD B,A Keep the half period in B.
A431 CALL SoundsClick Play a click with SoundsClick.
A434 DEC D Decrease the counter by one and loop back to SoundsSword_Loop until all of the clicks have been played.
A435 JR NZ,SoundsSword_Loop
A437 RET Return.
View the equivalent code in;
Prev: A41B Up: Map Next: A438