![]() |
Routines |
| Prev: 43432 | Up: Map | Next: 43501 |
|
Type 20: a horse waiting in the street. It goes away if the sheriff is three cells away. If the sheriff touches it, the horse is removed, the sheriff turns into a mounted sheriff (type 21) who has a higher top speed, and the price of the horse is taken from the bounty.
|
||||
|
Remove the horse if the sheriff has moved away.
|
||||
| HandleHorse | 43455 | LD C,3 | Set the distance to three cells. | |
| 43457 | CALL CheckDistance | Check how close the sheriff is. | ||
| 43460 | JP NC,HandleBody_Remove | Remove the horse if the sheriff has moved away. | ||
|
Mount the sheriff when he touches the horse.
|
||||
| 43463 | CALL CheckSheriffTouch | Check whether the sheriff is touching the horse. | ||
| 43466 | RET NC | Return if not. | ||
| 43467 | LD A,8 | Write 8 to SoundNotesLeft so that the sound lasts eight notes. | ||
| 43469 | LD (41532),A | |||
| 43472 | LD HL,44735 | Point SoundNoteAddress at the notes of the horse sound. | ||
| 43475 | LD (41533),HL | |||
| 43478 | LD (IX+0),0 | Remove the horse. | ||
| 43482 | LD A,18 | Raise the top speed of the sheriff to 18. | ||
| 43484 | LD (41503),A | |||
| 43487 | LD (IY+0),21 | Turn the sheriff into a mounted sheriff. | ||
| 43491 | LD BC,(41564) | Fetch the price of a horse. | ||
| 43495 | CALL TakeFromBounty | Take it from the bounty. | ||
| 43498 | JP DrawBountyDigits | Jump to DrawBountyDigits. | ||
| Prev: 43432 | Up: Map | Next: 43501 |