This index contains every subroutine and entry point that appears in the source code for Lander, grouped by category. An entry points is a label within a subroutine that is called from outside the subroutine, which typically implements a subset or variation of the functionality of the parent subroutine.
- 3D objects
- Copy protection
- Drawing lines
- Drawing the screen
- Drawing triangles
- Graphics buffers
- Landscape
- Main loop
- Maths (Arithmetic)
- Maths (Geometry)
- Particles
- Player
- Score bar
- Start and end
| 3D objects | |
| DrawObject (Part 1 of 5) | Draw a 3D object and its shadow | 
| DrawObject (Part 2 of 5) | Process the object's vertices | 
| DrawObject (Part 3 of 5) | Calculate the visibility of each of the object's faces | 
| DrawObject (Part 4 of 5) | Draw the shadow for each of the object's faces | 
| DrawObject (Part 5 of 5) | Draw each of the object's faces | 
| DrawObjects (Part 1 of 3) | 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) | Draw the object that we have found on the object map | 
| DrawObjects (Part 3 of 3) | Draw a destroyed object that we have found on the object map | 
| PlaceObjectsOnMap | Randomly place a number of objects on the map, avoiding the sea and the launchpad | 
| Copy protection | |
| DecryptGameBinary (!RunImage) | Placeholder routine to decrypt game code to &8000 so it can be run | 
| RunImageEntry (!RunImage) | Entry point for the !RunImage Absolute file | 
| Drawing lines | |
| DrawHorizontalLine | Draw a horizontal line | 
| DrawLineSegment | Draw a horizontal line of between 0 and 17 pixels by jumping to the relevant entry point | 
| Drawing the screen | |
| SwitchScreenBank | Switch screen banks and clear the newly hidden screen bank to black | 
| Drawing triangles | |
| DrawQuadrilateral | Draw a quadrilateral (i.e. two triangles) | 
| DrawTriangle (Part 1 of 11) | Draw a triangle, starting by ordering the coordinates and jumping to the relevant part of the routine | 
| DrawTriangle (Part 2 of 11) | Calculate the slope of (x1, y1) to (x2, y2) | 
| DrawTriangle (Part 3 of 11) | Calculate the slope of (x1, y1) to (x3, y3) | 
| DrawTriangle (Part 4 of 11) | Draw a triangle that isn't clipped and has a sloping first side | 
| DrawTriangle (Part 5 of 11) | Draw a triangle with a horizontal edge between (x1, y1) and (x2, y2) | 
| DrawTriangle (Part 6 of 11) | Draw a clipped triangle that's partly off-screen | 
| DrawTriangle (Part 7 of 11) | Calculate the slopes of (x1, y1) to (x2, y2) and (x1, y1) to (x3, y3) for a clipped triangle | 
| DrawTriangle (Part 8 of 11) | Draw the bottom part of a clipped triangle | 
| DrawTriangle (Part 9 of 11) | Draw the top part of a clipped triangle | 
| DrawTriangle (Part 10 of 11) | Draw a clipped triangle with a horizontal edge between (x1, y1) and (x2, y2) | 
| DrawTriangle (Part 11 of 11) | Draw a triangle, clipping it to the screen as we go | 
| DrawTriangleFromBuffer | Process the "draw triangle" command from the graphics buffer | 
| DrawTriangleShadowToBuffer | Draw a triangle shadow into the correct graphics buffer, according to its distance | 
| DrawTriangleToBuffer | Draw a coloured triangle into a slightly nearer graphics buffer, according to its distance | 
| Graphics buffers | |
| AddTerminatorsToBuffers | Add terminators to the ends of the graphics buffers so we know when to stop drawing | 
| DrawGraphicsBuffer | Draw the contents of the specified graphics buffer | 
| DrawNextFromGraphicsBuffer | Process the next command from the graphics buffer | 
| TerminateGraphicsBuffer | Terminate drawing from the graphics buffer by returning from the subroutine | 
| Landscape | |
| DrawLandscapeAndBuffers (Part 1 of 4) | Draw the landscape and the contents of the graphics buffers, from the back of the screen to the front | 
| DrawLandscapeAndBuffers (Part 2 of 4) | Draw a row of landscape tiles | 
| DrawLandscapeAndBuffers (Part 3 of 4) | Draw the objects in the graphics buffers for two rows behind the current corner row | 
| DrawLandscapeAndBuffers (Part 4 of 4) | Draw the remaining graphics buffers | 
| GetLandscapeAltitude | Calculate the altitude of the landscape for a given coordinate | 
| GetLandscapeBelowVertex | Calculate the landscape altitude directly below an object's vertex | 
| GetLandscapeTileColour | Calculate the colour of the landscape tile currently being drawn | 
| Main loop | |
| EndGame | Finish the game | 
| GameOver | Print a Game Over message and start a new game | 
| LoseLife | Display a crash animation when we lose a life and end the game if this is our last life | 
| LoseLifeFromParticleLoop | Lose a life when a crash is detected in the particle processing loop | 
| MainLoop | The main game loop | 
| StartNewGame | Start a brand new game with a full set of lives and a newly generated set of objects | 
| Maths (Arithmetic) | |
| GetRandomNumbers | Generate pseudo-random numbers from the random number seeds | 
| Maths (Geometry) | |
| AddVectors | An unused routine that adds two vectors and uses self-modifying code to store the results in a specified location | 
| AddVectorsWithFeedback | An unused routine that adds a delta vector to a coordinate and updates the delta with feedback from the coordinate value | 
| AddVectorToVertices | Add a vector to the rotated vertex coordinates to get the vertex coordinates in 3D space | 
| AddVectorToVertices+8 | Enter the routine with R0 to R3 already set | 
| CalculateRotationMatrix | Calculate the rotation matrix | 
| GetDotProduct | Calculate the dot product of two 3D vectors | 
| GetMouseInPolarCoordinates (Part 1 of 2) | Convert the mouse x- and y-coordinates into polar coordinates, starting by calculating the polar angle | 
| GetMouseInPolarCoordinates (Part 2 of 2) | Calculate the polar distance | 
| MultiplyVectorByConstant | An unused routine that multiplies a vector by a constant value | 
| MultiplyVectorByMatrix | Multiply a 3D vector by the rotation matrix in rotationMatrix, if the object is a rotating object | 
| ProjectParticleOntoScreen | Project a 3D particle coordinate onto the screen | 
| ProjectVertexOntoScreen | Project a vertex coordinate from a 3D object onto the screen | 
| TransposeRotationMatrix | An unused routine that transposes the rotation matrix | 
| Particles | |
| AddBulletParticleToBuffer | Add a bullet particle to the particle data buffer | 
| AddDebrisParticleToBuffer | Add a debris particle to the particle data buffer, which is a purple-brownish-green particle that bounces out of an explosion | 
| AddExhaustParticleToBuffer | Add one of the moving particles in the exhaust plume to the particle data buffer | 
| AddExplosionToBuffer | Create a big explosion of particles and add it to the particle data buffer | 
| AddMovingParticleToBuffer | Add a moving particle to the particle data buffer, adding a random element to its velocity and lifespan counter | 
| AddRisingParticleToBuffer | Add a particle to the particle data buffer that initially drifts up, with a random element to its velocity and lifespan counter | 
| AddShipExplosionToBuffer | An unused routine that adds a 50-cluster explosion cloud to the particle data buffer, just front of the player's ship | 
| AddSmallExplosionToBuffer | Add a small explosion to the particle data buffer | 
| AddSmokeParticleToBuffer | Add a smoke particle to the particle data buffer | 
| AddSparkCloudToBuffer | 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 | Add a spark particle to the particle data buffer that fades from white-hot to red over time | 
| AddSprayParticleToBuffer | Add a spray particle to the particle data buffer | 
| AddStaticParticleToBuffer | Add a particle to the particle data buffer that starts off static, adding a random element to its velocity and lifespan counter | 
| BounceParticle | Bounce a particle off the ground | 
| DeleteParticleData | Delete a particle from the particle data buffer and move the last particle's data down to take its place | 
| dpar1 | The start of the main particle-processing loop | 
| Draw1x1ParticleFromBuffer | Process the "draw 1x1-pixel specified" command from the graphics buffer | 
| Draw2x1ParticleFromBuffer | Process the "draw 2x1-pixel particle" command from the graphics buffer | 
| Draw2x2ParticleFromBuffer | Process the "draw 2x2-pixel particle" command from the graphics buffer | 
| Draw3x1ParticleFromBuffer | Process the "draw 3x1-pixel particle" command from the graphics buffer | 
| Draw3x2ParticleFromBuffer | Process the "draw 3x2-pixel particle" command from the graphics buffer | 
| DrawParticleShadowToBuffer | Draw a small black particle into the correct graphics buffer, according to its distance | 
| DrawParticleToBuffer | Draw a large coloured particle into a slightly nearer graphics, buffer according to its distance | 
| DropARockFromTheSky | Drop a rock from the specified coordinates by spawning it as a particle, albeit a very big particle with an associated 3D object | 
| DropRocksFromTheSky | If the score is 800 or more, then randomly drop rocks from the sky by spawning them as particles | 
| MoveAndDrawParticles (Part 1 of 4) | Process particle movement and draw the particles into the graphics buffers, starting with the movement of particles | 
| MoveAndDrawParticles (Part 2 of 4) | Draw particles (including rocks) into the graphics buffers | 
| MoveAndDrawParticles (Part 3 of 4) | Process rocks by checking for collisions and drawing them as 3D objects | 
| MoveAndDrawParticles (Part 4 of 4) | Draw particles into the graphics buffers | 
| ProcessObjectDestruction | If this particle has hit an object, destroy the object and the particle in an explosion, scoring points if it's a bullet | 
| SetParticleColourToFade | 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 | 
| SpawnRock | An unused routine that spawns a rock in the sky, at half the altitude of the rocks in the DropRocksFromTheSky routine | 
| SplashParticleIntoSea | Splash a particle into the sea, creating a spray particle | 
| StoreParticleData | Store the data for a new particle in the particle data buffer | 
| Player | |
| LandOnLaunchpad | Check to see if the player has landed on the launchpad | 
| MoveAndDrawPlayer (Part 1 of 5) | Process player movement and draw the player's ship into the graphics buffers, starting with reading the mouse position | 
| MoveAndDrawPlayer (Part 2 of 5) | Update the player's velocity and coordinates | 
| MoveAndDrawPlayer (Part 3 of 5) | Check for collisions and draw the ship | 
| MoveAndDrawPlayer (Part 4 of 5) | Spawn the particles in the exhaust plume if the engine is engaged | 
| MoveAndDrawPlayer (Part 5 of 5) | Spawn a bullet particle if the fire button is being pressed | 
| PlacePlayerOnLaunchpad | The main entry point for the game | 
| ResetMousePosition | Reset the mouse position to (511, 511), ready for the game | 
| Score bar | |
| DrawFuelLevel | Draw the bar at the top of the screen showing the current fuel level | 
| PrintCurrentScore | Print the current score at the left end of the score bar | 
| PrintHexDigit | An unused routine that prints a single digit hexadecimal number in the score bar | 
| PrintHexNumber | An unused routine that prints an 8-digit hexadecimal number on the second character row of the screen | 
| PrintScoreInBothBanks | Print a number at a specified text column in the score bar | 
| Start and end | |
| AbortWithMemoryError | Show a memory error and abort the game | 
| Entry | The main entry point for the game | 
| InitialiseParticleData | Initialise the particle data buffer and associated variables | 
| ReturnToDesktop | Return to the desktop |