Prev: 29283 Up: Map Next: 29331
29301: Play Moving Sound
Used by the routine at UpdateType19.
Used by an object while it moves. Does nothing on even frames. If bit 6 of offset 22 of the object is clear it plays a short sweep. If not it plays a different sweep, but only once every four frames.
Input
IX Address of the object
PlayMovingSound 29301 LD A,(39524) The frame counter.
29304 AND %00000001 Keep the bits of A that are set in 1.
29306 RET Z Return if the zero flag is set.
29307 LD C,4 The short sweep has four beeps.
29309 LD D,15 Its lowest beep has half-period 15.
29311 BIT 6,(IX+22) Jump to PlaySweep if bit 6 of offset 22 of IX is clear.
29315 JP Z,PlaySweep
29318 LD A,(39524) The frame counter.
29321 AND %00000011 Keep the bits of A that are set in 3.
29323 RET NZ Return if the zero flag is clear.
29324 LD C,3 The other sweep has three beeps.
29326 LD D,27 Its lowest beep has half-period 27.
29328 JP PlaySweep Jump to PlaySweep.
Prev: 29283 Up: Map Next: 29331