Skip to navigation

To-do list

I have documented every byte of The Sentinel game code, but that doesn't mean that I've fully understood every byte (though it's close). Almost every single aspect of the code is explained, but there are a few issues that could benefit from another look.

This page lists all of the outstanding issues of which I am aware. These are the notes I made as I analysed the source, so they are fairly terse and might not be terribly clear.

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

  • SetScannerAndPause: Why the pause? This whole routine seems to have been patched into the code as an afterthought

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

  • quadrantOffset: Explain what this is used for
  • viewingQuadrantOpp: Explain what this is used for
  • DrawLandscapeView (Part 1 of 3): Explain uses of quadrantOffset and viewingQuadrantOpp
  • DrawLandscapeView (Part 3 of 3): Why does comparing drawViewPitchHi to 2 (after dlan21) mean that we're off-screen?
  • GetTileViewEdges: Does the logic in this routine make sense? Is my analysis of buffersMinYaw/bufferMinYaw(Hi Lo) incorrect, and therefore the bits in tileIsOnScreen are incorrectly documented in GetTileViewAngles?
  • DrawTileAndObjects: Explain uses of quadrantOffset, viewingQuadrantOpp and triangleStartPoint
  • DrawSlopingTile: Explain triangleStart/triangleStartPoint, and the adding of 16 to A
  • DrawTwoFaceTile: Explain the triangleStartPoint and A arguments that are passed from DrawSlopingTile

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

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

  • GetAngleFromCoords (Part 1 of 3), (Part 2 of 3): Explain the early abort of shift-and-subtract (the BEQ gang10 at gang6) and what this does to bit 5 of the result (the ADC #%00100000 before gang9 and the ORA #%00100000 at the end of part 2)
  • GetSightsVector: Improve pixel-to-angle commentary, explain pitch angle addition of (3 32)
  • GetHypotenuseAngle: Why zero bits 0 and 1 of xDeltaLo to store in W? Explain the quadrant sign changes for the angle around ghyp6 and ghyp10
  • GetPitchAngleDelta: Why the 32 in (objectPitchAngle 32)? Explain division by 16

Gameplay
--------

  • ScanForMeanieTree: Why set minObjWidth = 104 (just before mean5) when morphing a tree to a meanie? Half widths for each are 114 to 74
  • DrainObjectEnergy: Why set minObjWidth = 116 (at dobj4) when morphing a boulder to tree? Half widths for each are 122 to 144

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