![]() |
Routines |
| Prev: 44307 | Up: Map | Next: 44390 |
|
Used by the routine at HandleEggTop.
Plays a random noise when the object has just landed, which is when bit 2 of its collision flags is set and was not set the last time. The last state is kept at offset 15 of the object.
|
||||||||
|
Play a noise only on the first landed frame.
|
||||||||
| PlayLandingSoundOnce | 44372 | LD A,(IX+12) | Fetch the collision flags. | |||||
| 44375 | AND %00000100 | Keep bit 2. | ||||||
| 44377 | LD C,A | Keep it in C. | ||||||
| 44378 | RET Z | Return if the object has not landed. | ||||||
| 44379 | LD A,(IX+15) | Fetch the state recorded last time. | ||||||
| 44382 | CP C | Compare it with the current state. | ||||||
| 44383 | LD (IX+15),C | Record the current state. | ||||||
| 44386 | CALL NZ,PlayRandomNoise | Call PlayRandomNoise if the state has changed. | ||||||
| 44389 | RET | Return. | ||||||
| Prev: 44307 | Up: Map | Next: 44390 |