Prev: D857 Up: Map Next: D871
D858: Check for an slot in Enemy configuration buffer to create another enemy
Used by the routines at 98AF and C1CA.
Output
IX base address into enemy configuration to create the enemy
D858 LD IX,$5E66 Set IX the base address for enemy configuration
D85C LD A,($A092) Set B the number of enemies in the room
D85F LD B,A
D860 LD A,(IX+$0C) is enemy dead?
D863 OR A
D864 RET Z Return if so
D865 LD DE,$0018 Point IX to the next slot
D868 ADD IX,DE
D86A DJNZ $D860 Jump wback until there are enemies
D86C LD IX,$03E8 No slots availables. Set IX to $03E8?
D870 RET
Prev: D857 Up: Map Next: D871