![]() |
Routines |
| Prev: 96B0 | Up: Map | Next: 9724 |
|
Debris -- what is left of a shot attacker (check_shot) and four pieces of the ship's wreck (wreck_ship) -- is harmless, makes the debris sound (sound_debris), and flies a fixed path: the velocity is taken each pass from debris_path, the step in +$15 (bits 0-5) going on by two. Bit 7 of +$15 mirrors the path in X and bit 6 in Y, so four pieces of the wreck flying the four mirror images make a burst. At the path's end ($80) it is freed. It animates, and bounces off the landscape (the tail of update_attacker).
|
||||||||
| update_debris | 96D8 | XOR A | Harmless; the sound | |||||
| 96D9 | LD (contact_effect),A | |||||||
| 96DC | CALL sound_debris | |||||||
| 96DF | LD A,(IX+$15) | The path's next step | ||||||
| 96E2 | AND $3F | |||||||
| 96E4 | LD HL,debris_path | |||||||
| 96E7 | CALL add_a_to_hl | |||||||
| 96EA | LD A,(HL) | |||||||
| 96EB | CP $80 | |||||||
| 96ED | JR NZ,update_debris_0 | |||||||
| 96EF | LD (IX+$00),$FF | The end: freed | ||||||
| 96F3 | JP draw_object | |||||||
| update_debris_0 | 96F6 | LD (IX+$07),A | Its velocity, and the next step | |||||
| 96F9 | INC HL | |||||||
| 96FA | LD A,(HL) | |||||||
| 96FB | LD (IX+$09),A | |||||||
| 96FE | INC (IX+$15) | |||||||
| 9701 | INC (IX+$15) | |||||||
| 9704 | BIT 7,(IX+$15) | Mirrored in X | ||||||
| 9708 | JR Z,update_debris_1 | |||||||
| 970A | LD A,(IX+$07) | |||||||
| 970D | NEG | |||||||
| 970F | LD (IX+$07),A | |||||||
| update_debris_1 | 9712 | BIT 6,(IX+$15) | Mirrored in Y; animate, move and draw | |||||
| 9716 | JP Z,animate_move_draw | |||||||
| 9719 | LD A,(IX+$09) | |||||||
| 971C | NEG | |||||||
| 971E | LD (IX+$09),A | |||||||
| 9721 | JP animate_move_draw | |||||||
| Prev: 96B0 | Up: Map | Next: 9724 |