.MovePlayerBack SEC \ Set the C flag so the call to MovePlayer moves the \ player's car in the opposite direction to which it is \ pointing JSR MovePlayer \ Drive the player's car backwards by one track segment LDX #40 \ Set X = 40, so the call to TurnPlayerAround \ initialises 64 track segments in the new direction STX resetSectionList \ Set resetSectionList to a non-zero value, so if the \ calls to TurnPlayerAround need to fetch load a new \ track section, then we reset the track section list JSR TurnPlayerAround \ Turn the player around and initialise 40 track \ segments in the new direction LDX #39 \ Set X = 39, so the call to TurnPlayerAround \ initialises 64 track segments in the new direction JSR TurnPlayerAround \ Turn the player back around and initialise 39 track \ segments in the new direction LDA #0 \ Set resetSectionList = 0, so future calls to the STA resetSectionList \ TurnPlayerAround routine will update the track section \ list as normal RTS \ Return from the subroutineName: MovePlayerBack [Show more] Type: Subroutine Category: Car geometry Summary: Move the player's car backwards by one track segment and update the track segment bufferContext: See this subroutine in context in the source code References: This subroutine is called as follows: * MovePlayerSegment calls MovePlayerBack
This routine reverses the player, updating the track segment buffer in both directions.
[X]
Subroutine MovePlayer (category: Car geometry)
Move the player's car forwards or backwards by one segment
[X]
Subroutine TurnPlayerAround (category: Car geometry)
Turn the player around and initialise the specified number of track segments in the new direction
[X]
Variable resetSectionList in workspace Zero page
Controls whether to reset the contents of the track section list