Prev: 42771 Up: Map Next: 42809
42791: Explode Enemies
Used by the routines at UseEnergy and MoveRobotHorizontally.
Turns every enemy that is in use into smoke.
ExplodeEnemies 42791 LD HL,38608 Point HL at the first enemy.
42794 LD DE,16 Each entity is 16 bytes long.
42797 LD B,10 There are ten enemies.
ExplodeEnemies_Next 42799 LD A,(HL) Fetch the type of the enemy.
42800 AND A Jump if the enemy is not in use.
42801 JR Z,ExplodeEnemies_Skip
42803 LD (HL),56 Otherwise turn it into smoke.
ExplodeEnemies_Skip 42805 ADD HL,DE Move on to the next enemy.
42806 DJNZ ExplodeEnemies_Next Loop back until every enemy has been dealt with.
42808 RET Return.
Prev: 42771 Up: Map Next: 42809