![]() |
Routines |
| Prev: 34586 | Up: Map | Next: 34695 |
|
Used by the routines at HandlerBatlet, HandlerPumpkin, MoveCreature, HandleTouchingCreature, HandlerSparkle, HandlerGhostlet, HandlerSpikey, HandlerBlob, HandlerGhoul, HandlerFrankenstein, HandlerWitch and HandlerMonk.
Turns a creature into a pop, which is what happens when it is hit by a weapon or when it touches the player. The creature is removed from the screen and redrawn as the first frame of the pop with the room attribute under it (see HandlerPop), and the player is given 0341 points.
|
||||||||
| PopCreature | 34655 | LD A,(IX+5) | Fetch the attribute of the creature. | |||||
| 34658 | PUSH AF | Stash it on the stack. | ||||||
| 34659 | LD A,(24090) | Fetch the room attribute from CurrentRoom_Attribute. | ||||||
| 34662 | LD (IX+5),A | Update the attribute of the creature. | ||||||
| 34665 | CALL RemoveEntity | Call RemoveEntity to remove the creature from the screen. | ||||||
| 34668 | CALL SetEntityAttributes_Moved | Call SetEntityAttributes_Moved to set the attributes of the cells that the creature covered. | ||||||
| 34671 | POP AF | Restore the attribute of the creature from the stack. | ||||||
| 34672 | LD (IX+5),A | Write it to the attribute of the creature. | ||||||
| 34675 | LD (IX+0),108 | Write 108 to the sprite ID of the creature (the first frame of the pop). | ||||||
| 34679 | LD (IX+14),16 | Set the counter at offset 14 to 16. | ||||||
| 34683 | LD BC,341 | BC=0341 (the points to add to the score). | ||||||
| 34686 | CALL AddPointsToScore | Call AddPointsToScore to add the points to the score. | ||||||
| 34689 | CALL DrawEntity | Call DrawEntity to draw the pop. | ||||||
| 34692 | JP SetEntityAttributes_Moved | Jump to SetEntityAttributes_Moved to set the attributes. | ||||||
| Prev: 34586 | Up: Map | Next: 34695 |