.LO2 RTS ; Return from the subroutine .LQ STX VIEW ; Set the current space view to X 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 SIGHT ; Draw the laser crosshairs JMP NWSTARS ; Set up a new stardust field and return from the ; subroutine using a tail call .LOOK1 LDA #0 ; Set A = 0, the type number of a space view JSR DOVDU19 ; Switch to the palette for the space view, though this ; doesn't actually do anything in this version of Elite LDY QQ11 ; If the current view is not a space view, jump up to LQ BNE LQ ; to set up a new space view CPX VIEW ; If the current view is already of type X, jump to LO2 BEQ LO2 ; to return from the subroutine (as LO2 contains an RTS) STX VIEW ; Change the current space view to X 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 FLIP ; Swap the x- and y-coordinates of all the stardust ; particles and redraw the stardust field JSR WPSHPS ; Wipe all the ships from the scanner and mark them all ; as not being shown on-screen ; And fall through into SIGHT to draw the laser ; crosshairsName: LOOK1 [Show more] Type: Subroutine Category: Flight Summary: Initialise the space viewContext: See this subroutine in context in the source code References: This subroutine is called as follows: * MJP calls LOOK1 * TT102 calls LOOK1 * TT110 calls LOOK1 * WARP calls LOOK1
Initialise the space view, with the direction of view given in X. This clears the upper screen and draws the laser crosshairs, if the view in X has lasers fitted. It also wipes all the ships from the scanner, so we can recalculate ship positions for the new view (they get put back in the main flight loop).
Arguments: X The space view to set: * 0 = front * 1 = rear * 2 = left * 3 = right
Other entry points: LO2 Contains an RTS
[X]
Subroutine DOVDU19 (category: Drawing the screen)
Implement the #SETVDU19 command (change mode 1 palette)
[X]
Subroutine FLIP (category: Stardust)
Reflect the stardust particles in the screen diagonal and redraw the stardust field
[X]
Label LQ is local to this routine
[X]
Subroutine NWSTARS (category: Stardust)
Initialise the stardust field
[X]
Subroutine SIGHT (category: Flight)
Draw the laser crosshairs
[X]
Subroutine TT66 (category: Drawing the screen)
Clear the screen and set the current view type
[X]
Subroutine WPSHPS (category: Dashboard)
Clear the scanner, reset the ball line and sun line heaps