Prev: 8FA9 Up: Map Next: 915F
9132: See if given path data is within range of hero.
Used by the routines at _939a, AB25 and AB5F.
Input
IX Path data
BC Distance to be in range.
Returns (0) if:
Path data compass is same,
and within given range.
Range is normally 0x22 / 0x24 which is the width of the camera / screen.
Path_InGivenRange 9132 LD A,(Stage_Compass)
9135 CP (IX+$0A)
9138 JR Z,Path_InGivenRange_1
Path_InGivenRange_0 913A OR $01 Return (1)
913C RET
Path_InGivenRange_1 913D BIT 0,A Based on compass, get hero position running left to right of camera
913F JR Z,Path_InGivenRange_2 along with matching path from data.
9141 LD HL,(Position_NS)
9144 LD E,(IX+$05)
9147 LD D,(IX+$06)
914A JR Path_InGivenRange_3
Path_InGivenRange_2 914C LD HL,(Position_EW)
914F LD E,(IX+$07)
9152 LD D,(IX+$08)
Path_InGivenRange_3 9155 CALL abs_hl_de
9158 AND A
9159 SBC HL,BC
915B JR NC,Path_InGivenRange_0
915D XOR A Return (0)
915E RET
Prev: 8FA9 Up: Map Next: 915F