![]() |
Routines |
| Prev: 47435 | Up: Map | Next: 47548 |
|
Copy an 8-byte explosion template into Explosion_Slot, which starts a sound. The entry point at InitialiseExplosion_Copy takes the template address in HL.
There are five templates. The first is read by TickWaveDuration (type 165) and the other four by TickWaveTable (type 161).
|
||||
| InitialiseExplosion | 47440 | LD HL,47452 | HL=Explosion_Template_1. | |
| InitialiseExplosion_Copy | 47443 | LD DE,24672 | DE=Explosion_Slot. | |
| 47446 | LD BC,8 | Copy 8 bytes from HL to DE. | ||
| 47449 | LDIR | |||
| 47451 | RET | Return. | ||
|
Template for TickWaveDuration. It plays one note on each pass, starting from the pitch below and counting down to 1 so the sound rises over 39 notes. Nothing calls InitialiseExplosion, so this one is never used. The copy at InitialiseExplosion_Copy takes four more bytes than this, which are the first instructions at Copy_Explosion_Template, but TickWaveDuration never reads them.
|
||||
| Explosion_Template_1 | 47452 | DEFB 165 | Actor type, handled by TickWaveDuration. | |
| 47453 | DEFB 32 | Not read by TickWaveDuration. | ||
| 47454 | DEFB 8 | Repeat count: each note is played 8 times. | ||
| 47455 | DEFB 40 | Starting pitch. | ||
|
This entry point is used by the routines at Handler_PlayerShot and Handler_Missile_ConvertExploding.
|
||||
| Copy_Explosion_Template | 47456 | LD HL,47461 | HL=Explosion_Template_2. | |
| 47459 | JR InitialiseExplosion_Copy | Jump to InitialiseExplosion_Copy. | ||
|
Template for TickWaveTable: seven notes of falling pitch, each played 8 times.
|
||||
| Explosion_Template_2 | 47461 | DEFB 161 | Actor type, handled by TickWaveTable. | |
| 47462 | DEFB 8 | Counter: a value of 8 gives seven notes. | ||
| 47463 | DEFW 47466 | Address of the pitch table minus one. | ||
| 47465 | DEFB 8 | Repeat count: each note is played 8 times. | ||
| 47466 | DEFB 0 | Index 0 of the pitch table, which is never read. | ||
| 47467 | DEFB 120,112,104,96,88,80,72 | Pitch table, played from the last byte back to the first. | ||
| 47474 | DEFB 64 | Never played, as the counter reaches zero first. | ||
| InitialiseExplosion_2 | 47475 | LD HL,47480 | HL=Explosion_Template_Burst. | |
| 47478 | JR InitialiseExplosion_Copy | Jump to InitialiseExplosion_Copy. | ||
|
Template for TickWaveTable: seven notes of rising pitch, each played 16 times.
|
||||
| Explosion_Template_Burst | 47480 | DEFB 161 | Actor type, handled by TickWaveTable. | |
| 47481 | DEFB 8 | Counter: a value of 8 gives seven notes. | ||
| 47482 | DEFW 47485 | Address of the pitch table minus one. | ||
| 47484 | DEFB 16 | Repeat count: each note is played 16 times. | ||
| 47485 | DEFB 0 | Index 0 of the pitch table, which is never read. | ||
| 47486 | DEFB 64,72,80,88,96,96,104 | Pitch table, played from the last byte back to the first. | ||
| 47493 | DEFB 112 | Never played, as the counter reaches zero first. | ||
| InitialiseExplosion_3 | 47494 | LD HL,47499 | HL=Explosion_Template_3. | |
| 47497 | JR InitialiseExplosion_Copy | Jump to InitialiseExplosion_Copy. | ||
|
Template for TickWaveTable: fifteen notes that swap between two pitches in runs of up to four, each note played 6 times.
|
||||
| Explosion_Template_3 | 47499 | DEFB 161 | Actor type, handled by TickWaveTable. | |
| 47500 | DEFB 16 | Counter: a value of 16 gives fifteen notes. | ||
| 47501 | DEFW 47504 | Address of the pitch table minus one. | ||
| 47503 | DEFB 6 | Repeat count: each note is played 6 times. | ||
| 47504 | DEFB 0 | Index 0 of the pitch table, which is never read. | ||
| 47505 | DEFB 64,64,64,64,80,80,80,80 | Pitch table, played from the last byte back to the first. | ||
| 47513 | DEFB 64,64,64,64,80,80,80 | |||
| 47520 | DEFB 80 | Never played, as the counter reaches zero first. | ||
| InitialiseExplosion_4 | 47521 | LD HL,47526 | HL=Explosion_Template_4. | |
| 47524 | JR InitialiseExplosion_Copy | Jump to InitialiseExplosion_Copy. | ||
|
Template for TickWaveTable: fifteen notes of falling pitch, each played 6 times.
|
||||
| Explosion_Template_4 | 47526 | DEFB 161 | Actor type, handled by TickWaveTable. | |
| 47527 | DEFB 16 | Counter: a value of 16 gives fifteen notes. | ||
| 47528 | DEFW 47531 | Address of the pitch table minus one. | ||
| 47530 | DEFB 6 | Repeat count: each note is played 6 times. | ||
| 47531 | DEFB 0 | Index 0 of the pitch table, which is never read. | ||
| 47532 | DEFB 80,78,76,74,72,70,68,66 | Pitch table, played from the last byte back to the first. | ||
| 47540 | DEFB 64,62,60,58,56,54,52 | |||
| 47547 | DEFB 50 | Never played, as the counter reaches zero first. | ||
| Prev: 47435 | Up: Map | Next: 47548 |