Skip to navigation

List of all variables

This index contains every variable that appears in the source code for The Sentinel, grouped by category. A variable is defined as a labelled memory location that is used for storing data, and this list includes both variables that are defined in workspaces, and variables that are declared within the body of the source code.

3D objects
----------

objectTypeEnergyThe amount of energy required to create each object or the amount energy acquired when absorbing each object
objectTypesThe object types table for up to 64 objects
objectYawAngleThe yaw angle for each object (i.e. the horizontal direction in which they are facing)
tileNumberThe tile number to which we are adding an object in the PlaceObjectOnTile routine
xObjectThe x-coordinates in 3D space for the 3D objects
yObjectHiThe y-coordinates in 3D space for the 3D objects (high byte)
yObjectLoThe y-coordinates in 3D space for the 3D objects (low byte)
zObjectThe z-coordinates in 3D space for the 3D objects

Drawing objects
---------------

objBoulderThe list of polygons and points for the boulder object (polygons 67 to 76, using points 68 to 75)
objMeanieThe list of polygons and points for the meanie object (polygons 77 to 101, using points 76 to 93)
objPointDistancePolar distances for each of the points in each of the objects
objPointHeightThe height of each of the points in each of the objects, relative to the object's origin
objPointRangeThe first and last point numbers for each object
objPointYawPolar yaw angles for each of the points in each of the objects
objPolygonAddrHiAddresses for the list of polygons and points for each object (high byte)
objPolygonAddrLoAddresses for the list of polygons and points for each object (low byte)
objPolygonDataVarious data for object polygons (colour, drawing phase)
objPolygonPhasesThe phase configuration for each object
objPolygonRangeThe first and last polygon numbers for each object
objRobotThe list of polygons and points for the robot object (polygons 0 to 26, using points 0 to 28)
objSentinelThe list of polygons and points for the Sentinel object (polygons 102 to 136, using points 94 to 123)
objSentryThe list of polygons and points for the sentry object (polygons 27 to 51, using points 29 to 50)
objTextBlockThe list of polygons and points for the 3D text block object (polygons 148 to 151, using points 136 to 143)
objTowerThe list of polygons and points for the Sentinel's tower object (polygons 137 to 147, using points 124 to 135)
objTreeThe list of polygons and points for the tree object (polygons 52 to 66, using points 51 to 67)

Drawing polygons
----------------

edgePixelsLeftTable to convert a polygon colours byte and a pixel offset (0-3) into a pixel byte for the left edge of the polygon pixel line
edgePixelsRightTable to convert a polygon colours byte and a pixel offset (0-3) into a pixel byte for the right edge of the polygon pixel line
trianglePointAddThe value to add to the second point number to get the third point number when drawing a tile face as two triangles
triangleStartThe number of the first point in each two-face shape that is drawn as a pair of triangles
xPolygonLeftThe pixel x-coordinate of the left edge of each pixel line in the polygon being drawn
xPolygonPointHiPixel x-coordinates for all the points in the polygon that we are currently drawing (high bytes)
xPolygonPointLoPixel x-coordinates for all the points in the polygon that we are currently drawing (low bytes)
xPolygonRightThe pixel x-coordinate of the right edge of each pixel line in the polygon being drawn

Drawing the landscape
---------------------

drawViewPitchHiStorage for the pitch angles of tiles and object points for drawing the current landscape view (high bytes)
drawViewPitchLoStorage for the pitch angles of tiles and object points for drawing the current landscape view (low bytes)
drawViewYawHiStorage for the yaw angles of tiles and object points for drawing the current landscape view (high bytes)
drawViewYawLoStorage for the yaw angles of tiles and object points for drawing the current landscape view (low bytes)
panAngleToUpdatePitch and yaw angles for panning the landscape view, so the output of DrawLandscapeView will be the bit we add when updating the view
quadrantOffsetsOffsets into the tile view data tables for the four different viewing directions
tileShapeColourTile colours by shape and the orientation of the viewer
tileVisibilityA table for storing the visibility of each tile from the player's point of view, with one bit per tile (1 = visible, 0 = hidden)
visibileBitMaskA table for converting a number in the range 0 to 7 into a bit mask with only that bit set, when counting from the left

Gameplay
--------

enemyYawStepThe yaw angle through which each enemy rotates on each scheduled rotation
objectHalfWidthEach object's width in terms of tile widths, for half the object
xStoreEnemyGazeTemporary storage for X so it can be preserved through calls to CheckEnemyGaze

Graphics
--------

backgroundEvenPixel bytes for even pixel rows in the screen background
backgroundOddPixel bytes for odd pixel rows in the screen background
clearPixelMaskA table for converting a pixel number in the range 0 to 3 into a screen mode 5 bit mask with that pixel's bits clear and others set
colourPalettesThe logical colours for two mode 5 palettes
colourPixelsA table that maps logical colours 0 to 3 to a four-pixel byte in that colour
dotColourA flag that determines the colour of the dots drawn by the DrawRandomDots routine
dotCounterA counter for the number of dots drawn in the DrawRandomDots routine
iconBufferThe icon screen buffer, which is used to buffer the energy icon and scanner row before writing to screen memory
iconDataScreen mode 5 bitmap data for the ten icons that make up the energy icon and scanner row at the top of the screen
leftPixelsPixel byte with all the pixels to the right of position X + 1 set, to give the complementary pixel byte to pixelsToRight
pixelBitMaskA table for converting a pixel number in the range 0 to 3 into a screen mode 5 bit mask with that pixel's bits set and others clear
pixelByteColour1A table for converting a pixel number in the range 0 to 3 into a screen mode 5 pixel byte with that pixel set to colour 1 (%01)
pixelByteColour2A table for converting a pixel number in the range 0 to 3 into a screen mode 5 pixel byte with that pixel set to colour 2 (%10)
pixelsToLeftPixel byte with all the pixels to the left of position X set
pixelsToRightPixel byte with all the pixels to the right of position X set

