Prev: 898F Up: Map Next: 89D0
89AC: Test 01 : Check for position.
Input
HL Next address of event data string.
Output
Data string [01, x pos, y pos]
On entry HL points to the 'x pos'.
Test01_WallyPosCheck 89AC LD A,(ObjEventPause) Make sure not just done an object pickup / event.
89AF OR A
89B0 JP NZ,Room_CllEvnt_EndIf
89B3 LD DE,(Wally_X) See if Wally is within range of the event position.
89B7 LD A,(HL)
89B8 INC HL
89B9 SUB E
89BA SUB $03
89BC CP $FA
89BE JR C,Test01_WallyPosCheck_0
89C0 LD A,(HL)
89C1 INC HL
89C2 SUB D
89C3 SUB $03
89C5 CP $FA
89C7 JR C,Test01_WallyPosCheck_1
89C9 JP Room_CllEvnt_NxtCmd If he is then run the next event in the data.
Test01_WallyPosCheck_0 89CC INC HL
Test01_WallyPosCheck_1 89CD JP Room_CllEvnt_EndIf
Prev: 898F Up: Map Next: 89D0