.FRCE JSR TT102 \ Call TT102 to process the key pressed in A LDA QQ12 \ Fetch the docked flag from QQ12 into A BNE MLOOP \ If we are docked, loop back up to MLOOP just above \ to restart the main loop, but skipping all the flight \ and spawning code in the top part of the main loop JMP TT100 \ Otherwise jump to TT100 to restart the main loop from \ the startName: Main game loop (Part 6 of 6) [View in context] Type: Subroutine Category: Main loop Summary: Process non-flight key presses (red function keys, docked keys)
This is the second half of the minimal game loop, which we iterate when we are docked. This section covers the following: * Process more key presses (red function keys, docked keys etc.) It also support joining the main loop with a key already "pressed", so we can jump into the main game loop to perform a specific action. In practice, this is used when we enter the docking bay in BAY to display Status Mode (red key f8), and when we finish buying or selling cargo in BAY2 to jump to the Inventory (red key f9). Other entry points: FRCE The entry point for the main game loop if we want to jump straight to a specific screen, by pretending to "press" a key, in which case A contains the internal key number of the key we want to "press"
Entry point MLOOP in subroutine Main game loop (Part 5 of 6) (category: Main loop)
The entry point for the main game loop. This entry point comes after the call to the main flight loop and spawning routines, so it marks the start of the main game loop for when we are docked (as we don't need to call the main flight loop or spawning routines if we aren't in space)
Entry point TT100 in subroutine Main game loop (Part 2 of 6) (category: Main loop)
The entry point for the start of the main game loop, which calls the main flight loop and the moves into the spawning routine
Process function key, save, hyperspace and chart key presses