This index contains every subroutine, entry point and variable that appears in the source code for Lander, sorted alphabetically.
| Name | Category | Description |
|---|---|---|
| AbortWithMemoryError | Start and end | Show a memory error and abort the game |
| absoluteAddr (!RunImage) | Copy protection | The address of the start of the Absolute file |
| AddBulletParticleToBuffer | Particles | Add a bullet particle to the particle data buffer |
| AddDebrisParticleToBuffer | Particles | Add a debris particle to the particle data buffer, which is a purple-brownish-green particle that bounces out of an explosion |
| AddExhaustParticleToBuffer | Particles | Add one of the moving particles in the exhaust plume to the particle data buffer |
| AddExplosionToBuffer | Particles | Create a big explosion of particles and add it to the particle data buffer |
| AddMovingParticleToBuffer | Particles | Add a moving particle to the particle data buffer, adding a random element to its velocity and lifespan counter |
| AddRisingParticleToBuffer | Particles | Add a particle to the particle data buffer that initially drifts up, with a random element to its velocity and lifespan counter |
| AddShipExplosionToBuffer | Particles | An unused routine that adds a 50-cluster explosion cloud to the particle data buffer, just front of the player's ship |
| AddSmallExplosionToBuffer | Particles | Add a small explosion to the particle data buffer |
| AddSmokeParticleToBuffer | Particles | Add a smoke particle to the particle data buffer |
| AddSparkCloudToBuffer | Particles | An unused routine that adds a cloud of 150 spark particles to the particle data buffer, just in front of the player's ship |
| AddSparkParticleToBuffer | Particles | Add a spark particle to the particle data buffer that fades from white-hot to red over time |
| AddSprayParticleToBuffer | Particles | Add a spray particle to the particle data buffer |
| AddStaticParticleToBuffer | Particles | Add a particle to the particle data buffer that starts off static, adding a random element to its velocity and lifespan counter |
| AddTerminatorsToBuffers | Graphics buffers | Add terminators to the ends of the graphics buffers so we know when to stop drawing |
| AddVectors | Maths (Geometry) | An unused routine that adds two vectors and uses self-modifying code to store the results in a specified location |
| AddVectorsWithFeedback | Maths (Geometry) | An unused routine that adds a delta vector to a coordinate and updates the delta with feedback from the coordinate value |
| AddVectorToVertices | Maths (Geometry) | Add a vector to the rotated vertex coordinates to get the vertex coordinates in 3D space |
| AddVectorToVertices+8 | Maths (Geometry) | Enter the routine with R0 to R3 already set |
| arctanTable | Maths (Geometry) | Arctan lookup table |
| arctanTableAddr | Maths (Geometry) | The address of the arctan lookup table |
| BounceParticle | Particles | Bounce a particle off the ground |
| bufferJump | Graphics buffers | The jump table for drawing commands that we store in the graphics buffers |
| CalculateRotationMatrix | Maths (Geometry) | Calculate the rotation matrix |
| DecryptGameBinary (!RunImage) | Copy protection | Placeholder routine to decrypt game code to &8000 so it can be run |
| DeleteParticleData | Particles | Delete a particle from the particle data buffer and move the last particle's data down to take its place |
| divisionTable | Maths (Arithmetic) | Division lookup tables |
| divisionTableAddr | Maths (Arithmetic) | The address of the division lookup table |
| dpar1 | Particles | The start of the main particle-processing loop |
| Draw1x1ParticleFromBuffer | Particles | Process the "draw 1x1-pixel specified" command from the graphics buffer |
| Draw2x1ParticleFromBuffer | Particles | Process the "draw 2x1-pixel particle" command from the graphics buffer |
| Draw2x2ParticleFromBuffer | Particles | Process the "draw 2x2-pixel particle" command from the graphics buffer |
| Draw3x1ParticleFromBuffer | Particles | Process the "draw 3x1-pixel particle" command from the graphics buffer |
| Draw3x2ParticleFromBuffer | Particles | Process the "draw 3x2-pixel particle" command from the graphics buffer |
| DrawFuelLevel | Score bar | Draw the bar at the top of the screen showing the current fuel level |
| DrawGraphicsBuffer | Graphics buffers | Draw the contents of the specified graphics buffer |
| DrawHorizontalLine | Drawing lines | Draw a horizontal line |
| DrawLandscapeAndBuffers (Part 1 of 4) | Landscape | Draw the landscape and the contents of the graphics buffers, from the back of the screen to the front |
| DrawLandscapeAndBuffers (Part 2 of 4) | Landscape | Draw a row of landscape tiles |
| DrawLandscapeAndBuffers (Part 3 of 4) | Landscape | Draw the objects in the graphics buffers for two rows behind the current corner row |
| DrawLandscapeAndBuffers (Part 4 of 4) | Landscape | Draw the remaining graphics buffers |
| DrawLineSegment | Drawing lines | Draw a horizontal line of between 0 and 17 pixels by jumping to the relevant entry point |
| DrawNextFromGraphicsBuffer | Graphics buffers | Process the next command from the graphics buffer |
| DrawObject (Part 1 of 5) | 3D objects | Draw a 3D object and its shadow |
| DrawObject (Part 2 of 5) | 3D objects | Process the object's vertices |
| DrawObject (Part 3 of 5) | 3D objects | Calculate the visibility of each of the object's faces |
| DrawObject (Part 4 of 5) | 3D objects | Draw the shadow for each of the object's faces |
| DrawObject (Part 5 of 5) | 3D objects | Draw each of the object's faces |
| DrawObjects (Part 1 of 3) | 3D objects | Draw all the objects in the visible portion of the object map, starting by working our way through the map looking for objects |
| DrawObjects (Part 2 of 3) | 3D objects | Draw the object that we have found on the object map |
| DrawObjects (Part 3 of 3) | 3D objects | Draw a destroyed object that we have found on the object map |
| DrawParticleShadowToBuffer | Particles | Draw a small black particle into the correct graphics buffer, according to its distance |
| DrawParticleToBuffer | Particles | Draw a large coloured particle into a slightly nearer graphics, buffer according to its distance |
| DrawQuadrilateral | Drawing triangles | Draw a quadrilateral (i.e. two triangles) |
| DrawTriangle (Part 1 of 11) | Drawing triangles | Draw a triangle, starting by ordering the coordinates and jumping to the relevant part of the routine |
| DrawTriangle (Part 2 of 11) | Drawing triangles | Calculate the slope of (x1, y1) to (x2, y2) |
| DrawTriangle (Part 3 of 11) | Drawing triangles | Calculate the slope of (x1, y1) to (x3, y3) |
| DrawTriangle (Part 4 of 11) | Drawing triangles | Draw a triangle that isn't clipped and has a sloping first side |
| DrawTriangle (Part 5 of 11) | Drawing triangles | Draw a triangle with a horizontal edge between (x1, y1) and (x2, y2) |
| DrawTriangle (Part 6 of 11) | Drawing triangles | Draw a clipped triangle that's partly off-screen |
| DrawTriangle (Part 7 of 11) | Drawing triangles | Calculate the slopes of (x1, y1) to (x2, y2) and (x1, y1) to (x3, y3) for a clipped triangle |
| DrawTriangle (Part 8 of 11) | Drawing triangles | Draw the bottom part of a clipped triangle |
| DrawTriangle (Part 9 of 11) | Drawing triangles | Draw the top part of a clipped triangle |
| DrawTriangle (Part 10 of 11) | Drawing triangles | Draw a clipped triangle with a horizontal edge between (x1, y1) and (x2, y2) |
| DrawTriangle (Part 11 of 11) | Drawing triangles | Draw a triangle, clipping it to the screen as we go |
| DrawTriangleFromBuffer | Drawing triangles | Process the "draw triangle" command from the graphics buffer |
| DrawTriangleShadowToBuffer | Drawing triangles | Draw a triangle shadow into the correct graphics buffer, according to its distance |
| DrawTriangleToBuffer | Drawing triangles | Draw a coloured triangle into a slightly nearer graphics buffer, according to its distance |
| DropARockFromTheSky | Particles | Drop a rock from the specified coordinates by spawning it as a particle, albeit a very big particle with an associated 3D object |
| DropRocksFromTheSky | Particles | If the score is 800 or more, then randomly drop rocks from the sky by spawning them as particles |
| EndGame | Main loop | Finish the game |
| Entry | Start and end | The main entry point for the game |
| fuelBarColour | Score bar | A four-pixel colour word for the colour of the fuel bar |
| gameCode (!RunImage) | Copy protection | The unencrypted game code |
| gameCodeAddr (!RunImage) | Copy protection | The address of the game code |
| gameCodeEndAddr (!RunImage) | Copy protection | The address of the end of the game code |
| GameOver | Main loop | Print a Game Over message and start a new game |
| GetDotProduct | Maths (Geometry) | Calculate the dot product of two 3D vectors |
| GetLandscapeAltitude | Landscape | Calculate the altitude of the landscape for a given coordinate |
| GetLandscapeBelowVertex | Landscape | Calculate the landscape altitude directly below an object's vertex |
| GetLandscapeTileColour | Landscape | Calculate the colour of the landscape tile currently being drawn |
| GetMouseInPolarCoordinates (Part 1 of 2) | Maths (Geometry) | Convert the mouse x- and y-coordinates into polar coordinates, starting by calculating the polar angle |
| GetMouseInPolarCoordinates (Part 2 of 2) | Maths (Geometry) | Calculate the polar distance |
| GetRandomNumbers | Maths (Arithmetic) | Generate pseudo-random numbers from the random number seeds |
| graphicsBuffEndAddr2 | Graphics buffers | The addresses of the tables containing the graphics buffer addresses (same as graphicsBufferEndAddr and graphicsBufferAddr) |
| graphicsBufferAddr | Graphics buffers | The address of the table containing the addresses of the graphics buffers |
| graphicsBufferEndAddr | Graphics buffers | The address of the table containing the end addresses of the graphics buffers |
| graphicsBuffers | Graphics buffers | The addresses of each of the graphics buffers (these values do not change) |
| graphicsBuffersEnd | Graphics buffers | The end addresses of each of the graphics buffers (these values get updated as objects are drawn into the buffers) |
| greyColourWords | Drawing the screen | An unused table of grey four-pixel colour words |
| greyColourWordsAddr | Drawing the screen | The unused address of the unused table of grey four-pixel colour words |
| initialFuelLevel | Score bar | The fuel level at the start of each new game |
| initialHighScore | Score bar | The high score when we first load the game |
| InitialiseParticleData | Start and end | Initialise the particle data buffer and associated variables |
| initialScore | Score bar | The score at the start of each game |
| LandOnLaunchpad | Player | Check to see if the player has landed on the launchpad |
| landscapeConfig | Landscape | The configuration data for each tile row in the landscape |
| landscapeConfigAddr | Landscape | The address of the landscapeConfig table |
| landscapeOffset | Landscape | The offset we apply to the on-screen landscape to push it away from us and to the left, so the visible tiles fit nicely on-screen |
| landscapeOffsetAddr | Landscape | The address of the landscape offset |
| lineJump | Drawing lines | Jump table for drawing a horizontal line of between 0 and 17 pixels using the relevant entry point in DrawLineSegment |
| LoseLife | Main loop | Display a crash animation when we lose a life and end the game if this is our last life |
| LoseLifeFromParticleLoop | Main loop | Lose a life when a crash is detected in the particle processing loop |
| MainLoop | Main loop | The main game loop |
| memoryTestAddr | Start and end | The memory location to check to ensure we have enough memory for the game |
| mouseParameters | Player | The parameters for OS_Word 21,3 for resetting the mouse position |
| mouseParametersAddr | Player | The address of the OS_Word block for resetting the mouse position |
| MoveAndDrawParticles (Part 1 of 4) | Particles | Process particle movement and draw the particles into the graphics buffers, starting with the movement of particles |
| MoveAndDrawParticles (Part 2 of 4) | Particles | Draw particles (including rocks) into the graphics buffers |
| MoveAndDrawParticles (Part 3 of 4) | Particles | Process rocks by checking for collisions and drawing them as 3D objects |
| MoveAndDrawParticles (Part 4 of 4) | Particles | Draw particles into the graphics buffers |
| MoveAndDrawPlayer (Part 1 of 5) | Player | Process player movement and draw the player's ship into the graphics buffers, starting with reading the mouse position |
| MoveAndDrawPlayer (Part 2 of 5) | Player | Update the player's velocity and coordinates |
| MoveAndDrawPlayer (Part 3 of 5) | Player | Check for collisions and draw the ship |
| MoveAndDrawPlayer (Part 4 of 5) | Player | Spawn the particles in the exhaust plume if the engine is engaged |
| MoveAndDrawPlayer (Part 5 of 5) | Player | Spawn a bullet particle if the fire button is being pressed |
| MultiplyVectorByConstant | Maths (Geometry) | An unused routine that multiplies a vector by a constant value |
| MultiplyVectorByMatrix | Maths (Geometry) | Multiply a 3D vector by the rotation matrix in rotationMatrix, if the object is a rotating object |
| objectBuilding | 3D objects | Object blueprint for the building |
| objectFirTree | 3D objects | Object blueprint for the fir tree |
| objectGazebo | 3D objects | Object blueprint for the gazebo |
| objectPlayer | 3D objects | Object blueprint for the player's ship |
| objectPlayerAddr | 3D objects | The address of the object blueprint for the player's ship |
| objectPyramid | 3D objects | Object blueprint for a pyramid |
| objectRock | 3D objects | Object blueprint for a rock |
| objectRockAddr | 3D objects | The address of the object blueprint for a rock |
| objectRocket | 3D objects | Object blueprint for the rocket |
| objectSmallLeafyTree | 3D objects | Object blueprint for the small leafy tree |
| objectSmokingBuilding | 3D objects | Object blueprint for the smoking remains of a building |
| objectSmokingGazebo | 3D objects | Object blueprint for the smoking remains of a gazebo |
| objectSmokingRemainsLeft | 3D objects | Object blueprint for the smoking remains that bend to the left |
| objectSmokingRemainsRight | 3D objects | Object blueprint for the smoking remains that bend to the right |
| objectTallLeafyTree | 3D objects | Object blueprint for the tall leafy tree |
| objectTypes | 3D objects | A table that maps object types to object blueprints |
| PlaceObjectsOnMap | 3D objects | Randomly place a number of objects on the map, avoiding the sea and the launchpad |
| PlacePlayerOnLaunchpad | Player | The main entry point for the game |
| PrintCurrentScore | Score bar | Print the current score at the left end of the score bar |
| PrintHexDigit | Score bar | An unused routine that prints a single digit hexadecimal number in the score bar |
| PrintHexNumber | Score bar | An unused routine that prints an 8-digit hexadecimal number on the second character row of the screen |
| PrintScoreInBothBanks | Score bar | Print a number at a specified text column in the score bar |
| ProcessObjectDestruction | Particles | If this particle has hit an object, destroy the object and the particle in an explosion, scoring points if it's a bullet |
| ProjectParticleOntoScreen | Maths (Geometry) | Project a 3D particle coordinate onto the screen |
| ProjectVertexOntoScreen | Maths (Geometry) | Project a vertex coordinate from a 3D object onto the screen |
| randomSeed1 | Maths (Arithmetic) | The first random seed for the random number generator |
| randomSeed2 | Maths (Arithmetic) | The second random seed for the random number generator |
| ResetMousePosition | Player | Reset the mouse position to (511, 511), ready for the game |
| ReturnToDesktop | Start and end | Return to the desktop |
| RunImageEntry (!RunImage) | Copy protection | Entry point for the !RunImage Absolute file |
| screenAddr | Drawing the screen | The screen address for the start of the 17th pixel line in the current bank (i.e. the line just below the two rows of text) |
| screenBank1Addr | Drawing the screen | The screen address for the start of the 17th pixel line in screen bank 1 (i.e. the line just below the two rows of text) |
| screenBank2Addr | Drawing the screen | The screen address for the start of the 17th pixel line in screen bank 0 (i.e. the line just below the two rows of text) |
| screenBankNumber | Drawing the screen | The number of the current screen bank (0 or 1) |
| SetParticleColourToFade | Particles | Set the flags for a particle whose colour fades from white to red over time, to give a white-hot explosion particle that cools down |
| sinTable | Maths (Geometry) | Sine/cosine lookup table |
| sinTableAddr | Maths (Geometry) | The address of the sine/cosine lookup table |
| SpawnRock | Particles | An unused routine that spawns a rock in the sky, at half the altitude of the rocks in the DropRocksFromTheSky routine |
| SplashParticleIntoSea | Particles | Splash a particle into the sea, creating a spray particle |
| squareRootTable | Maths (Arithmetic) | Square root lookup table |
| squareRootTableAddr | Maths (Arithmetic) | The address of the square root lookup table |
| stackAddr | Start and end | The address of the game's stack |
| stackPointerOnEntry | Start and end | Stores the stack pointer from when the game was run |
| StartNewGame | Main loop | Start a brand new game with a full set of lives and a newly generated set of objects |
| StoreParticleData | Particles | Store the data for a new particle in the particle data buffer |
| SwitchScreenBank | Drawing the screen | Switch screen banks and clear the newly hidden screen bank to black |
| TerminateGraphicsBuffer | Graphics buffers | Terminate drawing from the graphics buffer by returning from the subroutine |
| TransposeRotationMatrix | Maths (Geometry) | An unused routine that transposes the rotation matrix |
| workspaceAddr | Start and end | The address of the game's variable workspace |