![]() |
Routines |
| Prev: 38879 | Up: Map | Next: 38967 |
|
Used by the routine at RunType19Behaviour.
Behaviour code used for several types of object (see RunObjectBehaviour). Makes the object accelerate towards the player and then halves the acceleration.
|
||||||||
| ChasePlayer | 38911 | PUSH IY | Stash IY on the stack. | |||||
| 38913 | LD IY,51429 | Use the player's object. | ||||||
| 38917 | CALL AccelerateTowardsTarget | Accelerate towards the player. | ||||||
| 38920 | POP IY | Bring IY back off the stack. | ||||||
| 38922 | SET 7,(IX+22) | Set bit 7 of the third state byte of the object. | ||||||
| 38926 | LD H,(IX+11) | Fetch the horizontal acceleration of the object. | ||||||
| 38929 | LD L,(IX+12) | |||||||
| 38932 | SRA H | Halve it twice. | ||||||
| 38934 | RR L | |||||||
| 38936 | SRA H | |||||||
| 38938 | RR L | |||||||
| 38940 | LD (IX+11),H | Store it. | ||||||
| 38943 | LD (IX+12),L | |||||||
| 38946 | LD H,(IX+14) | Fetch the vertical acceleration of the object. | ||||||
| 38949 | LD L,(IX+15) | |||||||
| 38952 | SRA H | Halve it twice. | ||||||
| 38954 | RR L | |||||||
| 38956 | SRA H | |||||||
| 38958 | RR L | |||||||
| 38960 | LD (IX+14),H | Store it. | ||||||
| 38963 | LD (IX+15),L | |||||||
| 38966 | RET | Return. | ||||||
| Prev: 38879 | Up: Map | Next: 38967 |