.main6 JSR UpdateLinesToShow \ Update the linesToShow list, moving any lines that \ aren't visible into the linesToHide list JSR ExplodeAlien \ If an alien has been hit, process its explosion, with \ all the convulsions that entails LDY #2 \ Check to see if we are flying under the suspension JSR CheckFlyingSkills \ bridge and award points if we are LDY #34 \ Check to see if we are flying down the main street of JSR CheckFlyingSkills \ Acornsville and award points if we are INC mainLoopCounter \ Increment the main loop counter LDA mainLoopCounter \ If (loop counter + 4) mod 8 <> 0, jump to main7, so CLC \ we only do the following once every 8 iterations of ADC #4 \ the main loop, when the loop counter is 4, 12, 20 and AND #7 \ so on BNE main7 LDY #1 \ Update the runway on the radar JSR UpdateRadarBlip LDX alienToMove \ Set X to the number of the alien whose turn it is to \ move towards Acornsville in this iteration of the main \ loop, which we set in UpdateAliens BMI main7 \ If X is negative, then there is no alien to move, so \ jump to main7 to skip the following LDY #33 \ Set Y = 33 so the call to UpdateRadarBlip updates the \ alien on the radar LDA alienState,X \ If the moving alien's state is < 27, skip the CMP #27 \ following instruction as the alien is not flying BCC main7 JSR UpdateRadarBlip \ The moving alien's state is >= 27, which means it is \ either flying to Acornsville or is in the final \ descent stage, so update the alien on the radarName: MainLoop (Part 5 of 15) [Show more] Type: Subroutine Category: Main loop Summary: Update lines, check flying skills, increment main loop counter, update the radar Deep dive: Program flow of the main game loopContext: See this subroutine in context in the source code References: No direct references to this subroutine in this source file
[X]
Subroutine CheckFlyingSkills (Part 1 of 2) (category: Scoring)
Check whether we are performing one of the tests of flying skill
[X]
Subroutine ExplodeAlien (category: The Theme)
Explode an alien, making the alien split apart
[X]
Subroutine UpdateLinesToShow (category: Visibility)
Update the linesToShow list, moving any lines that aren't visible into the linesToHide list
[X]
Subroutine UpdateRadarBlip (category: Dashboard)
Update a blip on the radar (runway or alien)
[X]
Variable alienState (category: The Theme)
The state of each of the eight aliens
[X]
Variable alienToMove (category: The Theme)
The number of the alien to move towards Acornsville in this iteration of the main loop
[X]
Label main7 in subroutine MainLoop (Part 6 of 15)
[X]
Variable mainLoopCounter (category: Main loop)
The main loop counter