![]() |
Routines |
| Prev: 38830 | Up: Map | Next: 38988 |
|
Used by the routine at CreateSpawnedEntity.
Makes a shot at the spawn point. The shot is nudged on by three along both axes, given a random heading in the low four bits, and sent off with the moving flag set.
|
||||||||
| CreateShot | 38944 | CALL PlayBriefBuzz | Play the brief buzz. | |||||
| 38947 | LD A,(24475) | Fetch a random number. | ||||||
| 38950 | AND %00001111 | Keep a heading from 0 to 15. | ||||||
| 38952 | LD (IX+32),A | Keep that heading aside. | ||||||
| 38955 | LD A,(IX+3) | Nudge the low byte of the x coordinate on by three. | ||||||
| 38958 | ADD A,3 | |||||||
| 38960 | LD (IX+3),A | |||||||
| 38963 | LD A,(IX+6) | Nudge the low byte of the y coordinate on by three. | ||||||
| 38966 | ADD A,3 | |||||||
| 38968 | LD (IX+6),A | |||||||
| 38971 | CALL SetUpShotSprite | Set up the shot sprite. | ||||||
| 38974 | CALL FacePlayer | Face the shot towards the player. | ||||||
| 38977 | LD A,(IX+32) | Fetch the heading that was kept aside. | ||||||
| 38980 | OR %10000000 | Mark the shot as moving. | ||||||
| 38982 | LD (IX+17),A | Use that value as the heading. | ||||||
| 38985 | JP UpdateSpawnPoints_Advance | Go on to the next spawn point. | ||||||
| Prev: 38830 | Up: Map | Next: 38988 |