![]() |
Routines |
| Prev: 29301 | Up: Map | Next: 29349 |
|
Used by the routine at CheckTerrainCollision.
Plays a burst of noise of 28 clicks. It is used when the ship hits the terrain. The entry point at PlayNoise makes the noise for any number of clicks.
|
||||
| PlayCrashSound | 29331 | LD C,28 | The crash is 28 clicks. | |
| PlayCrashSound_Pattern | 29333 | LD E,39 | The crash uses pattern 39. | |
|
This entry point is used by the routines at PlayUnusedSound, PlayShortCrashSound, PlayExplosionSound, PlayShotSound, PlayPatternedNoise and PlayNoiseBurst.
|
||||
| PlayNoise | 29335 | LD A,C | The click length starts from the clicks left. | |
| 29336 | XOR E | Flip the bits of A that are set in E. | ||
| 29337 | ADD A,A | Double it to make the on-time. | ||
| 29338 | LD B,A | That on-time is passed to the click. | ||
| 29339 | AND %00011111 | Keep the bits of A that are set in 31. | ||
| 29341 | LD D,A | The low five bits are the off-time. | ||
| 29342 | CALL MakeClick | Call MakeClick. | ||
| 29345 | DEC C | One click of the noise has been played. | ||
| 29346 | JR NZ,PlayNoise | Jump to PlayNoise if the zero flag is clear. | ||
| 29348 | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: 29301 | Up: Map | Next: 29349 |