Prev: 33537 Up: Map Next: 33738
33722: Get Bat Step
Used by the routine at HandlerBatlet.
Looks up the distances for the current step of the flight pattern of a bat in BatFlightPattern. Bit 2 of the direction of the bat is returned in the Z flag (which is set when the axes are not swapped).
Input
IX The bat entity
Output
HL The address of the first of the two distances
GetBatStep 33722 LD C,(IX+9) Fetch the step of the flight pattern.
33725 SLA C Double the step number, to get an offset of two bytes for each step.
33727 LD B,0 Clear the high byte of the offset.
33729 LD HL,33738 Point HL at the bat flight pattern at BatFlightPattern.
33732 ADD HL,BC Find the entry for this step in the flight pattern.
33733 BIT 2,(IX+8) Test bit 2 of the direction of the bat, and return.
33737 RET
Prev: 33537 Up: Map Next: 33738