.TT110 LDX QQ12 \ If we are not docked (QQ12 = 0) then jump to NLUNCH BEQ NLUNCH \ to skip the launch tunnel and setup process JSR LAUN \ Show the space station launch tunnel JSR RES2 \ Reset a number of flight variables and workspaces JSR TT111 \ Select the system closest to galactic coordinates \ (QQ9, QQ10) INC INWK+8 \ Increment z_sign ready for the call to SOS, so the \ planet appears at a z_sign of 1 in front of us when \ we launch JSR SOS1 \ Call SOS1 to set up the planet's data block and add it \ to FRIN, where it will get put in the first slot as \ it's the first one to be added to our local bubble of \ universe following the call to RES2 above LDA #128 \ For the space station, set z_sign to &80, so it's STA INWK+8 \ behind us (&80 is negative) INC INWK+7 \ And increment z_hi, so it's only just behind us JSR NWSPS \ Add a new space station to our local bubble of \ universe LDA #12 \ Set our launch speed in DELTA to 12 STA DELTA JSR BAD \ Call BAD to work out how much illegal contraband we \ are carrying in our hold (A is up to 40 for a \ standard hold crammed with contraband, up to 70 for \ an extended cargo hold full of narcotics and slaves) ORA FIST \ OR the value in A with our legal status in FIST to \ get a new value that is at least as high as both \ values, to reflect the fact that launching with a \ hold full of contraband can only make matters worse STA FIST \ Update our legal status with the new value \ --- Mod: Code added for Demonstration Disc: ---------> LDX #0 \ Set QQ12 to 0 to indicate we are not docked STX QQ12 JSR LOOK1 \ Initialise the front space view LDA #f5 \ Jump into the main loop at FRCE, setting the key JMP FRCE \ that's "pressed" to red key f5 and returning from the \ subroutine using a tail call \ \ This shows the Short-range Chart by calling TT23, \ which then calls the TT17 routine to detect crosshair \ movement \ \ TT17 has been updated to demonstrate the process of \ choosing a hyperspace destination and finishes by \ performing a hyperspace to Riedquat and switching to \ the front space view \ --- End of added code -------------------------------> .NLUNCH LDX #0 \ Set QQ12 to 0 to indicate we are not docked STX QQ12 JMP LOOK1 \ Jump to LOOK1 to switch to the front view (X = 0), \ returning from the subroutine using a tail callName: TT110 [Show more] Type: Subroutine Category: Flight Summary: Launch from a station or show the front space viewContext: See this subroutine in context in the source code References: This subroutine is called as follows: * Ghy calls TT110 * TT102 calls TT110
Launch the ship (if we are docked), or show the front space view (if we are already in space). Called when red key f0 is pressed while docked (launch), after we arrive in a new galaxy, or after a hyperspace if the current view is a space view.
[X]
Subroutine BAD (category: Status)
Calculate how bad we have been
[X]
Entry point FRCE in subroutine Main game loop (Part 6 of 6) (category: Main loop)
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"
[X]
Subroutine LAUN (category: Drawing circles)
Make the launch sound and draw the launch tunnel
[X]
Subroutine LOOK1 (category: Flight)
Initialise the space view
[X]
Label NLUNCH is local to this routine
[X]
Subroutine NWSPS (category: Universe)
Add a new space station to our local bubble of universe
[X]
Subroutine RES2 (category: Start and end)
Reset a number of flight variables and workspaces
[X]
Subroutine SOS1 (category: Universe)
Update the missile indicators, set up the planet data block
[X]
Subroutine TT111 (category: Universe)
Set the current system to the nearest system to a point
[X]
Configuration variable f5 = &74
Internal key number for red key f5 (Short-range Chart)