Prev: 72A5 Up: Map Next: 72CA
72AB: Play Explosion Sound
Used by the routine at UpdateEnemies.
Plays the sound of the explosion of the ship, for each step of the counter at 8F53 until it reaches 2D. It makes a warble first and then either a falling note (every eighth step), noise (on the odd steps) or nothing.
PlayExplosionSound 72AB LD A,($8F53) The ship state.
72AE CP $2D Return if A is 2D or more.
72B0 RET NC
72B1 SUB $0A Subtract 0A from A.
72B3 CALL PlayWarble Call PlayWarble.
72B6 LD A,($8F53) The ship state.
72B9 LD B,A Keep the explosion step.
72BA AND %00000111 Keep the bits of A that are set in 07.
72BC JR Z,PlayExplosionHitSound Jump to PlayExplosionHitSound if the zero flag is set.
72BE BIT 0,B Return if bit 0 of B is clear.
72C0 RET Z
72C1 LD A,B The pattern comes from the step.
72C2 SRL A Shift A right.
72C4 LD E,A That is the click pattern.
72C5 LD C,$0B This step of the explosion is 0B clicks.
72C7 JP PlayNoise Jump to PlayNoise.
Prev: 72A5 Up: Map Next: 72CA