![]() |
Routines |
| Prev: 8791 | Up: Map | Next: 87AF |
|
Used by the routines at spawn_tick and update_objects.
Called by spawn_tick (when its count reaches 7) and by update_objects (when the load is light). Only while the view's screen row (view_row) is 3-9: looks for a free record among the two clouds' records, 7 and 8 of object_records (find_free_record), and puts a cloud (attacker kind 1, type $13) in it at a screen edge (start_at_edge, all four screens allowed).
|
||||
| spawn_cloud | 8792 | LD A,(view_row) | Only in screen rows 3-9 | |
| 8795 | CP $0A | |||
| 8797 | RET NC | |||
| 8798 | CP $03 | |||
| 879A | RET C | |||
| 879B | LD A,$02 | A free record among records 7 and 8 | ||
| 879D | LD IX,cloud_records | |||
| 87A1 | CALL find_free_record | |||
| 87A4 | RET NZ | |||
| 87A5 | LD A,$01 | Kind 1, any of the four screens | ||
| 87A7 | LD (attacker_kind),A | |||
| 87AA | LD B,$03 | |||
| 87AC | JP start_at_edge | |||
| Prev: 8791 | Up: Map | Next: 87AF |