Keyboard
--------

gameKeysNegative inkey values for the game keys
keyLoggerConfigThe configuration table for storing keys the key logger
spaceKeyDebounceA variable to flag whether the SPACE key has been pressed, so we can implement debounce

Landscape
---------

landscapeColour2Physical colours for colour 2 in the game palette for the different numbers of enemies
landscapeColour3Physical colours for colour 3 in the game palette for the different numbers of enemies
leadingBitMaskA table for converting the number of leading clear bits in a number into a bit mask with the same number of leading zeroes
maxAltitudeThe maximum tile altitude for each 4x4 block of tiles
secretCode0000The secret entry code for landscape 0000 (06045387)
secretCodeStashA stash for calculated values for each iteration in the CheckSecretCode routine
stripDataStorage for tile data when smoothing strips of tiles during the landscape generation process
tileDataAltitude and shape data for landscape tiles
tileEdgesA table to map tile shapes and gaze vector direction to tile edges
tilesAtAltitudeStorage for tile blocks at specific altitudes for placing enemies on the landscape
xTileMaxAltitudeThe tile x-coordinate of the highest tile within each 4x4 block of tiles
zTileMaxAltitudeThe tile z-coordinate of the highest tile within each 4x4 block of tiles

Main game loop
--------------

irq1AddressStores the previous value of IRQ1V before we install our custom IRQ handler

Maths (Arithmetic)
------------------

lowNibbleBCDStorage for the low nibble when constructing a BCD seed number in the GetNextSeedAsBCD routine
randomGeneratorA 24-bit random number generator that works independently from the landscape seeds and with a much simpler generation algorithm
shiftGeneratorStorage for randomGenerator(2 1 0) while we shift it left by two places
yStoreNextSeedTemporary storage for Y so it can be preserved through calls to GetNextSeedNumber

Maths (Geometry)
----------------

arctanHiTable for arctan values when calculating yaw angles (high byte)
arctanLoTable for arctan values when calculating yaw angles (low byte)
sinTable for sine values
tanHalfAngleTable for hypotenuse lengths given the tangent of an angle
xStoreMatrixTemporary storage for X so it can be preserved through calls to GetRotationMatrix
yStoreHypotenuseTemporary storage for Y so it can be preserved through calls to GetHypotenuse

Scanner/energy row
------------------

scannerBlockA counter for the eight character blocks that make up the scanner
scannerPixelBytePixel bytes for the three states of the scanner (black, static and green)
scannerStateThe current state of the scanner (black, static or green)
scannerStaticStorage for a random number that's used to generate static in the scanner

Screen buffer
-------------

bufferMaxPitchMaximum allowed pitch angles for points in the screen buffer
bufferMinPitchMinimum allowed pitch angles for points in the screen buffer
bufferRowAddrHiAddress lookup table for character rows in the screen buffer (high byte)
bufferRowAddrLoAddress lookup table for character rows in the screen buffer (low byte)
buffersMinYawMinimum allowed yaw angles for points in the screen buffer
buffersOffsetHiAn offset to add to the address of the right column screen buffer (low byte)
buffersOffsetLoAn offset to add to the address of the right column screen buffer (low byte)
buffersOriginThe offset to add to yaw angles for each screen buffer to convert from the origin in the buffer centre to the origin on the left
ditherOuterLoopA counter for the inner loop when dithering objects to the screen in the DitherScreenBuffer routine
objScreenAddrThe screen address of the object we are updating
screenBufferAddrStorage for the address for the current drawing operation in the screen buffer
screenBufferHiThe value to add to scrollScreenHi for each direction to get the high byte of the screen buffer address of the content to scroll in
screenBufferLoThe value to add to scrollScreenLo for each direction to get the low byte of the screen buffer address of the content to scroll in
screenBufferRow0The screen buffer for character row 0
screenBufferRow1The screen buffer for character row 1
screenBufferRow10The screen buffer for character row 10
screenBufferRow11The screen buffer for character row 11
screenBufferRow12The screen buffer for character row 12
screenBufferRow13The screen buffer for character row 13
screenBufferRow14The screen buffer for character row 14
screenBufferRow15The screen buffer for character row 15
screenBufferRow16The screen buffer for character row 16 (as part of a column buffer)
screenBufferRow17The screen buffer for character row 17 (as part of a column buffer)
screenBufferRow18The screen buffer for character row 18 (as part of a column buffer)
screenBufferRow19The screen buffer for character row 19 (as part of a column buffer)
screenBufferRow2The screen buffer for character row 2
screenBufferRow20The screen buffer for character row 20 (as part of a column buffer)
screenBufferRow21The screen buffer for character row 21 (as part of a column buffer)
screenBufferRow22The screen buffer for character row 22 (as part of a column buffer)
screenBufferRow23The screen buffer for character row 23 (as part of a column buffer)
screenBufferRow3The screen buffer for character row 3
screenBufferRow4The screen buffer for character row 4
screenBufferRow5The screen buffer for character row 5
screenBufferRow6The screen buffer for character row 6
screenBufferRow7The screen buffer for character row 7
screenBufferRow8The screen buffer for character row 8
screenBufferRow9The screen buffer for character row 9
screenRowAddrHiAddress lookup table for character rows in screen memory (high byte)
screenRowAddrLoAddress lookup table for character rows in screen memory (low byte)
scrollScreenHiThe amount to change the start of screen memory in order to scroll the player's landscape view through each direction (high byte)
scrollScreenLoThe amount to change the start of screen memory in order to scroll the player's landscape view through each direction (low byte)
updateOffsetHiThe offset within screen memory for the player's landscape view of the area to update following a scroll (high byte)
updateOffsetLoThe offset within screen memory for the player's landscape view of the area to update following a scroll (low byte)
xBuffersLeftThe left edge of each screen buffer in pixels
xBuffersWidthThe width of each screen buffer in pixels
yawAdjustmentHiThe yaw offset of the left edge of the object being updated, relative to the left edge of the screen, in yaw angles

