Prev: 669B Up: Map Next: 6745
6735: Find Wander Speeds
Used by the routine at HandlePeel.
Finds the pair of speeds in the table at WanderSpeeds which are used for the current value of the counter in byte 07 of the actor.
Input
IX Actor
Output
HL Address of the pair of speeds
F The Z flag is set when bit 2 of the actor state is not set
FindWanderSpeeds 6735 LD C,(IX+$07) Fetch the counter (byte 07 of the actor).
6738 SLA C Multiply by 02 as there are two bytes for each speed.
673A LD B,$00 Set the high byte of the offset to 00.
673C LD HL,$6745 Point HL at WanderSpeeds.
673F ADD HL,BC Find the pair of speeds for the counter.
6740 BIT 2,(IX+$06) Test bit 2 of the actor state.
6744 RET Return.
Prev: 669B Up: Map Next: 6745