![]() |
Routines |
| Prev: 56682 | Up: Map | Next: 56729 |
|
Turns an object towards the player, by a quarter back (from TurnTowardsPlayer_Back), by a quarter on (from TurnTowardsPlayer_On) or, from TurnTowardsPlayer, right round by turning a quarter in a direction chosen from the random seed. The direction gets a timer of one to sixteen.
|
||||||||
| TurnTowardsPlayer | 56690 | LD A,(48043) | Fetch the random seed, and jump to TurnTowardsPlayer_On if it is less than 128. | |||||
| 56693 | CP 128 | |||||||
| 56695 | JR C,TurnTowardsPlayer_On | |||||||
| TurnTowardsPlayer_Back | 56697 | LD A,(IX+6) | Turn back a quarter. | |||||
| 56700 | SUB 64 | |||||||
| TurnTowardsPlayer_Set | 56702 | LD (IX+6),A | Set the direction. | |||||
| TurnTowardsPlayer_Timer | 56705 | LD A,(IX+6) | Fetch the direction, and keep only the direction. | |||||
| 56708 | AND 192 | |||||||
| 56710 | LD C,A | |||||||
| 56711 | LD A,(48042) | Set a timer of one to sixteen from the random seed. | ||||||
| 56714 | AND 15 | |||||||
| 56716 | INC A | |||||||
| 56717 | OR C | |||||||
| 56718 | LD (IX+6),A | |||||||
| 56721 | RET | Return. | ||||||
| TurnTowardsPlayer_On | 56722 | LD A,(IX+6) | Turn on a quarter, and jump to TurnTowardsPlayer_Set. | |||||
| 56725 | ADD A,64 | |||||||
| 56727 | JR TurnTowardsPlayer_Set | |||||||
| Prev: 56682 | Up: Map | Next: 56729 |