Sights
------

highestPitchAngleThe pitch angle of the highest point that the player can look at with the sights
lowestPitchAngleThe pitch angle of the lowest point that the player can look at with the sights
sightsByteThe sights pixel byte stash, which contains the screen pixel bytes behind the sights, so they can be restored to remove the sights
sightsByteAddrHiThe screen addresses of the bytes in the sights pixel byte stash, to which they can be restored to remove the sights (high byte)
sightsByteAddrLoThe screen addresses of the bytes in the sights pixel byte stash, to which they can be restored to remove the sights (low byte)
sightsMoveAddrHiThe change to apply to the screen address of the sights when they move into a new character block or row (high byte)
sightsMoveAddrLoThe change to apply to the screen address of the sights when they move into a new character block or row (low byte)
xSightsStepSteps to take along the x-axis when drawing the sights
ySightsStepSteps to take along the y-axis when drawing the sights

Sound
-----

aStoreEnvelopeTemporary storage for use in the DefineEnvelope routine
envelopeDataData for the six sound envelopes
envelopeVolumesA table of offsets into the envelope data for bytes that control the volume of each envelope, so we can change their volume levels
musicDataData for the game's music
soundDataOSWORD blocks for making the various game sounds
soundNumberDataA table to map a sound number (0 to 6) to the sound data block(s) that are used to make the sound
volumeLevelThe volume level, which can be changed by pressing "7" and "8"

Text
----

token0Background colour blue, print "PRESS ANY KEY" at (64, 100), set text background to black
token1Print 13 spaces at (64, 100), print "LANDSCAPE NUMBER?" at (64, 768), switch to text cursor, move text cursor to (5, 27)
token2Background colour blue, print "SECRET ENTRY CODE?" at (64, 768), switch to text cursor, move text cursor to (2, 27)
token3Background colour blue, print "WRONG SECRET CODE" at (64, 768), print "PRESS ANY KEY" at (64, 100), set text background to black
token4Background colour black, print "PRESS ANY KEY" at (192, 64), print "LANDSCAPE" two chars right of (64, 768), move cursor right
token5Text token 5: Print "SECRET ENTRY CODE" at (64, 768), "LANDSCAPE" at (192, 704), move cursor right
token6Text token 6: Print "PRESS ANY KEY" at (64, 100)
token7Text token 7: Move the graphics cursor to (64, 768)
token8Text token 8: Move the graphics cursor to (192, 704)
token9Text token 9: Move the graphics cursor to (192, 64)
token10Text token 10: Configure text to be printed at the graphics cursor and set the background colour to colour 0 (blue)
token11Text token 11: Configure text to be printed at the graphics cursor and set the background colour to colour 1 (black)
token12Text token 12: Move graphics cursor to (64, 100)
token13Text token 13: Print "LANDSCAPE"
token14Text token 14: Print "SECRET ENTRY CODE"
token15Text token 15: Print five spaces
token16Text token 16: Print three spaces
token17Text token 17: Print "PRESS ANY KEY"
tokenOffsetAddress offsets for the text tokens (each offset in the table is the offset of the token from tokenBase)
vduCounterThe number of bytes in a VDU 25, n, x; y; command
vduShadowFrontVDU commands for printing the front character of a drop shadow
vduShadowRearVDU commands for printing the rear character of a drop shadow

Title screen
------------

objBlockNumberA lookup table to convert bit pairs into object numbers for spawning 3D text blocks on the landscape
screenTypeA variable that determines whether we are drawing the title screen or the secret code screen in the DrawTitleScreen routine
textViewerPitchThe pitch angle of the viewer for the large 3D text on the title screen
textViewerYawThe yaw angle of the viewer for the large 3D text on the title screen
titleObjectYawThe yaw angle of an object on the title screen
titleOffsetAn offset to apply to the large 3D text for the title screen
titleTextThe text to draw on the title screen
titleViewerPitchThe pitch angle of the viewer for objects on the title screen
titleViewerYawThe yaw angle of the viewer for objects on the title screen
viewTypeStorage for the type of title view we are drawing in DrawTitleView (title screen or landscape preview)
xTextViewerThe x-coordinate of the viewer for the large 3D text on the title screen
yTextViewerThe y-coordinate of the viewer for the large 3D text on the title screen
yTitleObjectThe y-coordinate of an object on the title screen, as a delta from the y-coordinate of the viewing object
zTextViewerThe z-coordinate of the viewer for the large 3D text on the title screen
zTitleObjectThe z-coordinate of an object on the title screen, as a delta from the z-coordinate of the viewing object

