![]() |
Routines |
| Prev: A0A2 | Up: Map | Next: A0C0 |
|
Handler for the object type 89 a sound object. Byte 01 of the object is a count, which it decreases. When the count reaches zero the object is removed. Until then it plays a tone of as many cycles as the count, with a half period of the count exclusive ORed with 43 so the pitch changes as the count falls. No object of this type is ever created (see Unused_Start_Sound_Object_89), so the game never plays this sound.
|
||||||||
| SoundEffect | A0AC | DEC (IX+$01) | Decrease the count of the sound and jump to ClearSound if it has run out. | |||||
| A0AF | JR Z,ClearSound | |||||||
| A0B1 | LD A,(IX+$01) | Fetch the count of the sound. | ||||||
| A0B4 | LD C,A | Use it as the number of cycles. | ||||||
| A0B5 | XOR %01000011 | Combine the count with 43 to make the half period. | ||||||
| A0B7 | LD B,A | Store the half period in B. | ||||||
| A0B8 | JP SoundsBeep | Jump to SoundsBeep to play the tone. | ||||||
|
This entry point is used by the routine at SoundEffectNext.
Remove the object.
|
||||||||
| ClearSound | A0BB | LD (IX+$00),$00 | Set the type of the object to 00. | |||||
| A0BF | RET | Return. | ||||||
|
View the equivalent code in;
|
||||||||
| Prev: A0A2 | Up: Map | Next: A0C0 |