![]() |
Routines |
| Prev: D7ED | Up: Map | Next: D847 |
|
The routine for objects of type 08 to 0B, the items that the player has thrown. The item flies in a straight line. If it hits the object that is four places along the object table (the monster that it belongs to), the monster is destroyed, 25 hundred points are added to the score and the monster explodes into fragments. If the item hits something else, it lands and becomes an item that can be picked up again (type 04 to 07).
|
||||
| UpdateThrownItem | D80C | LD A,(IX+$05) | Set the velocity of the item from its speed and direction. | |
| D80F | CALL SetVelocityFromSpeed | |||
| D812 | CALL TestMove | Check whether the scenery blocks the move along one axis. | ||
| D815 | CALL MoveObject | Move the item. | ||
| D818 | CALL TestMove_Keep | Check whether the scenery blocks the move along the other axis. | ||
| D81B | CALL MoveObject | Move the item. | ||
| D81E | CALL CheckOverlapWithNextObject | Check whether the item has hit its monster, and jump to UpdateThrownItem_Hit if it has. | ||
| D821 | JR C,UpdateThrownItem_Hit | |||
| D823 | BIT 0,(IX+$07) | Return if the item has not hit the scenery. | ||
| D827 | RET Z | |||
| D828 | LD A,(IX+$00) | Change the type of the item to the one for an item that is lying on the ground, and return. | ||
| D82B | AND $03 | |||
| D82D | OR $04 | |||
| D82F | LD (IX+$00),A | |||
| D832 | RET | |||
|
The item has hit its monster.
|
||||
| UpdateThrownItem_Hit | D833 | LD (IY+$00),$84 | Change the monster into a flash (type 84). | |
| D837 | LD (IX+$00),$0C | Turn the item into a burst. | ||
| D83B | LD BC,$2500 | Add 25 hundred points to the score. | ||
| D83E | CALL AddToScore | |||
| D841 | CALL CreateFragments | Create fragments from the monster. | ||
| D844 | JP DrawMonsterIcons | Jump to DrawMonsterIcons. | ||
| Prev: D7ED | Up: Map | Next: D847 |