Skip to navigation

Revs on the BBC Micro

Drawing objects: DrawCarInPosition

Name: DrawCarInPosition [Show more] Type: Subroutine Category: Drawing objects Summary: Draw the car in a specified race position
Context: 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
.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 X