Prev: 57109 Up: Map Next: 57176
57154: Destroy Creature
Destroys a creature. The sound of the creature being destroyed is played, the type of the creature is added to the score (see AddPointsToScore) and the creature turns into an explosion of the type 76 which lasts for nine frames (see Handle_Explosion).
Input
IX Object record of the creature
Destroy_Creature 57154 CALL SoundsWeaponPop Play the sound of a creature being destroyed.
57157 LD C,(IX+0) Fetch the type of the creature into C.
57160 LD B,0 Clear B, so that BC holds the points for the creature.
57162 CALL AddPointsToScore Add the points for the creature (its type) to the score.
57165 LD (IX+0),76 Change the creature into an explosion.
57169 LD (IX+8),9 Set the counter in byte 8 to 9.
57173 JP Update_Object_Sprite Jump to Update_Object_Sprite.
Prev: 57109 Up: Map Next: 57176