Workspace variables
-------------------

activateSentinel A flag to record when the Sentinel is activated at the start of the game (by the player pressing a key that expends or absorbs energy
aHi The high byte of the adjacent side of a triangle when calculating the hypotenuse
aLo The low byte of the adjacent side of a triangle when calculating the hypotenuse
alteredSeed An altered version of the anti-cracker seed-related data that gets created in AlterCrackerSeed and checked in CheckCreckerSeed as part of the anti-cracker code
angleHi The low byte of an angle
angleLo The high byte of an angle
angleTangent The tangent of an angle in a right-angled triangle
bHi The high byte of the opposite side of a triangle when calculating the hypotenuse
bitMask Used to return a bit mask from the GetTilesAtAltitude routine that has a matching number of leading zeroes as the number of tile blocks at a specific altitude
bitMaskDither A bit mask for use in the DitherScreenBuffer routine that has a matching number of leading zeroes as the size of the screen buffer in bytes
blackDotCounter A counter for black dots that are drawn in the screen decaying routine
blendPolygonEdges A flag to determine whether polygon edges are drawn in the same colour as the polygon fill, thus blending the edges into the polygon body
bLo The low byte of the opposite side of a triangle when calculating the hypotenuse
boulderOnTile A flag to record whether the tile being analysed in the GetTileAltitude routine contains a boulder
bufferColumns The number of character columns in the current screen buffer
bufferMaxYawHi The maximum allowed yaw angle for points in the current screen buffer (high byte)
bufferMinYawHi The minimum allowed yaw angle for points in the current screen buffer (high byte)
bufferMinYawLo The minimum allowed yaw angle for points in the current screen buffer (low byte)
bufferOriginHi The offset to add to yaw angles for the current screen buffer to convert them from having the origin in the buffer centre to having the origin on the left edge of the buffer (high byte)
bufferOriginLo The offset to add to yaw angles for the current screen buffer to convert them from having the origin in the buffer centre to having the origin on the left edge of the buffer (low byte)
bufferWidthBytes The width of the screen buffer in pixel bytes for implementing the dithered effect in DitherScreenBuffer
characterDef An OSWORD block for reading a character definition
columnCounter A counter for the number of columns to fill in the FillScreen routine
considerObjects Controls whether the GetTileAltitude routine takes platform objects into consideration when calculating tile altitudes (bit 7) and returns details about the gaze vector (bit 6)
cosA The result of the cos(A) calculation in the GetSineAndCosine routine
cosAngleHi The high byte of the cosine of a pitch or yaw angle, as calculated by the GetRotationMatrix routine
cosAngleLo The low byte of the cosine of a pitch or yaw angle, as calculated by the GetRotationMatrix routine
cosVectorPitchHi The high byte of cos(vectorPitchAngle) when converting pitch and yaw angles to Cartesian vectors
cosVectorPitchLo The low byte of cos(vectorPitchAngle) when converting pitch and yaw angles to Cartesian vectors
currentObject The number of the object we are currently processing
currentPixelByte The original contents of the screen behind the right edge of the polygon being drawn
ditherInnerLoop A counter for the inner loop when dithering objects to the screen in the DitherScreenBuffer routine
ditherObjectSights Configures how an updated object is drawn onto the screen in the DrawUpdatedObject routine
ditherRandom Storage for a random value in the DitherScreenBuffer routine
ditherStore Temporary storage for use in the DitherScreenBuffer routine
doNotCheckSecret A flag to control whether we perform the secret code check that's buried in the GetRowVisibility routine
doNotDitherObject Controls whether the DitherScreenBuffer routine can update an object on the screen using a dithered effect
doNotDrawSights A flag that controls whether we draw the sights in the DrawSights routine
doNotPlayLandscape A flag that controls whether we preview and play the landscape after generating it
drawingPhase The number of the current drawing phase when drawing two-phase objects:
drawingPhaseCount A phase counter for objects that need to be drawn in multiple phases
drawingTableIndex The index into the drawing tables for the tile being analysed
drawingTableOffset The offset to use within the various drawing data tables for the tile we are analysing
drawingTitleScreen A flag to indicate whether we are currently drawing a title screen in the DrawTitleScreen routine
drawLandscape Configures whether to draw the landscape behind the object in the DrawUpdatedObject routine
drawPolygon A flag to record whether the polygon we are currently processing contains any visible pixels, so it can be used to control whether we actually draw the polygon
drawViewAngles The address in drawViewAngles(1 0) of the pitch and yaw angles of the tile and polygon points that we are drawing in the landscape view
edgeGazeDistance The fractional distance along a tile edge that matches the current position along the gaze vector
enemyCheckingRobot A flag to pass to the FollowGazeVector routine, with bit 7 set if the routine is being called when an enemy is checking to see if it can see a robot object
enemyCounter Used as a loop counter when adding enemies to the landscape
enemyDrainScan Enemy will perform a scan for a drainable object (one
enemyDrainTimer A timer for each enemy that counts down every 0.06
enemyEnergy Enemy energy levels (one byte per enemy)
enemyFailCounter Enemy failed to find meanie: counter (one byte per
enemyFailTarget Enemy failed to find meanie: target object (one byte
enemyMeanieScan Enemy meanie scan object counter (one byte per enemy)
enemyMeanieTree Enemy has turned a tree into a meanie (one byte per
enemyObject The object number of the enemy to which we are applying tactics in this iteration around the main loop (0-7)
enemyRotateTimer A timer for each enemy that counts down every 0.06
enemyTacticTimer A timer for each enemy that counts down every 0.06
enemyTarget The object number of the enemy's target (one byte per
enemyViewingArc The viewing arc of the enemy that is being processed in the ApplyTactics routine
enemyVisibility Visibility of the enemy's target (one byte per enemy)
evenVisibility The visibility of tiles corners in even rows as they are processed by the GetRowVisibility routine
fillRowNumber The number of the character row we are currently filling in the FillScreen routine
focusOnKeyAction A flag that determines whether the game should focus effort on implementing a key action, such as a pan of the landscape view
fromAddr An address, typically used as a source address when copying
G Temporary storage, used in a number of places
G2 Temporary storage, used in the maths routines from Revs, where the original variable name was G (this variable has been renamed to G2 to prevent a clash with the G variable that is used by The Sentinel)
gameInProgress Flags whether or not a game is in progress (i.e. the player is playing a landscape rather than interacting with the title and preview screens)
gameOverSoundPitch A timer for the game over sound
gamePaused A flag to record whether the game is paused
gameplayStack The value of the stack pointer at the start of the ApplyEnemyTactics routine, so we can return back to the ProcessGameplay routine from deep within the tactics routines if required
gazeCanSeeTree A flag to record whether the gaze vector can see a tree:
gazeCheckCounter A counter for the number of checks that are performed when following an enemy's gaze in CheckEnemyGaze
H Temporary storage, used in the maths routines
H2 Temporary storage, used in the maths routines from Revs, where the original variable name was H (this variable has been renamed to H2 to prevent a clash with the H variable that is used by The Sentinel)
horizontalEdges A counter to keep track of how many polygon edges are horizontal in the polygon we are drawing
hyperspaceEndsGame Records whether the player performing a hyperspace has just ended the game
hypotenuseHi The high byte of the hypotenuse of a triangle
hypotenuseLo The low byte of the hypotenuse of a triangle
iconRowAddr The screen address of the icon and scanner row along the top of the screen
inputBuffer The eight-byte keyboard input buffer
J Temporary storage, used in the maths routines from Revs
keepCheckingPanKey Controls whether the DrawLandscapeView routine aborts drawing if the pan key is released before it has finished
keyLogger The four-byte key logger for logging game key presses
keyPress The key logger value for a key press
landscapeNumberHi The high byte of the four-digit binary coded decimal landscape number (0000 to 9999)
landscapeNumberLo The low byte of the four-digit binary coded decimal landscape number (0000 to 9999)
landscapeZero A flag that is set depending on whether we are playing landscape 0000
lastPanKeyPressed The direction of the last pan key that was pressed (which may not still be held down)
lastScannerState The state of the scanner the last time that it was updated:
latestPanKeyPress The key logger value of the latest pan key press, which will either be a current key press or the value from the last pan key press to be made
loopCounter A general-purpose loop counter
maxNumberOfEnemies The maximum number of enemies that can appear on the current landscape, which is calculated as follows:
maxPitchAngle The maximum pitch angle that fits into the current screen buffer
meanieYawStep The yaw angle through which we rotate a meanie as it searches for the player in the ApplyTactics routine
minEnemyAltitude The altitude of the lowest enemy on the landscape
minObjWidth The on-screen width to use when updating objects
minPitchAngle The minimum pitch angle that fits into the current screen buffer
moreColumnsToFill Stores the number of extra columns we need to fill in the FillScreen routine after filling up to 32 columns
musicCounter A counter for the music currently being made, which counts up in the ProcessMusic routine while the music is being played
noteCounter The sound counter for an individual note while playing chords in the music player
numberOfEnemies The number of enemies in the current landscape, including the Sentinel (in the range 1 to 8)
numberOfScrolls The total number of scrolls that we need to perform for the current panning operation
objectAdjacentHi The distance of an object from the viewer, expressed as the length of the adjacent side in a triangle with the vector from the viewer to the object as the hypotenuse (high byte)
objectAdjacentLo The distance of an object from the viewer, expressed as the length of the adjacent side in a triangle with the vector from the viewer to the object as the hypotenuse (low byte)
objectFlags Object flags for up to 64 objects
objectGazeYawHi The difference in the yaw angle of the viewer's gaze and the yaw angle (i.e. the gaze) of the object being analysed (low byte)
objectGazeYawLo The difference in the yaw angle of the viewer's gaze and the yaw angle (i.e. the gaze) of the object being analysed (low byte)
objectLastPoint The number of the last point in the object being drawn
objectLastPolygon The number of the last polygon in the object being drawn
objectOppositeHi The height of an object relative to the viewer, expressed as the length of the opposite side in a triangle with the vector from the viewer to the object as the hypotenuse (high byte)
objectOppositeLo The height of an object relative to the viewer, expressed as the length of the opposite side in a triangle with the vector from the viewer to the object as the hypotenuse (low byte)
objectPitchAngle The pitch angle for each object (i.e. the vertical direction in which they are facing)
objectStackCounter A counter for the objects in an object stack, for use when drawing the stack
objectToAnalyse The number of the object to analyse in the GetObjectAngles routine
objectType The type of object that we are spawning
objectViewYawHi The yaw angle of the object being analysed, relative to the current viewer (high byte)
objectViewYawLo The yaw angle of the object being analysed, relative to the current viewer (low byte)
objTypeToAnalyse The type of the object being analysed in the GetObjectAngles routine
objYawOffset The yaw offset of the left edge of the object being analysed in GetObjVisibility, relative to the left edge of the screen, in on-screen character columns
objYawWidth The width of the visible portion of the object being analysed in GetObjVisibility, in on-screen character columns
oddVisibility The visibility of tiles corners in odd rows as they are processed by the GetRowVisibility routine
P Temporary storage, used in a number of places
panKeyBeingPressed The direction in which the player is currently panning
pitchDeltaHi The delta between two pitch angles (high byte)
pitchDeltaLo The delta between two pitch angles (low byte)
pixelByteToDither A random pixel byte in a character row in the screen buffer to use when dithering an object to the screen
playerEnergy The player's energy level (in the range 0 to 63)
playerHasMovedTile A flag to record whether the player has moved to a new tile by transferring or hyperspacing, so we can decide whether to regenerate the player's landscape view
playerIsOnTower A flag to record whether the player is on top of the the Sentinel's tower
playerObject The number of the player object
playerTileIsHidden A flag that records when the player is being scanned but the player's tile is hidden from the Sentinel or sentry doing the scan
playerTileObscured Records when an enemy can see the player object but can't see the tile that the player is on
pointNumber A counter for the point number as we work through the points in an object when calculating the point's angles
pointX Temporary storage for the number of point #X while processing polygon lines
polygonColours The colours of the polygon that's being drawn in the DrawPolygon routine
polygonEdge The number the side of the polygon that we are currently processing
polygonEdgeCount The number of sides in the polygon we are drawing, which is one less than the number of points in the polygon's point list (as the last point in the list is always a repeat of the first point)
polygonFillPixels A pixel byte containing four pixels set to the fill colour for the polygon we are drawing
polygonGoesLeft A flag to record whether the polygon we are drawing extends to the left of the screen buffer we are drawing in
polygonGoesRight A flag to record whether the polygon we are drawing extends to the right of the screen buffer we are drawing in
polygonNumber A counter for the polygon number as we work through the polygons in an object when drawing the object
polygonPoint Up to five coordinates for the points of the polygon being drawn
polygonType Bits 6 and 7 determine the type of polygon to draw in the DrawPolygon routine (the calling subroutine is in brackets)
PP Temporary storage, used in the maths routines
previousFocus The previous setting of focusOnKeyAction, so we can detect (in the ProcessGameplay routine) whether the player is still holding down a pan key after we finish scrolling the screen for the previous pan
printTextIn3D Controls whether we are printing text normally or in 3D (as in the game's title on the title screen)
processAction Defines the following:
Q Temporary storage, used in a number of places
QQ Temporary storage, used in the maths routines
quadrantOffset The offset into the drawing tables for the quadrant containing the right edge of the viewing arc
quitGame A flag to record whether the player has pressed function key f1 to quit the game
R Temporary storage, used in a number of places
randomPixel Storage for a random value in the DrawRandomDots routine to use as a random pixel number when drawing dots
RR Temporary storage, used in the maths routines
S Temporary storage, used in a number of places
samePanKeyPress Records whether the same pan key is being held down after we have just finished panning the landscape view
scaleFactor The scale factor for the x-axis and y-axis deltas when fitting them into single-byte numbers during the tracing of polygon edges
scannerUpdate A flag to control whether the scanner gets updated:
screenAddr Storage for a screen address
screenAddrHi The high byte of the screen memory address in the ScrollPlayerView routine
screenBackground The type of screen background when clearing the screen
screenBufferType The type of screen buffer that is currently being used
screenLeftYawHi The high byte of the yaw angle of the left edge of the screen, reduced into the range of a single 90-degree quadrant (so it's relative to the 90-degree viewing arc)
screenOrBuffer Controls whether the graphics routines draw directly onto the screen, or into the screen buffer
screenRowCounter A counter for filling screen rows in the FillScreen routine
scrollCounter A counter for the number of columns or rows we still need to scroll in the player's scrolling landscape view when the player pans
secondAxis The number of the second axis to calculate in the GetRotationMatrix routine
secretCodeChecks Bits 1 to 4 store the results of checking each of the four two-digit numbers in a landscape's secret entry code
seedNumberLFSR A five-byte linear feedback shift register for
sentinelHasWon A flag to record when the player runs out of energy (i.e. the energy level goes negative), at which point the Sentinel wins
sightsAreVisible Controls whether the sights are being shown
sightsByteAddr Storage for an address that loops through the pixel bytes in screen memory where the sights appear, so the sights can be drawn and removed using the contents of the sights pixel byte stash
sightsByteCount The number of screen bytes in the sights pixel byte stash that contain the contents of the screen behind the sights (so they can be restored to remove the sights)
sightsInitialMoves Controls the initial movement of the sights over the first eight calls to the CheckForKeyPresses routine
sightsScreenAddr The screen address of the sights
sinA The result of the sin(A) calculation in the GetSineAndCosine routine
sinAngleHi The high byte of the sine of a pitch or yaw angle, as calculated by the GetRotationMatrix routine
sinAngleLo The low byte of the sine of a pitch or yaw angle, as calculated by the GetRotationMatrix routine
smoothingAction The action that's applied to tile data by the SmoothTileData routine
soundCounter A counter for the sound currently being made, which counts down in the IRQHandler routine at a rate of 50 times a second
soundEffect Determines how the current sound is processed by the ProcessSound routine
SS Temporary storage, used in the maths routines
stashAddr The address of the four bytes in the secretCodeStash that correspond to the landscape's secret code
stashOffset The offset into the secretCodeStash where we store a set of generated values for later checking in the GetRowVisibility routine
T Temporary storage, used in a number of places
targetObject The number of the object that is being targeted in the DrainObjectEnergy routine
targetOnTile A flag to record whether the tile being analysed in the GetTileAltitude routine contains the target object whose number is in targetObject
targetVisibility Reports whether a target object is visible from an enemy in the CheckEnemyGaze routine
textDropShadow Controls whether text in text tokens is printed with a drop shadow
tileAltitude The altitude of the tile that we are currently processing
tileDataMultiplier A multiplier that we apply to the altitudes of the tile corners to alter the steepness of the landscape during landscape generation
tileDataPage The address of the tileData page containing the current tile's data
tileIsOnScreen Information on whether a tile is fully on-screen, partially on-screen or fully off-screen
tileShapeOffset The tile shape we are drawing, amended to use as an offset into the tileShapeColour table
tileViewData The tile data for tiles in the current landscape view
titleObjectToDraw The object we are drawing in the DrawTitleView routine
toAddr An address, typically used as a destination address when copying
topObjectOnStack The number of the object on the top of an object stack
traceStepCounter The number of steps in the ray-tracing process when calculating tile visibility in the GetRowVisibility routine
treeCounter A counter for the number of trees that are added to the landscape in the SpawnTrees routine
treeVisibility Reports whether a gaze is interrupted by a tree in the CheckEnemyGaze routine
triangleStartPoint The number of the starting point for the tile shape being drawn
U Temporary storage, used in a number of places
updateTimer A counter that ensures the enemy timers are updated on one of every three calls to the interrupt handler
uTurnStatus A flag to record whether we are performing or have just performed a U-turn
V Temporary storage, used in a number of places
vectorPitchAngleHi The pitch angle of a vector (high byte)
vectorPitchAngleLo The pitch angle of a vector (low byte)
vectorYawAngleHi The yaw angle of a vector (high byte)
vectorYawAngleLo The yaw angle of a vector (low byte)
viewingArcRightYaw The yaw angle of the right edge of the viewing arc, where the arc is 90 degrees wide
viewingObject The number of the viewing object
viewingQuadrantOpp The opposite quadrant number to that containing the right edge of the viewing arc
viewingQuadrantx4 The quadrant number containing the right edge of the viewing arc, multiplied by 4, for use when calculating the number of faces in a tile in DrawSlopingTile
viewScreenAddr The screen address of the player's scrolling landscape view, which is just below the icon and scanner row at the top of the screen
W Temporary storage, used in a number of places
xBlock The tile x-coordinate of the tile we are analysing when calculating the highest tile in a block
xBufferLeft The left edge of the screen buffer in pixels
xBufferRight The right edge of the screen buffer in pixels
xBufferWidth The width in pixels of the screen buffer
xCoordBot The x-coordinate of an object or point (bottom byte)
xCoordHi The x-coordinate of an object or point (high byte)
xCoordLo The x-coordinate of an object or point (low byte)
xCounter A counter to iterate along tiles in the x-axis
xDeltaAbsoluteHi The absolute difference between two x-coordinates (high byte), i.e. |xDeltaHi|
xDeltaHi The difference between two x-coordinates (high byte)
xDeltaLo The difference between two x-coordinates (low byte)
xEdgeDelta The scaled and signed x-axis delta between two polygon points when tracing the polygon edges (single byte)
xEdgeDeltaHi The high byte of the scaled and signed x-axis delta between two polygon points when tracing the polygon edges
xEdgeDeltaLo The low byte of the scaled and signed x-axis delta between two polygon points when tracing the polygon edges
xEdgeEndHi The x-coordinate of the end point in the polygon edge being processed (high byte)
xEdgeEndLo The x-coordinate of the end point in the polygon edge being processed (low byte)
xEdgeStartHi The x-coordinate of the start point in the polygon edge being processed (high byte)
xEdgeStartLo The x-coordinate of the start point in the polygon edge being processed (low byte)
xIconCounter A counter for drawing the icons in the top-left of the screen that show the player's energy level, as we work from left to right along the x-axis
xMaxHorizontal A variable to keep track of the maximum x-coordinates of any polygon edges that are horizontal in the polygon we are drawing
xMinHorizontal A variable to keep track of the minimum x-coordinates of any polygon edges that are horizontal in the polygon we are drawing
xPointDeltaHi Temporary storage for the high byte of the x-axis delta between two polygon points
xPolygonAddrHi The high byte of the address of the table where we store the x-coordinate of the polygon line being processed, so this is either HI(xPolygonLeft) or HI(xPolygonRight)
xPolygonPointScale A flag to record whether the pixel x-coordinate of the polygon points being processed fit into one or two bytes
xPolygonRightEdge The screen x-coordinate of the right edge of the polygon being drawn
xSights The pixel x-coordinate of the sights on-screen
xSightsBrush The x-coordinate of the "brush" that we use to draw the sights, relative to the top-left corner of the character block containing the top of the sights
xTile Tile corner x-coordinate
xTileCharacter The tile x-coordinate of the character being spawned in large 3D blocks on the landscape for the title screen
xTileLeftPrevious The previous value of xTileViewLeft
xTileRow The tile x-coordinate of the tile we are analysing in the GetRowVisibility routine
xTileSentinel The tile x-coordinate of the Sentinel
xTileToDraw The column number of the tile we are currently drawing
xTileViewer The tile x-coordinate of the viewer, but with the axes rotated to match the orientation of the viewer, so we can draw the landscape along the line of sight, towards the viewer's tile
xTileViewLeft The tile number at the left edge of the tile row we are currently processing when drawing the landscape
xTileViewLeftEdge The tile number at the left edge of the visible portion of the row we are currently processing when drawing the landscape
xTileViewRight The tile number at the right edge of the tile row we are currently processing when drawing the landscape
xTileViewRightEdge The tile number at the right edge of the visible portion of the row we are currently processing when drawing the landscape
xTitleOffset An x-coordinate offset for drawing the title screen this is zero during gameplay)
xVectorBot The x-coordinate of a vector (bottom byte)
xVectorHi The x-coordinate of a vector (high byte)
xVectorLo The x-coordinate of a vector (low byte)
yAccuracyLo The vertical accuracy for considering a tile as being seen by the viewer, as a fractional part
yawAdjustmentLo A yaw adjustment to apply to the landscape drawing process so that when we update objects on-screen, we can yaw the viewer's gaze to the right to move the left edge of the object to the left edge of the screen so the object will fit into the screen buffer as efficiently as possible (low byte)
yCoordBot The y-coordinate of an object or point (bottom byte)
yCoordHi The y-coordinate of an object or point (high byte)
yCoordLo The y-coordinate of an object or point (low byte)
yDeltaHi The difference between two y-coordinates (high byte)
yDeltaLo The difference between two y-coordinates (low byte)
yEdgeDeltaHi The difference in pitch angle between two polygon points, i.e. the delta along the y-axis (high byte)
yEdgeDeltaLo The difference in pitch angle between two polygon points, i.e. the delta along the y-axis (low byte)
yEdgeEndHi The y-coordinate of the end point in the polygon edge being processed (high byte)
yEdgeEndLo The y-coordinate of the end point in the polygon edge being processed (low byte)
yEdgeStartHi The y-coordinate of the start point in the polygon edge being processed (high byte)
yEdgeStartLo The y-coordinate of the start point in the polygon edge being processed (low byte)
yPlatformLo The low byte of the altitude of the Sentinel's tower or boulder when returning tile data from the GetTileAltitude routine
yPolygonBottom The y-coordinate of the bottom of the polygon being drawn (where higher y-coordinates are up the screen)
yPolygonLine The polygon y-coordinate of the pixel line being drawn in the DrawPolygonLines routine
yPolygonTop The y-coordinate of the top of the polygon being drawn (where higher y-coordinates are up the screen)
ySights The pixel y-coordinate of the sights on-screen
yStoreTileView Temporary storage for Y so it can be preserved through calls to GetTileViewAngles
yTileRow The tile y-coordinate of the tile we are analysing in the GetRowVisibility routine
yVectorBot The y-coordinate of a vector (bottom byte)
yVectorHi The y-coordinate of a vector (high byte)
yVectorLo The y-coordinate of a vector (low byte)
zBlock The tile z-coordinate of the tile we are analysing when calculating the highest tile in a block
zCoordBot The z-coordinate of an object or point (bottom byte)
zCoordHi The z-coordinate of an object or point (high byte)
zCoordLo The z-coordinate of an object or point (low byte)
zCounter A counter to iterate along tiles in the z-axis
zDeltaAbsoluteHi The absolute difference between two z-coordinates (high byte), i.e. |zDeltaHi|
zDeltaHi The difference between two z-coordinates (high byte)
zDeltaLo The difference between two z-coordinates (low byte)
zTile Tile corner z-coordinate
zTileCharacter The tile z-coordinate of the character being spawned in large 3D blocks on the landscape for the title screen
zTileRow The tile z-coordinate of the tile we are analysing in the GetRowVisibility routine
zTileSentinel The tile z-coordinate of the Sentinel
zTileViewer The tile z-coordinate of the viewer, but with the axes rotated to match the orientation of the viewer, so we can draw the landscape along the line of sight, towards the viewer's tile
zVectorBot The z-coordinate of a vector (bottom byte)
zVectorHi The z-coordinate of a vector (high byte)
zVectorLo The z-coordinate of a vector (low byte)