IF _SUPERIOR OR _REVSPLUS .SetPlayerDriftSup BCC drif1 \ If the C flag is clear, jump to drif1 to skip the \ following LDA objSectionSegmt,X \ Set A = objSectionSegmt, which keeps track of the \ player's segment number in the current track section CMP #3 \ If A < 3, clear the C flag, if A >= 3, set the C \ flag .drif1 ROR playerDrift \ Store the C flag in bit 7 of playerDrift, so this will \ be set if the original A >= 22 and if the second \ A >= 3 RTS \ Return from the subroutine NOP \ This instruction is unused, and is included to pad out \ the code ENDIFName: SetPlayerDriftSup [Show more] Type: Subroutine Category: Car geometry Summary: Record player drift, but only if the player is not in the first three segments of a track sectionContext: See this subroutine in context in the source code References: This subroutine is called as follows: * MovePlayerOnTrack calls SetPlayerDriftSup
This routine is only present in the Superior Software release. In the Acornsoft release, this routine consists of a single ROR playerDrift instruction, so the Superior Software version differs as follows: * Acornsoft sets the playerDrift flag if A >= 22 * Superior sets the playerDrift flag if A >= 22 and objSectionSegmt for the player is >= 3 So the Superior version does not record drift in the first three segments of a new track section.
[X]
Label drif1 is local to this routine
[X]
Variable objSectionSegmt in workspace Main variable workspace
Each object's segment number within the current track section, counting from the start of the section
[X]
Variable playerDrift (category: Driving model)
Records whether the player's car is moving sideways by a significant amount