Skip to navigation

Elite on the BBC Micro

Workspaces: WP

[6502 Second Processor version]

Name: WP [Show more] Type: Workspace Address: &0D00 to &0E3B Category: Workspaces Summary: Variables
Context: See this workspace in context in the source code Variations: See code variations for this workspace in the different versions References: No direct references to this workspace in this source file
ORG &0D00 .WP SKIP 0 \ The start of the WP workspace .LSX SKIP 0 \ LSX is an alias that points to the first byte of the \ sun line heap at LSO \ \ * &FF indicates the sun line heap is empty \ \ * Otherwise the LSO heap contains the line data for \ the sun .LSO SKIP 192 \ The ship line heap for the space station (see NWSPS) \ and the sun line heap (see SUN) \ \ The spaces can be shared as our local bubble of \ universe can support either the sun or a space \ station, but not both .SX SKIP NOST + 1 \ This is where we store the x_hi coordinates for all \ the stardust particles .SXL SKIP NOST + 1 \ This is where we store the x_lo coordinates for all \ the stardust particles .SY SKIP NOST + 1 \ This is where we store the y_hi coordinates for all \ the stardust particles .SYL SKIP NOST + 1 \ This is where we store the y_lo coordinates for all \ the stardust particles .SZ SKIP NOST + 1 \ This is where we store the z_hi coordinates for all \ the stardust particles .SZL SKIP NOST + 1 \ This is where we store the z_lo coordinates for all \ the stardust particles .LASX SKIP 1 \ The x-coordinate of the tip of the laser line .LASY SKIP 1 \ The y-coordinate of the tip of the laser line .XX24 SKIP 1 \ This byte appears to be unused .ALTIT SKIP 1 \ Our altitude above the surface of the planet or sun \ \ * 255 = we are a long way above the surface \ \ * 1-254 = our altitude as the square root of: \ \ x_hi^2 + y_hi^2 + z_hi^2 - 6^2 \ \ where our ship is at the origin, the centre of the \ planet/sun is at (x_hi, y_hi, z_hi), and the \ radius of the planet/sun is 6 \ \ * 0 = we have crashed into the surface .SWAP SKIP 1 \ Temporary storage, used to store a flag that records \ whether or not we had to swap a line's start and end \ coordinates around when clipping the line in routine \ LL145 (the flag is used in places like BLINE to swap \ them back) .XP SKIP 1 \ The x-coordinate of the current character as we \ construct the lines for the Star Wars scroll text .YP SKIP 1 \ The y-coordinate of the current character as we \ construct the lines for the Star Wars scroll text .YS SKIP 1 \ Temporary storage for saving the index into the TB \ tables in the SLIDE routine .BALI SKIP 1 \ The progress of the Star Wars scroll text as it \ scrolls, from 254 (off the bottom of the screen) to 2 \ (fully scrolled). Can also be thought of as a measure \ of how much of the scroll text has yet to appear \ on-screen .UPO SKIP 1 \ Used as an index into the UB tables when projecting \ the scroll text lines onto the Star Wars perspective \ view and then onto the screen PRINT "WP workspace from ", ~WP," to ", ~P%