Skip to navigation

Main loop: MainLoop (Part 8 of 15)

Name: MainLoop (Part 8 of 15) [Show more] Type: Subroutine Category: Main loop Summary: If we fire the guns on the runway, enable the Theme Deep dive: Program flow of the main game loop
Context: See this subroutine in context in the source code References: No direct references to this subroutine in this source file
.main13 LDA landingStatus \ If landingStatus = 0, jump to main17 to skip the BEQ main17 \ following (enabling the Theme, filling up with fuel, \ awarding points for landing) BMI main16 \ If bit 7 of landingStatus is set, jump to main16 to \ skip the following (enabling the Theme, filling up \ with fuel) as we are on the ground following an \ emergency landing LDA firingStatus \ If firingStatus is zero then there are no bullets in BEQ main14 \ the air, so jump to main14 LDA themeStatus \ If themeStatus is positive then the Theme is already BPL main14 \ enabled, so jump to main14 \ If we get here then there are bullets in the air and \ the Theme is not enabled, so we now need to enable the \ Theme (as it is triggered by us firing bullets when \ we are stationary and on the runway with the brakes \ on) LDA #8 \ Set themeStatus = 8 to enable the Theme and initiate STA themeStatus \ a new wave of aliens JSR IndicatorT \ Update the Theme indicator