![]() |
Routines |
| Prev: 72A5 | Up: Map | Next: 72CF |
|
Used by the routine at update_objects.
Called by update_objects each pass once the death byte (death_count) has reached 10, until it reaches $2D: from nine passes after the ship is destroyed. Docking with the finished rocket does not play it: draw_rocket sets the death byte to 10 only for the two calls that put the ship away, and back to 0 in the same call, before update_objects, its only caller, runs in the pass. It plays the warble (warble) with the death byte - 10, then, on every eighth count, a seven-cycle zap (zap_sweep); on the other odd counts, eleven clicks with the death byte halved as the scramble (crackle); on even counts nothing more.
|
||||
| sound_death | 72AB | LD A,(death_count) | Nothing from $2D on | |
| 72AE | CP $2D | |||
| 72B0 | RET NC | |||
| 72B1 | SUB $0A | The warble, note = death byte - 10 | ||
| 72B3 | CALL warble | |||
| 72B6 | LD A,(death_count) | A multiple of 8: the zap below | ||
| 72B9 | LD B,A | |||
| 72BA | AND $07 | |||
| 72BC | JR Z,sound_death_0 | |||
| 72BE | BIT 0,B | Even: nothing more | ||
| 72C0 | RET Z | |||
| 72C1 | LD A,B | Odd: eleven clicks, scramble = death byte / 2 | ||
| 72C2 | SRL A | |||
| 72C4 | LD E,A | |||
| 72C5 | LD C,$0B | |||
| 72C7 | JP crackle | |||
| sound_death_0 | 72CA | LD C,$07 | Seven cycles of the zap | |
| 72CC | JP zap_sweep | |||
| Prev: 72A5 | Up: Map | Next: 72CF |