![]() |
Routines |
| Prev: 41122 | Up: Map | Next: 41152 |
|
Handler for the object type 137 a sound object. Byte 1 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 67 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 | 41132 | DEC (IX+1) | Decrease the count of the sound and jump to ClearSound if it has run out. | |||||
| 41135 | JR Z,ClearSound | |||||||
| 41137 | LD A,(IX+1) | Fetch the count of the sound. | ||||||
| 41140 | LD C,A | Use it as the number of cycles. | ||||||
| 41141 | XOR %01000011 | Combine the count with 67 to make the half period. | ||||||
| 41143 | LD B,A | Store the half period in B. | ||||||
| 41144 | JP SoundsBeep | Jump to SoundsBeep to play the tone. | ||||||
|
This entry point is used by the routine at SoundEffectNext.
Remove the object.
|
||||||||
| ClearSound | 41147 | LD (IX+0),0 | Set the type of the object to 0. | |||||
| 41151 | RET | Return. | ||||||
|
View the equivalent code in;
|
||||||||
| Prev: 41122 | Up: Map | Next: 41152 |