![]() |
Routines |
| Prev: BEEE | Up: Map | Next: BF17 |
|
Used by the routine at HandlerAppearingNastie.
Plays six cycles of a tone with a half-period which depends on the low three bits of the sprite ID, so the sound changes as the sprite changes.
|
||||||||
| PlayAppearingSound | BF08 | LD A,(IX+$00) | Fetch the sprite ID of the actor. | |||||
| BF0B | CPL | Flip the bits. | ||||||
| BF0C | RRCA | Rotate right three times. | ||||||
| BF0D | RRCA | |||||||
| BF0E | RRCA | |||||||
| BF0F | AND %11100000 | Keep only bits 5-7. | ||||||
| BF11 | LD B,A | Store the result in B (the half-period). | ||||||
| BF12 | LD C,$06 | Set the number of cycles in C to 06. | ||||||
| BF14 | JP PlayWaveSequence | Jump to PlayWaveSequence to play the sound. | ||||||
| Prev: BEEE | Up: Map | Next: BF17 |