Skip to navigation


A-Z index of the source code

This index contains every subroutine, entry point and variable that appears in the source code for Lander, sorted alphabetically.

NameCategoryDescription
AbortWithMemoryErrorStart and endShow a memory error and abort the game
absoluteAddr (!RunImage)Copy protectionThe address of the start of the Absolute file
AddBulletParticleToBufferParticlesAdd a bullet particle to the particle data buffer
AddDebrisParticleToBufferParticlesAdd a debris particle to the particle data buffer, which is a purple-brownish-green particle that bounces out of an explosion
AddExhaustParticleToBufferParticlesAdd one of the moving particles in the exhaust plume to the particle data buffer
AddExplosionToBufferParticlesCreate a big explosion of particles and add it to the particle data buffer
AddMovingParticleToBufferParticlesAdd a moving particle to the particle data buffer, adding a random element to its velocity and lifespan counter
AddRisingParticleToBufferParticlesAdd a particle to the particle data buffer that initially drifts up, with a random element to its velocity and lifespan counter
AddShipExplosionToBufferParticlesAn unused routine that adds a 50-cluster explosion cloud to the particle data buffer, just front of the player's ship
AddSmallExplosionToBufferParticlesAdd a small explosion to the particle data buffer
AddSmokeParticleToBufferParticlesAdd a smoke particle to the particle data buffer
AddSparkCloudToBufferParticlesAn unused routine that adds a cloud of 150 spark particles to the particle data buffer, just in front of the player's ship
AddSparkParticleToBufferParticlesAdd a spark particle to the particle data buffer that fades from white-hot to red over time
AddSprayParticleToBufferParticlesAdd a spray particle to the particle data buffer
AddStaticParticleToBufferParticlesAdd a particle to the particle data buffer that starts off static, adding a random element to its velocity and lifespan counter
AddTerminatorsToBuffersGraphics buffersAdd terminators to the ends of the graphics buffers so we know when to stop drawing
AddVectorsMaths (Geometry)An unused routine that adds two vectors and uses self-modifying code to store the results in a specified location
AddVectorsWithFeedbackMaths (Geometry)An unused routine that adds a delta vector to a coordinate and updates the delta with feedback from the coordinate value
AddVectorToVerticesMaths (Geometry)Add a vector to the rotated vertex coordinates to get the vertex coordinates in 3D space
AddVectorToVertices+8Maths (Geometry)Enter the routine with R0 to R3 already set
arctanTableMaths (Geometry)Arctan lookup table
arctanTableAddrMaths (Geometry)The address of the arctan lookup table
BounceParticleParticlesBounce a particle off the ground
bufferJumpGraphics buffersThe jump table for drawing commands that we store in the graphics buffers
CalculateRotationMatrixMaths (Geometry)Calculate the rotation matrix
DecryptGameBinary (!RunImage)Copy protectionPlaceholder routine to decrypt game code to &8000 so it can be run
DeleteParticleDataParticlesDelete a particle from the particle data buffer and move the last particle's data down to take its place
divisionTableMaths (Arithmetic)Division lookup tables
divisionTableAddrMaths (Arithmetic)The address of the division lookup table
dpar1ParticlesThe start of the main particle-processing loop
Draw1x1ParticleFromBufferParticlesProcess the "draw 1x1-pixel specified" command from the graphics buffer
Draw2x1ParticleFromBufferParticlesProcess the "draw 2x1-pixel particle" command from the graphics buffer
Draw2x2ParticleFromBufferParticlesProcess the "draw 2x2-pixel particle" command from the graphics buffer
Draw3x1ParticleFromBufferParticlesProcess the "draw 3x1-pixel particle" command from the graphics buffer
Draw3x2ParticleFromBufferParticlesProcess the "draw 3x2-pixel particle" command from the graphics buffer
DrawFuelLevelScore barDraw the bar at the top of the screen showing the current fuel level
DrawGraphicsBufferGraphics buffersDraw the contents of the specified graphics buffer
DrawHorizontalLineDrawing linesDraw a horizontal line
DrawLandscapeAndBuffers (Part 1 of 4)LandscapeDraw the landscape and the contents of the graphics buffers, from the back of the screen to the front
DrawLandscapeAndBuffers (Part 2 of 4)LandscapeDraw a row of landscape tiles
DrawLandscapeAndBuffers (Part 3 of 4)LandscapeDraw the objects in the graphics buffers for two rows behind the current corner row
DrawLandscapeAndBuffers (Part 4 of 4)LandscapeDraw the remaining graphics buffers
DrawLineSegmentDrawing linesDraw a horizontal line of between 0 and 17 pixels by jumping to the relevant entry point
DrawNextFromGraphicsBufferGraphics buffersProcess the next command from the graphics buffer
DrawObject (Part 1 of 5)3D objectsDraw a 3D object and its shadow
DrawObject (Part 2 of 5)3D objectsProcess the object's vertices
DrawObject (Part 3 of 5)3D objectsCalculate the visibility of each of the object's faces
DrawObject (Part 4 of 5)3D objectsDraw the shadow for each of the object's faces
DrawObject (Part 5 of 5)3D objectsDraw each of the object's faces
DrawObjects (Part 1 of 3)3D objectsDraw 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 objectsDraw the object that we have found on the object map
DrawObjects (Part 3 of 3)3D objectsDraw a destroyed object that we have found on the object map
DrawParticleShadowToBufferParticlesDraw a small black particle into the correct graphics buffer, according to its distance
DrawParticleToBufferParticlesDraw a large coloured particle into a slightly nearer graphics, buffer according to its distance
DrawQuadrilateralDrawing trianglesDraw a quadrilateral (i.e. two triangles)
DrawTriangle (Part 1 of 11)Drawing trianglesDraw a triangle, starting by ordering the coordinates and jumping to the relevant part of the routine
DrawTriangle (Part 2 of 11)Drawing trianglesCalculate the slope of (x1, y1) to (x2, y2)
DrawTriangle (Part 3 of 11)Drawing trianglesCalculate the slope of (x1, y1) to (x3, y3)
DrawTriangle (Part 4 of 11)Drawing trianglesDraw a triangle that isn't clipped and has a sloping first side
DrawTriangle (Part 5 of 11)Drawing trianglesDraw a triangle with a horizontal edge between (x1, y1) and (x2, y2)
DrawTriangle (Part 6 of 11)Drawing trianglesDraw a clipped triangle that's partly off-screen
DrawTriangle (Part 7 of 11)Drawing trianglesCalculate the slopes of (x1, y1) to (x2, y2) and (x1, y1) to (x3, y3) for a clipped triangle
DrawTriangle (Part 8 of 11)Drawing trianglesDraw the bottom part of a clipped triangle
DrawTriangle (Part 9 of 11)Drawing trianglesDraw the top part of a clipped triangle
DrawTriangle (Part 10 of 11)Drawing trianglesDraw a clipped triangle with a horizontal edge between (x1, y1) and (x2, y2)
DrawTriangle (Part 11 of 11)Drawing trianglesDraw a triangle, clipping it to the screen as we go
DrawTriangleFromBufferDrawing trianglesProcess the "draw triangle" command from the graphics buffer
DrawTriangleShadowToBufferDrawing trianglesDraw a triangle shadow into the correct graphics buffer, according to its distance
DrawTriangleToBufferDrawing trianglesDraw a coloured triangle into a slightly nearer graphics buffer, according to its distance
DropARockFromTheSkyParticlesDrop a rock from the specified coordinates by spawning it as a particle, albeit a very big particle with an associated 3D object
DropRocksFromTheSkyParticlesIf the score is 800 or more, then randomly drop rocks from the sky by spawning them as particles
EndGameMain loopFinish the game
EntryStart and endThe main entry point for the game
fuelBarColourScore barA four-pixel colour word for the colour of the fuel bar
gameCode (!RunImage)Copy protectionThe unencrypted game code
gameCodeAddr (!RunImage)Copy protectionThe address of the game code
gameCodeEndAddr (!RunImage)Copy protectionThe address of the end of the game code
GameOverMain loopPrint a Game Over message and start a new game
GetDotProductMaths (Geometry)Calculate the dot product of two 3D vectors
GetLandscapeAltitudeLandscapeCalculate the altitude of the landscape for a given coordinate
GetLandscapeBelowVertexLandscapeCalculate the landscape altitude directly below an object's vertex
GetLandscapeTileColourLandscapeCalculate 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
GetRandomNumbersMaths (Arithmetic)Generate pseudo-random numbers from the random number seeds
graphicsBuffEndAddr2Graphics buffersThe addresses of the tables containing the graphics buffer addresses (same as graphicsBufferEndAddr and graphicsBufferAddr)
graphicsBufferAddrGraphics buffersThe address of the table containing the addresses of the graphics buffers
graphicsBufferEndAddrGraphics buffersThe address of the table containing the end addresses of the graphics buffers
graphicsBuffersGraphics buffersThe addresses of each of the graphics buffers (these values do not change)
graphicsBuffersEndGraphics buffersThe end addresses of each of the graphics buffers (these values get updated as objects are drawn into the buffers)
greyColourWordsDrawing the screenAn unused table of grey four-pixel colour words
greyColourWordsAddrDrawing the screenThe unused address of the unused table of grey four-pixel colour words
initialFuelLevelScore barThe fuel level at the start of each new game
initialHighScoreScore barThe high score when we first load the game
InitialiseParticleDataStart and endInitialise the particle data buffer and associated variables
initialScoreScore barThe score at the start of each game
LandOnLaunchpadPlayerCheck to see if the player has landed on the launchpad
landscapeConfigLandscapeThe configuration data for each tile row in the landscape
landscapeConfigAddrLandscapeThe address of the landscapeConfig table
landscapeOffsetLandscapeThe 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
landscapeOffsetAddrLandscapeThe address of the landscape offset
lineJumpDrawing linesJump table for drawing a horizontal line of between 0 and 17 pixels using the relevant entry point in DrawLineSegment
LoseLifeMain loopDisplay a crash animation when we lose a life and end the game if this is our last life
LoseLifeFromParticleLoopMain loopLose a life when a crash is detected in the particle processing loop
MainLoopMain loopThe main game loop
memoryTestAddrStart and endThe memory location to check to ensure we have enough memory for the game
mouseParametersPlayerThe parameters for OS_Word 21,3 for resetting the mouse position
mouseParametersAddrPlayerThe address of the OS_Word block for resetting the mouse position
MoveAndDrawParticles (Part 1 of 4)ParticlesProcess particle movement and draw the particles into the graphics buffers, starting with the movement of particles
MoveAndDrawParticles (Part 2 of 4)ParticlesDraw particles (including rocks) into the graphics buffers
MoveAndDrawParticles (Part 3 of 4)ParticlesProcess rocks by checking for collisions and drawing them as 3D objects
MoveAndDrawParticles (Part 4 of 4)ParticlesDraw particles into the graphics buffers
MoveAndDrawPlayer (Part 1 of 5)PlayerProcess player movement and draw the player's ship into the graphics buffers, starting with reading the mouse position
MoveAndDrawPlayer (Part 2 of 5)PlayerUpdate the player's velocity and coordinates
MoveAndDrawPlayer (Part 3 of 5)PlayerCheck for collisions and draw the ship
MoveAndDrawPlayer (Part 4 of 5)PlayerSpawn the particles in the exhaust plume if the engine is engaged
MoveAndDrawPlayer (Part 5 of 5)PlayerSpawn a bullet particle if the fire button is being pressed
MultiplyVectorByConstantMaths (Geometry)An unused routine that multiplies a vector by a constant value
MultiplyVectorByMatrixMaths (Geometry)Multiply a 3D vector by the rotation matrix in rotationMatrix, if the object is a rotating object
objectBuilding3D objectsObject blueprint for the building
objectFirTree3D objectsObject blueprint for the fir tree
objectGazebo3D objectsObject blueprint for the gazebo
objectPlayer3D objectsObject blueprint for the player's ship
objectPlayerAddr3D objectsThe address of the object blueprint for the player's ship
objectPyramid3D objectsObject blueprint for a pyramid
objectRock3D objectsObject blueprint for a rock
objectRockAddr3D objectsThe address of the object blueprint for a rock
objectRocket3D objectsObject blueprint for the rocket
objectSmallLeafyTree3D objectsObject blueprint for the small leafy tree
objectSmokingBuilding3D objectsObject blueprint for the smoking remains of a building
objectSmokingGazebo3D objectsObject blueprint for the smoking remains of a gazebo
objectSmokingRemainsLeft3D objectsObject blueprint for the smoking remains that bend to the left
objectSmokingRemainsRight3D objectsObject blueprint for the smoking remains that bend to the right
objectTallLeafyTree3D objectsObject blueprint for the tall leafy tree
objectTypes3D objectsA table that maps object types to object blueprints
PlaceObjectsOnMap3D objectsRandomly place a number of objects on the map, avoiding the sea and the launchpad
PlacePlayerOnLaunchpadPlayerThe main entry point for the game
PrintCurrentScoreScore barPrint the current score at the left end of the score bar
PrintHexDigitScore barAn unused routine that prints a single digit hexadecimal number in the score bar
PrintHexNumberScore barAn unused routine that prints an 8-digit hexadecimal number on the second character row of the screen
PrintScoreInBothBanksScore barPrint a number at a specified text column in the score bar
ProcessObjectDestructionParticlesIf this particle has hit an object, destroy the object and the particle in an explosion, scoring points if it's a bullet
ProjectParticleOntoScreenMaths (Geometry)Project a 3D particle coordinate onto the screen
ProjectVertexOntoScreenMaths (Geometry)Project a vertex coordinate from a 3D object onto the screen
randomSeed1Maths (Arithmetic)The first random seed for the random number generator
randomSeed2Maths (Arithmetic)The second random seed for the random number generator
ResetMousePositionPlayerReset the mouse position to (511, 511), ready for the game
ReturnToDesktopStart and endReturn to the desktop
RunImageEntry (!RunImage)Copy protectionEntry point for the !RunImage Absolute file
screenAddrDrawing the screenThe 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)
screenBank1AddrDrawing the screenThe 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)
screenBank2AddrDrawing the screenThe 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)
screenBankNumberDrawing the screenThe number of the current screen bank (0 or 1)
SetParticleColourToFadeParticlesSet the flags for a particle whose colour fades from white to red over time, to give a white-hot explosion particle that cools down
sinTableMaths (Geometry)Sine/cosine lookup table
sinTableAddr Maths (Geometry)The address of the sine/cosine lookup table
SpawnRockParticlesAn unused routine that spawns a rock in the sky, at half the altitude of the rocks in the DropRocksFromTheSky routine
SplashParticleIntoSeaParticlesSplash a particle into the sea, creating a spray particle
squareRootTableMaths (Arithmetic)Square root lookup table
squareRootTableAddrMaths (Arithmetic)The address of the square root lookup table
stackAddrStart and endThe address of the game's stack
stackPointerOnEntryStart and endStores the stack pointer from when the game was run
StartNewGameMain loopStart a brand new game with a full set of lives and a newly generated set of objects
StoreParticleDataParticlesStore the data for a new particle in the particle data buffer
SwitchScreenBankDrawing the screenSwitch screen banks and clear the newly hidden screen bank to black
TerminateGraphicsBufferGraphics buffersTerminate drawing from the graphics buffer by returning from the subroutine
TransposeRotationMatrixMaths (Geometry)An unused routine that transposes the rotation matrix
workspaceAddrStart and endThe address of the game's variable workspace