![]() |
Routines |
| Prev: C766 | Up: Map | Next: C795 |
|
Type 09: a figure which has been shot and is falling. It subtracts byte 0C from byte 0D and adds 02 to the speed, so the figure rises and then falls, and it calls PlayShortTone. StartDying starts the speed at FA and the height at 18. When the height is zero it makes the type 08 and sets byte 0C to 20.
|
||||||||
|
Turn into a body if the height is zero.
|
||||||||
| HandleDying | C76C | LD A,(IX+$0D) | Fetch byte 0D. | |||||
| C76F | AND A | Jump to HandleDying_Move if it is not zero. | ||||||
| C770 | JR NZ,HandleDying_Move | |||||||
| C772 | LD (IX+$00),$08 | Make the type 08. | ||||||
| C776 | LD (IX+$0C),$20 | Set byte 0C to 20 and return. | ||||||
| C77A | RET | |||||||
|
Move the figure.
|
||||||||
| HandleDying_Move | C77B | SUB (IX+$0C) | Subtract byte 0C from the height. | |||||
| C77E | JP M,HandleDying_Land | Jump to HandleDying_Land if it is negative. | ||||||
| C781 | LD (IX+$0D),A | Set byte 0D. | ||||||
| C784 | CALL PlayShortTone | Call PlayShortTone. | ||||||
| C787 | LD A,(IX+$0C) | Fetch byte 0C. | ||||||
| C78A | ADD A,$02 | Add 02. | ||||||
| C78C | LD (IX+$0C),A | Set byte 0C and return. | ||||||
| C78F | RET | |||||||
|
Put the figure on the ground.
|
||||||||
| HandleDying_Land | C790 | LD (IX+$0D),$00 | Set byte 0D to 00 and return. | |||||
| C794 | RET | |||||||
| Prev: C766 | Up: Map | Next: C795 |