.MLOOP_FLIGHT LDX #&FF \ Set the stack pointer to &01FF, which is the standard TXS \ location for the 6502 stack, so this instruction \ effectively resets the stack LDX GNTMP \ If the laser temperature in GNTMP is non-zero, BEQ EE20 \ decrement it (i.e. cool it down a bit) DEC GNTMP .EE20 JSR DIALS \ Call DIALS to update the dashboard JSR COMPAS \ Call COMPAS to update the compass LDA QQ11 \ If this is a space view, skip the following two BEQ P%+7 \ instructions (i.e. jump to JSR TT17 below) \AND PATG \ These instructions are commented out in the original \LSR A \ source \BCS d_40f8 LDY #2 \ Wait for 2/50 of a second (0.04 seconds), to slow the JSR DELAY \ main loop down a bit \JSR WSCAN \ This instruction is commented out in the original \ source JSR DOKEY_FLIGHT \ Scan the keyboard for flight controls and pause keys, \ (or the equivalent on joystick) and update the key \ logger, setting KL to the key pressed JSR chk_dirn \ Call chk_dirn to set the movement variables based on \ the current state of the key loggerName: Main game loop for flight (Part 5 of 6) [Show more] Type: Subroutine Category: Main loop Summary: Cool down lasers, make calls to update the dashboardContext: See this subroutine in context in the source code References: No direct references to this subroutine in this source file
[X]
Subroutine COMPAS (category: Dashboard)
Update the compass
[X]
Subroutine DELAY (category: Utility routines)
Wait for a specified time, in 1/50s of a second
[X]
Subroutine DIALS (Part 1 of 4) (category: Dashboard)
Update the dashboard: speed indicator
[X]
Subroutine DOKEY_FLIGHT (category: Keyboard)
Scan for the seven primary flight controls (flight version)
[X]
Label EE20 is local to this routine