Skip to navigation

Aviator on the BBC Micro

Sound: ToggleEngineSound

Name: ToggleEngineSound [Show more] Type: Subroutine Category: Sound Summary: Turn the engine sound on or off
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * ApplyFlightModel (Part 6 of 7) calls ToggleEngineSound * Crash calls ToggleEngineSound * SetEngine calls ToggleEngineSound * TerminateGame calls ToggleEngineSound

Arguments: A Defines the action: * 0 = turn engine sound off * Non-zero = turn engine sound on with pitch A
.ToggleEngineSound BNE MakeEngineSound \ If A is non-zero then jump to MakeEngineSound to set \ up and make the engine sound LDA #0 \ Make sound #0, to turn off the engine sound JSR MakeSound \ Fall through into ResetEngineSound to reset the pitch \ of the engine sound