![]() |
Routines |
| Prev: 38258 | Up: Map | Next: 38692 |
|
The code for an object of type 21, which is run by RunObjectHandler. The speeds of the object follow the table at ExplosionSpeeds, which ends with 128.
|
||||||||
| UpdateType15 | 38616 | XOR A | Clear the collision effects in 36396. | |||||
| 38617 | LD (36396),A | |||||||
| 38620 | CALL PlayObjectWarble | Play a sound. | ||||||
| 38623 | LD A,(IX+21) | Fetch the lifetime of the object. | ||||||
| 38626 | AND %00111111 | Keep the bottom six bits. | ||||||
| 38628 | LD HL,39027 | Use the table at ExplosionSpeeds. | ||||||
| 38631 | CALL AddAToHL | Add the offset to the address. | ||||||
| 38634 | LD A,(HL) | Fetch the horizontal speed from the table. | ||||||
| 38635 | CP 128 | Jump to UpdateType15_Speed if it is not the end of the table. | ||||||
| 38637 | JR NZ,UpdateType15_Speed | |||||||
| 38639 | LD (IX+0),255 | Free the slot. | ||||||
| 38643 | JP UpdateType14_Draw | Jump to UpdateType14_Draw. | ||||||
| UpdateType15_Speed | 38646 | LD (IX+7),A | Set the horizontal speed of the object. | |||||
| 38649 | INC HL | Fetch the vertical speed from the table. | ||||||
| 38650 | LD A,(HL) | |||||||
| 38651 | LD (IX+9),A | Set the vertical speed of the object. | ||||||
| 38654 | INC (IX+21) | Move two steps along the table. | ||||||
| 38657 | INC (IX+21) | |||||||
| 38660 | BIT 7,(IX+21) | Jump to UpdateType15_Vertical if bit 7 of the lifetime of the object is clear. | ||||||
| 38664 | JR Z,UpdateType15_Vertical | |||||||
| 38666 | LD A,(IX+7) | Reverse the horizontal speed. | ||||||
| 38669 | NEG | |||||||
| 38671 | LD (IX+7),A | |||||||
| UpdateType15_Vertical | 38674 | BIT 6,(IX+21) | Jump to UpdateType14_Step if bit 6 of the lifetime of the object is clear. | |||||
| 38678 | JP Z,UpdateType14_Step | |||||||
| 38681 | LD A,(IX+9) | Reverse the vertical speed. | ||||||
| 38684 | NEG | |||||||
| 38686 | LD (IX+9),A | |||||||
| 38689 | JP UpdateType14_Step | Jump to UpdateType14_Step. | ||||||
| Prev: 38258 | Up: Map | Next: 38692 |