![]() |
Routines |
| Prev: 46612 | Up: Map | Next: 46663 |
|
Used by the routines at HandleMoneyBag, HandleTumbleweed, HandleHorse, HandleCactus, HandleOutlaw and HandleBystander.
Checks whether the sheriff, on foot or on his horse, is touching the object being handled. It does nothing while ProtectionTimer is not zero.
|
||||||||||||||
| CheckSheriffTouch | 46641 | LD A,(41480) | Fetch the counter. | |||||||||||
| 46644 | AND A | Return, with carry clear, while the sheriff is protected. | ||||||||||||
| 46645 | RET NZ | |||||||||||||
| 46646 | LD IY,41597 | Point IY at ObjectSlot_01. | ||||||||||||
| 46650 | LD A,(IY+0) | Fetch the type of the object. | ||||||||||||
| 46653 | CP 1 | Jump to CheckOverlap if it is a sheriff on foot or a mounted sheriff. | ||||||||||||
| 46655 | JR Z,CheckOverlap | |||||||||||||
| 46657 | CP 21 | |||||||||||||
| 46659 | JR Z,CheckOverlap | |||||||||||||
| 46661 | AND A | Clear the carry flag. | ||||||||||||
| 46662 | RET | Return. | ||||||||||||
| Prev: 46612 | Up: Map | Next: 46663 |