![]() |
Routines |
| Prev: AD13 | Up: Map | Next: AD66 |
|
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 0F of the object.
|
||||||||
|
Play a noise only on the first landed frame.
|
||||||||
| PlayLandingSoundOnce | AD54 | LD A,(IX+$0C) | Fetch the collision flags. | |||||
| AD57 | AND %00000100 | Keep bit 2. | ||||||
| AD59 | LD C,A | Keep it in C. | ||||||
| AD5A | RET Z | Return if the object has not landed. | ||||||
| AD5B | LD A,(IX+$0F) | Fetch the state recorded last time. | ||||||
| AD5E | CP C | Compare it with the current state. | ||||||
| AD5F | LD (IX+$0F),C | Record the current state. | ||||||
| AD62 | CALL NZ,PlayRandomNoise | Call PlayRandomNoise if the state has changed. | ||||||
| AD65 | RET | Return. | ||||||
| Prev: AD13 | Up: Map | Next: AD66 |