![]() |
Routines |
| Prev: B6F8 | Up: Map | Next: B754 |
|
Type 06: a bystander who wanders about the town. He goes away when the sheriff is more than two cells away. If he is shot, the bullet turns into a puff of smoke, the fine is taken from the bounty and the bystander dies. If the sheriff on foot touches him, the sheriff dies; if the mounted sheriff does, the bystander dies.
|
||||
| HandleBystander | B719 | LD A,(IX+$05) | Fetch the speed of the bystander. | |
| B71C | CALL SetSpeedsFromHeading | Set the speeds from it. | ||
| B71F | LD A,(IX+$07) | Fetch the flags of the bystander. | ||
| B722 | PUSH AF | Stash them on the stack. | ||
| B723 | CALL TestMove | Move around any walls. | ||
| B726 | POP AF | Retrieve the flags. | ||
| B727 | CALL PlayFootstepSound | Make a footstep sound if a foot has gone down. | ||
| B72A | CALL MoveObject | Move the bystander. | ||
| B72D | CALL UpdateDirection | Choose a new direction every so often. | ||
| B730 | CALL SetFrameAndFlip | Set the frame and the direction the bystander faces. | ||
| B733 | LD C,$02 | Set the distance to two cells. | ||
| B735 | CALL CheckDistance | Check how close the sheriff is. | ||
| B738 | JP NC,HandleBody_Remove | Remove the bystander if the sheriff has moved away. | ||
| B73B | LD BC,$B798 | Point BC at BystanderSpriteLists. | ||
| B73E | CALL ChooseSpriteList | Choose the sprite list. | ||
|
This entry point is used by the routine at HandlePointer.
Check whether a bullet or the sheriff has hit the bystander.
|
||||
| HandleBystander_CheckHit | B741 | CALL CheckBulletHit | Check whether a bullet has hit the bystander. | |
| B744 | JR C,ShootBystander | Jump to ShootBystander if it has. | ||
| B746 | CALL CheckSheriffTouch | Check whether the sheriff is touching the bystander. | ||
| B749 | RET NC | Return if not. | ||
| B74A | LD A,(IY+$00) | Fetch the type of the sheriff. | ||
| B74D | CP $15 | Jump to TakeFine if he is mounted. | ||
| B74F | JR Z,TakeFine | |||
| B751 | CALL TakeFine | Take the fine from the bounty. | ||
|
Continue on to KillSheriff.
|
||||
| Prev: B6F8 | Up: Map | Next: B754 |