.TT18 LDA QQ14 \ Subtract the distance to the selected system (in QQ8) SEC \ from the amount of fuel in our tank (in QQ14) into A SBC QQ8 STA QQ14 \ Store the updated fuel amount in QQ14 .hyper_snap LDA QQ11 \ If the current view is not a space view, jump to ee5 BNE ee5 \ to skip the following JSR TT66 \ Clear the top part of the screen, draw a border box, \ and set the current view type in QQ11 to 0 (space \ view) JSR LL164 \ Call LL164 to show the hyperspace tunnel and make the \ hyperspace sound .ee5 JSR DORND \ Set A and X to random numbers CMP #253 \ If A >= 253 (0.78% chance) then jump to MJP to trigger BCS MJP \ a mis-jump into witchspace JSR hyp1_FLIGHT \ Jump straight to the system at (QQ9, QQ10) JSR RES2 \ Reset a number of flight variables and workspaces JSR SOLAR \ Halve our legal status, update the missile indicators, \ and set up data blocks and slots for the planet and \ sun JSR LOMOD \ Call LOMOD to populate the ship blueprints table \ with a random selection of ships LDA QQ11 \ If the current view in QQ11 is not a space view (0) or AND #%00111111 \ one of the charts (64 or 128), return from the BNE RTS111 \ subroutine (as RTS111 contains an RTS) JSR TTX66 \ Otherwise clear the screen and draw a border box LDA QQ11 \ If the current view is one of the charts, jump to BNE TT114 \ TT114 (from which we jump to the correct routine to \ display the chart) INC QQ11 \ This is a space view, so increment QQ11 to 1 \ Fall through into TT110 to show the front space viewName: TT18 [Show more] Type: Subroutine Category: Flight Summary: Try to initiate a jump into hyperspaceContext: See this subroutine in context in the source code References: This subroutine is called as follows: * TT102 calls TT18 * Main flight loop (Part 3 of 16) calls via hyper_snap
Try to go through hyperspace. Called from TT102 in the main loop when the hyperspace countdown has finished.
Other entry points: hyper_snap Perform a hyperspace, but without using up any fuel
[X]
Subroutine DORND (category: Maths (Arithmetic))
Generate random numbers
[X]
Subroutine LL164 (category: Drawing circles)
Make the hyperspace sound and draw the hyperspace tunnel
[X]
Subroutine LOMOD (category: Universe)
Populate the ship blueprints table at XX21 with a random selection of ships and set the compass to point to the planet
[X]
Subroutine MJP (category: Flight)
Process a mis-jump into witchspace
[X]
Subroutine RES2 (category: Start and end)
Reset a number of flight variables and workspaces
[X]
Subroutine SOLAR (category: Universe)
Set up various aspects of arriving in a new system
[X]
Subroutine TT114 (category: Charts)
Display either the Long-range or Short-range Chart
[X]
Subroutine TT66 (category: Drawing the screen)
Clear the screen and set the current view type
[X]
Subroutine TTX66 (category: Drawing the screen)
Clear the top part of the screen and draw a border box by sending a clr_scrn command to the I/O processor
[X]
Label ee5 is local to this routine
[X]
Subroutine hyp1_FLIGHT (category: Universe)
Process a jump to the system closest to (QQ9, QQ10) (flight version)