Prev: B614 Up: Map Next: B647
B631: Check Sheriff Touch
Checks whether the sheriff, on foot or on his horse, is touching the object being handled. It does nothing while ProtectionTimer is not zero.
Input
IX The address of the object
Output
F The carry flag is set if the sheriff is touching the object
IY The address of the sheriff
CheckSheriffTouch B631 LD A,($A208) Fetch the counter.
B634 AND A Return, with carry clear, while the sheriff is protected.
B635 RET NZ
B636 LD IY,$A27D Point IY at ObjectSlot_01.
B63A LD A,(IY+$00) Fetch the type of the object.
B63D CP $01 Jump to CheckOverlap if it is a sheriff on foot or a mounted sheriff.
B63F JR Z,CheckOverlap
B641 CP $15
B643 JR Z,CheckOverlap
B645 AND A Clear the carry flag.
B646 RET Return.
Prev: B614 Up: Map Next: B647