Skip to navigation

Aviator on the BBC Micro

Setup: NewGame

Name: NewGame [Show more] Type: Subroutine Category: Setup Summary: Start a new game
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * AlienInAcornsville calls NewGame * Crash calls NewGame * MainLoop (Part 7 of 15) calls NewGame
.NewGame JSR ClearCanopy \ Clear the canopy to black, leaving the canopy edges \ alone JSR ResetVariables \ Reset most variables to prepare for a new flight JSR UpdateKeyLogger \ Scan for key presses and update the key logger JSR UpdateFlightModel \ Process any key presses in the key logger and update \ the matrices and flight model JSR ResetLineLists \ Reset the line lists at linesToShow and linesToHide, \ which will populate them with the correct lines to \ show for the starting point on the runway JSR IndicatorF \ Update the flaps indicator JSR IndicatorB \ Update the brakes indicator LDA #%01000000 \ Set the 6522 User VIA auxiliary control register STA VIA+&6B \ (SHEILA &6B) to %01000000 to disable the shift \ register LDA #234 \ Set 6522 User VIA T1C-L timer 1 high-order counter STA VIA+&65 \ (SHEILA &65) to 234 to start the T1 counter \ counting down at a rate of 1 MHz