Skip to navigation


Screen buffer: DrawTrackLine (Part 2 of 2)

Name: DrawTrackLine (Part 2 of 2) [Show more] Type: Subroutine Category: Screen buffer Summary: Draw a pixel line across the screen in the track view Deep dive: Drawing around the dashboard Drawing the track view
Context: See this subroutine in context in the source code References: No direct references to this subroutine in this source file
.prow2 \ At this point, X contains the offset within the dash \ data of the pixel line to be drawn across the screen LDA backgroundColour,X \ Fetch the colour of the first byte on the line from AND #%00000011 \ the X-th entry in backgroundColour (bits 0 to 2) TAY LDA colourPalette,Y \ Set A to logical colour Y from the colour palette, \ to use as the first byte on the line \ Fall through into DrawTrackBytes to draw the pixel \ bytes that make up the line we want to draw \ \ If we are drawing the lines above the top of the \ dashboard, then the following then loops back to the \ start of the DrawTrackLine routine to keep drawing \ lines until we do reach the top of the dashboard, at \ which point we return from the DrawTrackLine routine \ to part 2 of DrawTrackView, which modifies the code to \ draw subsequent lines around the shape of the \ dashboard