![]() |
Routines |
| Prev: 870E | Up: Map | Next: 87AF |
|
Used by the routines at UpdateEnemySpawning and UpdateEnemies.
Starts one of the special enemies, but only in the middle zones of the planet (zones 03 to 09).
|
||||
| SpawnSpecialEnemy | 8792 | LD A,($CE58) | Fetch the map zone from CE58. | |
| 8795 | CP $0A | Return if it is 0A or higher... | ||
| 8797 | RET NC | |||
| 8798 | CP $03 | ...or lower than 03. | ||
| 879A | RET C | |||
| 879B | LD A,$02 | Look for a free slot among two slots. | ||
| 879D | LD IX,$9A1C | |||
| 87A1 | CALL FindFreeSlot | Search for a free enemy slot. | ||
| 87A4 | RET NZ | Return if there is not one. | ||
| 87A5 | LD A,$01 | Select the second type of enemy. | ||
| 87A7 | LD ($89D2),A | |||
| 87AA | LD B,$03 | With 03 in B, jump to SpawnEnemy_ChooseSide to start the enemy. | ||
| 87AC | JP SpawnEnemy_ChooseSide | |||
| Prev: 870E | Up: Map | Next: 87AF |