Prev: DF15 Up: Map Next: DF58
DF42: 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 4C which lasts for nine frames (see Handle_Explosion).
Input
IX Object record of the creature
Destroy_Creature DF42 CALL SoundsWeaponPop Play the sound of a creature being destroyed.
DF45 LD C,(IX+$00) Fetch the type of the creature into C.
DF48 LD B,$00 Clear B, so that BC holds the points for the creature.
DF4A CALL AddPointsToScore Add the points for the creature (its type) to the score.
DF4D LD (IX+$00),$4C Change the creature into an explosion.
DF51 LD (IX+$08),$09 Set the counter in byte 08 to 09.
DF55 JP Update_Object_Sprite Jump to Update_Object_Sprite.
Prev: DF15 Up: Map Next: DF58