Skip to navigation


Workspaces and configuration

LANDER GAME SOURCE Lander was written by David Braben and is copyright D.J.Braben 1987 The code on this site has been reconstructed from a disassembly of the game on the Arthur, RISC OS 2 and RISC OS 3.00 application discs The commentary is copyright Mark Moxon, and any misunderstandings or mistakes in the documentation are entirely my fault The terminology and notations used in this commentary are explained at https://lander.bbcelite.com/terminology The deep dive articles referred to in this commentary can be found at https://lander.bbcelite.com/deep_dives
This source file produces the following binary file: * GameCode.bin
CODE = &00008000 \ The build address for the game code
Configuration variables
TILE_SIZE = &01000000 \ The length of one side of a square \ landscape tile in 3D coordinates \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawLandscapeAndBuffers (Part 2 of 4) \ * DrawLandscapeAndBuffers (Part 3 of 4) \ * DrawObjects (Part 1 of 3) \ * DrawParticleToBuffer \ * DrawTriangleToBuffer \ * MoveAndDrawParticles (Part 3 of 4) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
TILES_X = 13 \ The number of tile corners in a landscape \ row from left to right (i.e. 12 tiles) \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawObjects (Part 1 of 3) \ * landscapeConfig \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
TILES_Z = 11 \ The number of tile corners in a landscape \ row from front to back (i.e. 10 tiles) \ \ [Show more]
\ \ This variable is used by the following: \ \ * AddTerminatorsToBuffers \ * DrawLandscapeAndBuffers (Part 3 of 4) \ * DrawLandscapeAndBuffers (Part 4 of 4) \ * DrawObjects (Part 1 of 3) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
MAX_PARTICLES = 484 \ The maximum number of particles at any one \ time \ \ [Show more]
\ \ This variable is used by the following: \ \ * StoreParticleData \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
LAUNCHPAD_OBJECT = 9 \ The type of object along the right edge of \ the launchpad (i.e. the three rockets) \ \ [Show more]
\ \ This variable is used by the following: \ \ * PlaceObjectsOnMap \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
LAUNCHPAD_ALTITUDE = &03500000 \ The altitude of the launchpad \ \ [Show more]
\ \ This variable is used by the following: \ \ * GetLandscapeAltitude \ * GetLandscapeTileColour \ * PlaceObjectsOnMap \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
SEA_LEVEL = &05500000 \ The altitude of sea level \ \ [Show more]
\ \ This variable is used by the following: \ \ * BounceParticle \ * DrawObjects (Part 2 of 3) \ * GetLandscapeAltitude \ * GetLandscapeTileColour \ * PlaceObjectsOnMap \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
LANDING_SPEED = &00200000 \ The maximum safe landing speed \ \ [Show more]
\ \ This variable is used by the following: \ \ * LandOnLaunchpad \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
SMOKE_RISING_SPEED = &00080000 \ The speed at which smoke particles rise up \ from a destroyed object \ \ [Show more]
\ \ This variable is used by the following: \ \ * AddSmokeParticleToBuffer \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
UNDERCARRIAGE_Y = &00640000 \ The height of the ship's undercarriage \ (0.390625 tiles), which is the distance \ from the centre of the ship to the bottom \ of the ship \ \ [Show more]
\ \ This variable is used by the following: \ \ * MoveAndDrawPlayer (Part 3 of 5) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
BUFFER_SIZE = 4308 \ The size of each of the graphics buffers \ in bytes
Calculated constants
STORE = 256 * INT(TILES_X / 32) \ We need 256 bytes of cornerStore for every \ 32 tiles across the landscape, so STORE \ contains the number of extra bytes of data \ we need for each extra set of 32 tiles on \ top of the default 256 byte buffers (so \ STORE is zero for the default landscape) LAUNCHPAD_Y = LAUNCHPAD_ALTITUDE - UNDERCARRIAGE_Y \ The y-coordinate of the \ ship as it sits on the \ launchpad, and on top of \ its undercarriage \ \ [Show more]
\ \ This variable is used by the following: \ \ * LandOnLaunchpad \ * PlacePlayerOnLaunchpad \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
LAUNCHPAD_SIZE = TILE_SIZE * 8 \ Size of the launchpad (8 tile sizes) \ \ [Show more]
\ \ This variable is used by the following: \ \ * GetLandscapeAltitude \ * LandOnLaunchpad \ * PlacePlayerOnLaunchpad \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
HIGHEST_ALTITUDE = TILE_SIZE * 52 \ Highest altitude for the engines to work \ (52 tile sizes, but as a positive number; \ the altitude is actually -TILE_SIZE * 52) \ \ [Show more]
\ \ This variable is used by the following: \ \ * MoveAndDrawPlayer (Part 2 of 5) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
SPLASH_HEIGHT = TILE_SIZE / 16 \ The height above the sea at which splash \ particles are added when a particle \ splashes into the sea (1/16 of a tile) \ \ [Show more]
\ \ This variable is used by the following: \ \ * SplashParticleIntoSea \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
CRASH_CLOUD_Y = TILE_SIZE * 5 / 16 \ The vertical distance above the \ player's ship where we add the \ explosion cloud when they crash \ (5/16-th of a tile) \ \ [Show more]
\ \ This variable is used by the following: \ \ * LoseLife \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
SMOKE_HEIGHT = TILE_SIZE * 3 / 4 \ The height at which smoke particles are \ added above the bottom of a destroyed \ object (3/4 of a tile) \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawObjects (Part 3 of 3) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
SAFE_HEIGHT = TILE_SIZE * 3 / 2 \ The minimum safe height for avoiding \ objects on the ground (1.5 tile sizes) \ \ [Show more]
\ \ This variable is used by the following: \ \ * MoveAndDrawPlayer (Part 3 of 5) \ * ProcessObjectDestruction \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
CAMERA_PLAYER_Z = (TILES_Z - 6) * TILE_SIZE \ The distance along the z-axis \ between the player and the \ camera position (which is at \ the back of the landscape, in \ the middle) \ \ [Show more]
\ \ This variable is used by the following: \ \ * MoveAndDrawPlayer (Part 3 of 5) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
LAND_MID_HEIGHT = TILE_SIZE * 5 \ The altitude of the mid-point of the \ generated landscape, to which the height \ of +/- 5 tiles is added by the Fourier \ synthesis in GetLandscapeAltitude \ \ [Show more]
\ \ This variable is used by the following: \ \ * GetLandscapeAltitude \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
PLAYER_FRONT_Z = (TILES_Z - 5) * TILE_SIZE \ The distance along the z-axis \ between the tile in front of the \ player and the camera, which is \ where we spawn explosions and \ falling rocks (set to six tiles \ forwards from the camera) \ \ [Show more]
\ \ This variable is used by the following: \ \ * AddShipExplosionToBuffer \ * AddSparkCloudToBuffer \ * DropRocksFromTheSky \ * SpawnRock \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
ROCK_HEIGHT = TILE_SIZE * 32 \ The height from which we drop rocks from \ the sky (32 tile sizes) \ \ [Show more]
\ \ This variable is used by the following: \ \ * DropRocksFromTheSky \ * SpawnRock \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
LANDSCAPE_X_WIDTH = TILE_SIZE * (TILES_X - 2) \ The width of the visible \ landscape in x-coordinates, \ counting whole tiles only, \ and ignoring the centre tile LANDSCAPE_Z_DEPTH = TILE_SIZE * (TILES_Z - 1) \ The depth of the visible \ landscape in z-coordinates, \ counting whole tiles only \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawTriangleShadowToBuffer \ * DrawTriangleToBuffer \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
LANDSCAPE_X = LANDSCAPE_X_WIDTH / 2 \ The x-coordinate of the landscape \ offset, which is set to the whole \ number of tiles that fit into the half \ the width of the landscape, so we end \ up looking at the middle point of the \ landscape \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawLandscapeAndBuffers (Part 2 of 4) \ * DrawObjects (Part 1 of 3) \ * landscapeOffset \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
LANDSCAPE_Y = 0 \ The y-coordinate of the landscape offset, \ which is zero so the landscape remains at \ the same height \ \ [Show more]
\ \ This variable is used by the following: \ \ * landscapeOffset \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
LANDSCAPE_Z = LANDSCAPE_Z_DEPTH + (10 * TILE_SIZE) \ The z-coordinate of the \ landscape offset, which is \ set to push the landscape \ away from the viewer by \ ten tile sizes \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawObjects (Part 2 of 3) \ * DrawParticleShadowToBuffer \ * DrawParticleToBuffer \ * DrawTriangleShadowToBuffer \ * DrawTriangleToBuffer \ * GetLandscapeBelowVertex \ * landscapeOffset \ * MoveAndDrawParticles (Part 2 of 4) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
HALF_TILES_X = INT(TILES_X / 2) \ Half the number of tiles from left to \ right in the landscape LANDSCAPE_X_HALF = TILE_SIZE * HALF_TILES_X \ The width of half the number \ of tiles from left to right in \ the landscape in x-coordinates \ \ [Show more]
\ \ This variable is used by the following: \ \ * MoveAndDrawParticles (Part 2 of 4) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
LANDSCAPE_Z_BEYOND = LANDSCAPE_Z_DEPTH + TILE_SIZE \ The depth of the visible \ landscape in z-coordinates \ plus one more tile \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawTriangleShadowToBuffer \ * DrawTriangleToBuffer \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
LANDSCAPE_Z_FRONT = LANDSCAPE_Z - LANDSCAPE_Z_DEPTH \ The z-coordinate of \ the front of the \ visible landscape \ \ [Show more]
\ \ This variable is used by the following: \ \ * MoveAndDrawParticles (Part 2 of 4) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
LANDSCAPE_Z_MID = LANDSCAPE_Z - CAMERA_PLAYER_Z \ The z-coordinate of the \ mid-point of the landscape \ depth (i.e. the player) \ \ [Show more]
\ \ This variable is used by the following: \ \ * MoveAndDrawParticles (Part 3 of 4) \ * MoveAndDrawPlayer (Part 3 of 5) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
Operating system SWI numbers
OS_WriteC = &00 \ The operating system call to write a \ character to all the output streams \ \ [Show more]
\ \ This variable is used by the following: \ \ * EndGame \ * Entry \ * GameOver \ * PrintCurrentScore \ * PrintHexDigit \ * PrintHexNumber \ * PrintScoreInBothBanks \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
OS_WriteS = &01 \ The operating system call to write a \ string to all the output streams \ \ [Show more]
\ \ This variable is used by the following: \ \ * AbortWithMemoryError \ * Entry \ * GameOver \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
OS_ReadC = &04 \ The operating system call to read a key \ press \ \ [Show more]
\ \ This variable is used by the following: \ \ * GameOver \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
OS_Byte = &06 \ General-purpose operating system calls \ \ [Show more]
\ \ This variable is used by the following: \ \ * EndGame \ * Entry \ * GameOver \ * MainLoop \ * PrintScoreInBothBanks \ * SwitchScreenBank \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
OS_Word = &07 \ General-purpose operating system calls \ \ [Show more]
\ \ This variable is used by the following: \ \ * ResetMousePosition \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
OS_Mouse = &1C \ The operating system call to read the \ mouse status \ \ [Show more]
\ \ This variable is used by the following: \ \ * MoveAndDrawPlayer (Part 1 of 5) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
OS_BinaryToDecimal = &28 \ The operating system call to convert a \ number into a string \ \ [Show more]
\ \ This variable is used by the following: \ \ * PrintCurrentScore \ * PrintScoreInBothBanks \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
Workspace variables
stack = &000121FC \ The stack is after the end of the main \ game code and descends from this address \ down to &00012000 (to give a stack size of \ 512 32-bit entries) \ \ [Show more]
\ \ This variable is used by the following: \ \ * stackAddr \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
workspace = stack + 4 \ The variable workspace starts just after \ the top of the stack \ \ [Show more]
\ \ This variable is used by the following: \ \ * workspaceAddr \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
\ R11 typically contains the address of the \ workspace, so each of the variables in the \ workspace can be referred to as: \ \ [R11, #offset] \ \ where #offset is one of the following \ variables xObject = &00 \ The x-coordinate of the object currently \ being drawn \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawObject (Part 1 of 5) \ * DrawObject (Part 2 of 5) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
yObject = &04 \ The y-coordinate of the object currently \ being drawn zObject = &08 \ The z-coordinate of the object currently \ being drawn \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawTriangleShadowToBuffer \ * DrawTriangleToBuffer \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
\ Offsets &0C to &2C appear to be unused rotationMatrix = &30 \ The rotation matrix of the object \ currently being drawn (i.e. the matrix \ formed from the object's three orientation \ vectors) \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawObject (Part 1 of 5) \ * DrawObjects (Part 2 of 3) \ * MoveAndDrawParticles (Part 3 of 4) \ * MoveAndDrawPlayer (Part 3 of 5) \ * MultiplyVectorByMatrix \ * TransposeRotationMatrix \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
xNoseV = &30 \ The x-coordinate of the nose vector \ \ [Show more]
\ \ This variable is used by the following: \ \ * CalculateRotationMatrix \ * MoveAndDrawPlayer (Part 5 of 5) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
xRoofV = &34 \ The x-coordinate of the roof vector \ \ [Show more]
\ \ This variable is used by the following: \ \ * CalculateRotationMatrix \ * MoveAndDrawPlayer (Part 2 of 5) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
xSideV = &38 \ The x-coordinate of the side vector \ \ [Show more]
\ \ This variable is used by the following: \ \ * CalculateRotationMatrix \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
yNoseV = &3C \ The y-coordinate of the nose vector \ \ [Show more]
\ \ This variable is used by the following: \ \ * CalculateRotationMatrix \ * MoveAndDrawPlayer (Part 5 of 5) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
yRoofV = &40 \ The y-coordinate of the roof vector \ \ [Show more]
\ \ This variable is used by the following: \ \ * CalculateRotationMatrix \ * MoveAndDrawPlayer (Part 2 of 5) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
ySideV = &44 \ The y-coordinate of the side vector \ \ [Show more]
\ \ This variable is used by the following: \ \ * CalculateRotationMatrix \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
zNoseV = &48 \ The z-coordinate of the nose vector \ \ [Show more]
\ \ This variable is used by the following: \ \ * CalculateRotationMatrix \ * MoveAndDrawPlayer (Part 5 of 5) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
zRoofV = &4C \ The z-coordinate of the roof vector \ \ [Show more]
\ \ This variable is used by the following: \ \ * CalculateRotationMatrix \ * MoveAndDrawPlayer (Part 2 of 5) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
zSideV = &50 \ The z-coordinate of the side vector \ \ [Show more]
\ \ This variable is used by the following: \ \ * CalculateRotationMatrix \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
xVertex = &54 \ The x-coordinate of the vertex being \ processed, relative to the object's origin \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawObject (Part 2 of 5) \ * DrawObject (Part 3 of 5) \ * DrawObject (Part 5 of 5) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
yVertex = &58 \ The y-coordinate of the vertex being \ processed, relative to the object's origin \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawObject (Part 3 of 5) \ * DrawObject (Part 5 of 5) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
zVertex = &5C \ The z-coordinate of the vertex being \ processed, relative to the object's origin \ Offset &60 appears to be unused xVertexRotated = &64 \ The x-coordinate of the vertex after being \ rotated by the object's rotation matrix \ \ [Show more]
\ \ This variable is used by the following: \ \ * AddVectors \ * AddVectorToVertices \ * DrawObject (Part 2 of 5) \ * MultiplyVectorByConstant \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
yVertexRotated = &68 \ The y-coordinate of the vertex after being \ rotated by the object's rotation matrix zVertexRotated = &6C \ The z-coordinate of the vertex after being \ rotated by the object's rotation matrix \ Offset &70 appears to be unused xCoord = &74 \ The x-coordinate of the vertex being \ processed, in the game's 3D coordinate \ system \ \ [Show more]
\ \ This variable is used by the following: \ \ * AddVectors \ * AddVectorToVertices \ * DrawObject (Part 2 of 5) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
yCoord = &78 \ The y-coordinate of the vertex being \ processed, in the game's 3D coordinate \ system \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawObject (Part 2 of 5) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
zCoord = &7C \ The z-coordinate of the vertex being \ processed, in the game's 3D coordinate \ system \ Offset &80 appears to be unused xObjectScaled = &84 \ The x-coordinate of the vertex being \ processed, scaled as high as possible \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawObject (Part 1 of 5) \ * DrawObject (Part 3 of 5) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
yObjectScaled = &88 \ The y-coordinate of the vertex being \ processed, scaled as high as possible zObjectScaled = &8C \ The z-coordinate of the vertex being \ processed, scaled as high as possible \ Offset &90 appears to be unused xPlayer = &94 \ The x-coordinate of the player's ship \ \ [Show more]
\ \ This variable is used by the following: \ \ * LandOnLaunchpad \ * LoseLife \ * MoveAndDrawPlayer (Part 2 of 5) \ * MoveAndDrawPlayer (Part 4 of 5) \ * MoveAndDrawPlayer (Part 5 of 5) \ * PlacePlayerOnLaunchpad \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
yPlayer = &98 \ The y-coordinate of the player's ship \ \ [Show more]
\ \ This variable is used by the following: \ \ * LandOnLaunchpad \ * MoveAndDrawParticles (Part 3 of 4) \ * MoveAndDrawPlayer (Part 3 of 5) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
zPlayer = &9C \ The z-coordinate of the player's ship xVelocity = &A0 \ The player's velocity in the x-axis \ \ [Show more]
\ \ This variable is used by the following: \ \ * LandOnLaunchpad \ * MoveAndDrawPlayer (Part 4 of 5) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
yVelocity = &A4 \ The player's velocity in the y-axis \ \ [Show more]
\ \ This variable is used by the following: \ \ * LandOnLaunchpad \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
zVelocity = &A8 \ The player's velocity in the z-axis \ \ [Show more]
\ \ This variable is used by the following: \ \ * LandOnLaunchpad \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
xExhaust = &AC \ The x-coordinate of the ship's exhaust \ vector, which points along the exhaust \ plume yExhaust = &B0 \ The y-coordinate of the ship's exhaust \ vector, which points along the exhaust \ plume zExhaust = &B4 \ The z-coordinate of the ship's exhaust \ vector, which points along the exhaust \ plume \ Offsets &B8 to &C0 appear to be unused previousColumn = &C4 \ The corner coordinates of the previous \ column while working along a row from left \ to right \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawLandscapeAndBuffers (Part 2 of 4) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
tileCornerRow = &E4 \ The number of the landscape tile corner \ row that is currently being processed \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawLandscapeAndBuffers (Part 1 of 4) \ * DrawLandscapeAndBuffers (Part 2 of 4) \ * DrawLandscapeAndBuffers (Part 3 of 4) \ * GetLandscapeTileColour \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
\ Offset &E8 appears to be unused unusedConfig = &F0 \ Storage for the first configuration value \ in the landscapeConfig table, which is \ stored but not used \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawLandscapeAndBuffers (Part 2 of 4) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
objectType = &F4 \ The type of the object currently being \ drawn \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawObjects (Part 2 of 3) \ * ProcessObjectDestruction \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
tileRowOddEven = &F8 \ A counter that flips every time we process \ a tile corner row when drawing the \ landscape, so we can trigger actions \ accordingly \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawLandscapeAndBuffers (Part 1 of 4) \ * DrawLandscapeAndBuffers (Part 3 of 4) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
\ Offset &FC appears to be unused altitude = &100 \ The altitude of the landscape at the \ most recently calculated coordinate \ \ [Show more]
\ \ This variable is used by the following: \ \ * GetLandscapeAltitude \ * GetLandscapeTileColour \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
prevAltitude = &104 \ The altitude of the landscape at the \ previously calculated coordinate \ \ [Show more]
\ \ This variable is used by the following: \ \ * GetLandscapeAltitude \ * GetLandscapeTileColour \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
particleEnd = &108 \ The address of the end of the particle \ data in the particle data buffer \ \ [Show more]
\ \ This variable is used by the following: \ \ * DeleteParticleData \ * InitialiseParticleData \ * StoreParticleData \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
particleCount = &10C \ The number of particles currently \ on-screen \ \ [Show more]
\ \ This variable is used by the following: \ \ * DeleteParticleData \ * InitialiseParticleData \ * StoreParticleData \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
objectData = &110 \ The address of the blueprint for the \ object currently being drawn \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawObject (Part 2 of 5) \ * DrawObject (Part 3 of 5) \ * DrawObjects (Part 2 of 3) \ * MoveAndDrawParticles (Part 3 of 4) \ * MoveAndDrawPlayer (Part 3 of 5) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
objectFlags = &114 \ The flags of the object currently being \ drawn \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawObject (Part 2 of 5) \ * DrawObject (Part 3 of 5) \ * DrawObject (Part 4 of 5) \ * MultiplyVectorByMatrix \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
mainLoopCount = &118 \ The main loop counter \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawObjects (Part 3 of 3) \ * LoseLife \ * MainLoop \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
crashLoopCount = &11C \ The loop counter for the crash animation \ \ [Show more]
\ \ This variable is used by the following: \ \ * LoseLife \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
crashedFlag = &120 \ If this is non-zero then the object being \ processed has crashed into the ground \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawObject (Part 1 of 5) \ * DrawObject (Part 2 of 5) \ * MoveAndDrawPlayer (Part 3 of 5) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
currentScore = &124 \ Our current score, which is displayed at \ the left end of the score bar \ \ It is initialised to initialScore at the \ start of each new game \ \ It goes down by one each time we fire a \ bullet, and goes up by 20 for each object \ we destroy \ \ [Show more]
\ \ This variable is used by the following: \ \ * DropRocksFromTheSky \ * Entry \ * MoveAndDrawPlayer (Part 5 of 5) \ * PrintCurrentScore \ * ProcessObjectDestruction \ * StartNewGame \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
fuelLevel = &128 \ The player's fuel level \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawFuelLevel \ * LandOnLaunchpad \ * MoveAndDrawPlayer (Part 1 of 5) \ * StartNewGame \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
gravity = &12C \ The current setting of gravity (which \ changes on higher levels) \ \ [Show more]
\ \ This variable is used by the following: \ \ * MoveAndDrawParticles (Part 1 of 4) \ * MoveAndDrawPlayer (Part 2 of 5) \ * PrintCurrentScore \ * StartNewGame \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
playingGame = &130 \ A flag to determine whether the game is \ being player, or whether this is the crash \ animation: \ \ * 0 = this is the crash animation \ \ * -1 = game is being played \ \ [Show more]
\ \ This variable is used by the following: \ \ * LoseLife \ * MoveAndDrawParticles (Part 3 of 4) \ * PlacePlayerOnLaunchpad \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
remainingLives = &134 \ The number of remaining lives, which is \ displayed towards the right end of the \ score bar, just before the high score \ \ It is initialised to 3 at the start of \ each new game \ \ [Show more]
\ \ This variable is used by the following: \ \ * LoseLife \ * PlacePlayerOnLaunchpad \ * StartNewGame \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
highScore = &138 \ The high score, which is displayed at the \ right end of the score bar \ \ It is initialised to initialHighScore when \ the game is loaded \ \ [Show more]
\ \ This variable is used by the following: \ \ * Entry \ * StartNewGame \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
xCamera = &13C \ The 3D x-coordinate of the camera position \ (though note that the camera position is \ actually at the back of the on-screen \ landscape, not the front) \ \ [Show more]
\ \ This variable is used by the following: \ \ * AddShipExplosionToBuffer \ * AddSparkCloudToBuffer \ * DrawLandscapeAndBuffers (Part 1 of 4) \ * DrawObjects (Part 1 of 3) \ * DrawObjects (Part 2 of 3) \ * DropRocksFromTheSky \ * GetLandscapeBelowVertex \ * MoveAndDrawParticles (Part 2 of 4) \ * MoveAndDrawPlayer (Part 3 of 5) \ * PlacePlayerOnLaunchpad \ * SpawnRock \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
yCamera = &140 \ The 3D y-coordinate of the camera position \ (though note that the camera position is \ actually at the back of the on-screen \ landscape, not the front) \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawLandscapeAndBuffers (Part 2 of 4) \ * DrawObjects (Part 2 of 3) \ * DrawObjects (Part 3 of 3) \ * GetLandscapeBelowVertex \ * MoveAndDrawParticles (Part 2 of 4) \ * MoveAndDrawParticles (Part 3 of 4) \ * MoveAndDrawParticles (Part 4 of 4) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
zCamera = &144 \ The 3D z-coordinate of the camera position \ (though note that the camera position is \ actually at the back of the on-screen \ landscape, not the front, so the camera's \ z-coordinate is larger than it would be \ for a more traditional camera position; \ it is more like the camera's focal point \ than position, in a sense) \ \ [Show more]
\ \ This variable is used by the following: \ \ * AddShipExplosionToBuffer \ * AddSparkCloudToBuffer \ * DrawLandscapeAndBuffers (Part 1 of 4) \ * DrawObjects (Part 1 of 3) \ * DrawObjects (Part 2 of 3) \ * DropRocksFromTheSky \ * GetLandscapeBelowVertex \ * MoveAndDrawParticles (Part 2 of 4) \ * PlacePlayerOnLaunchpad \ * SpawnRock \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
xCameraTile = &148 \ The 3D x-coordinate of the camera, clipped \ to the nearest tile \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawLandscapeAndBuffers (Part 1 of 4) \ * DrawLandscapeAndBuffers (Part 2 of 4) \ * DrawObjects (Part 1 of 3) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
yCameraTile = &14C \ The 3D y-coordinate of the camera, clipped \ to the nearest tile zCameraTile = &150 \ The 3D z-coordinate of the camera, clipped \ to the nearest tile \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawLandscapeAndBuffers (Part 1 of 4) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
shipDirection = &154 \ The direction in which the player's ship \ faces, which is angle b in the rotation \ matrix, and which is determined by the \ angle of the mouse from the centre point \ \ [Show more]
\ \ This variable is used by the following: \ \ * MoveAndDrawPlayer (Part 1 of 5) \ * PlacePlayerOnLaunchpad \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
shipPitch = &158 \ The pitch of the player's ship, which is \ angle a in the rotation matrix, and which \ is determined by the distance of the mouse \ from the centre point \ \ [Show more]
\ \ This variable is used by the following: \ \ * MoveAndDrawPlayer (Part 1 of 5) \ * PlacePlayerOnLaunchpad \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
fuelBurnRate = &15C \ The current fuel burn rate (bit 0 is \ ignored) \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawFuelLevel \ * MoveAndDrawPlayer (Part 1 of 5) \ * MoveAndDrawPlayer (Part 2 of 5) \ * MoveAndDrawPlayer (Part 4 of 5) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
xLandscapeRow = &160 \ The x-coordinate of the far-left corner \ of the landscape row that we are drawing, \ where rows run from left to right across \ the screen (this is a relative coordinate) \ \ [Show more]
\ \ This variable is used by the following: \ \ * AddVectors \ * DrawLandscapeAndBuffers (Part 1 of 4) \ * DrawLandscapeAndBuffers (Part 2 of 4) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
yLandscapeRow = &164 \ The y-coordinate of the far-left corner \ of the landscape row that we are drawing, \ where rows run from left to right across \ the screen (this is a relative coordinate) zLandscapeRow = &168 \ The z-coordinate of the far-left corner \ of the landscape row that we are drawing, \ where rows run from left to right across \ the screen (this is a relative coordinate) \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawLandscapeAndBuffers (Part 3 of 4) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
\ Offset &16C appears to be unused xLandscapeCol = &170 \ The x-coordinate of the far-left corner \ of the column (i.e. tile) that we are \ drawing in the current landscape row, \ where columns run in and out of the screen \ (this is a relative coordinate) \ \ [Show more]
\ \ This variable is used by the following: \ \ * AddVectors \ * DrawLandscapeAndBuffers (Part 2 of 4) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
yLandscapeCol = &174 \ The y-coordinate of the far-left corner \ of the column (i.e. tile) that we are \ drawing in the current landscape row, \ where columns run in and out of the screen \ (this is a relative coordinate) \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawLandscapeAndBuffers (Part 2 of 4) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
zLandscapeCol = &178 \ The z-coordinate of the far-left corner \ of the column (i.e. tile) that we are \ drawing in the current landscape row, \ where columns run in and out of the screen \ (this is a relative coordinate) \ Offsets &17C to &1FC appear to be unused stringBuffer = &200 \ A string buffer that's used when printing \ the scores \ \ [Show more]
\ \ This variable is used by the following: \ \ * PrintCurrentScore \ * PrintScoreInBothBanks \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
cornerStore1 = &400 \ Storage for coordinates of tile corners as \ we work our way through the landscape \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawLandscapeAndBuffers (Part 1 of 4) \ * DrawLandscapeAndBuffers (Part 3 of 4) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
cornerStore2 = &500 + STORE \ Storage for coordinates of tile corners as \ we work our way through the landscape \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawLandscapeAndBuffers (Part 3 of 4) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
vertexProjected = &600 + STORE * 2 \ Storage for projected vertices \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawObject (Part 2 of 5) \ * DrawObject (Part 4 of 5) \ * DrawObject (Part 5 of 5) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
particleData = &700 + STORE * 2 \ The particle data buffer, which stores \ eight data bytes for each on-screen \ particle \ \ [Show more]
\ \ This variable is used by the following: \ \ * InitialiseParticleData \ * MoveAndDrawParticles (Part 1 of 4) \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
objectMap = &4400 + STORE * 2 \ The object map determines which objects \ appear on the landscape, where objects are \ trees, buildings, rockets and so on (size \ of object map is 256 * 256 bytes = &10000) \ \ [Show more]
\ \ This variable is used by the following: \ \ * DrawObjects (Part 1 of 3) \ * MoveAndDrawPlayer (Part 3 of 5) \ * PlaceObjectsOnMap \ * ProcessObjectDestruction \ \ This list only includes code that refers \ to the variable by name; there may be \ other references to this memory location \ that don't use this label, and these will \ not be mentioned above
buffers = &14400 + STORE * 2 \ The graphics buffers, one for each tile \ corner row (so there are TILE_Z of them)