.DrawCarInPosition STX xStoreDraw \ Store X in xStoreDraw so it can be retrieved at the \ end of the DrawCarOrSign routine LDA driversInOrder,X \ Set X to the number of the driver in position X TAX \ Fall through into DrawCarOrSign to draw the car whose \ driver number we just looked up, i.e. the car in \ position XName: DrawCarInPosition [Show more] Type: Subroutine Category: Drawing objects Summary: Draw the car in a specified race positionContext: See this subroutine in context in the source code References: This subroutine is called as follows: * DrawCars calls DrawCarInPosition
Arguments: X The race position of the car to draw
Returns: X X is preserved
[X]
Variable driversInOrder in workspace Stack variables
A list of driver numbers in order
[X]
Variable xStoreDraw in workspace Zero page
Temporary storage for X so it can be preserved through calls to DrawCarInPosition, DrawCarOrSign and DrawSegmentEdge