This code appears in the following versions (click to see it in the source code):
Code variations between these versions are shown below.
.RES2Name: RES2 Type: Subroutine Category: Start and end Summary: Reset a number of flight variables and workspaces
This is called after we launch from a space station, arrive in a new system after hyperspace, launch an escape pod, or die a cold, lonely death in the depths of space.
Returns: Y Y is set to &FF
This variation is blank in the Cassette, Disc (flight), Disc (docked), 6502 Second Processor and Electron versions.
\JSR stopbd \ This instruction is commented out in the original \ source
The Electron version has a hard-coded number of stardust particles on-screen, so there is no need to reset it after launch from the station.
This variation is blank in the Electron version.
Tap on a block to expand it, and tap it again to revert.
LDX #&FF \ Reset LSX2 and LSY2, the ball line heaps used by the STX LSX2 \ BLINE routine for drawing circles, to &FF, to set the STX LSY2 \ heap to empty STX MSTG \ Reset MSTG, the missile target, to &FF (no target)
ASL A \ This sets A to 0
This variation is blank in the Cassette, Disc (flight), Disc (docked) and Electron versions.
STA BETA \ Reset BETA (pitch angle alpha) to 0 STA BET1 \ Reset BET1 (magnitude of the pitch angle) to 0
STA ALP2+1 \ Reset ALP2+1 (flipped roll sign) and BET2+1 (flipped STA BET2+1 \ pitch sign) to positive, i.e. pitch and roll negative
STA MCNT \ Reset MCNT (the main loop counter) to 0
This variation is blank in the Cassette, Disc (flight), Disc (docked), 6502 Second Processor and Electron versions.
\STA TRIBCT \ This instruction is commented out in the original \ source; it is left over from the Commodore 64 version \ of Elite and would reset the number of Trumbles
This variation is blank in the Cassette, Disc (docked), 6502 Second Processor, Master and Electron versions.
STA QQ22+1 \ Set the on-screen hyperspace counter to 0
This variation is blank in the Cassette, Disc (flight), 6502 Second Processor, Master and Electron versions.
LDA #3 \ Reset DELTA (speed) to 3 STA DELTA
STA ALPHA \ Reset ALPHA (roll angle alpha) to 3 STA ALP1 \ Reset ALP1 (magnitude of roll angle alpha) to 3
This variation is blank in the Cassette, Disc (flight), Disc (docked), 6502 Second Processor and Electron versions.
\LDA #&10 \ These instructions are commented out in the original \STA COL2 \ source LDA #0 \ Set dontclip to 0 (though this variable is never used, STA dontclip \ so this has no effect; it is left over from the \ Commodore 64 version) LDA #2*Y-1 \ Set Yx2M1 to the number of pixel lines in the space STA Yx2M1 \ view
LDA SSPR \ Fetch the "space station present" flag, and if we are BEQ P%+5 \ not inside the safe zone, skip the next instruction JSR SPBLB \ Light up the space station bulb on the dashboard
LDA ECMA \ Fetch the E.C.M. status flag, and if E.C.M. is off, BEQ yu \ skip the next instruction JSR ECMOF \ Turn off the E.C.M. sound .yu JSR WPSHPS \ Wipe all ships from the scanner
JSR DIALS \ Update the dashboard
This variation is blank in the Cassette, Disc (docked), 6502 Second Processor, Master and Electron versions.
JSR U% \ Call U% to clear the key logger
\ Finally, fall through into ZINF to reset the INWK \ ship workspace