.DOT LDA COMC ; If COMC = 0 then jump to COR1 to return from the BEQ COR1 ; subroutine without drawing a dot, as COR1 contains ; an RTS STA ZZ ; Set ZZ = A, so ZZ is $30 or $60, which can be passed ; to the PIXEL routine as a "distance" so the first ; value of $30 draws a large ("close") dot for when the ; compass item is behind, while the second value of $60 ; draws a small ("faraway") dot for when it is in front ; ; This is the opposite way around to the other versions, ; which have a larger compass dot when the item is in ; front LDA COMY ; Set A = COMY, the y-coordinate of the dash LDX COMX ; Set X = COMX, the x-coordinate of the dash JMP PIXEL ; Call the PIXEL routine to draw a large or small white ; dot on the compass, returning from the subroutine ; using a tail callName: DOT [Show more] Type: Subroutine Category: Dashboard Summary: Draw a dash on the compassContext: See this subroutine in context in the source code References: This subroutine is called as follows: * COMPAS calls DOT
Arguments: COMX The screen pixel x-coordinate of the dash COMY The screen pixel y-coordinate of the dash COMC The thickness of the dash (this is the opposite way around to the other versions, which have a larger compass dot when the item is in front): * 0 = do not draw a dot on the compass * $30 = a double-height dash in white, for when the object in the compass is behind us * $60 = a single-height dash in white, for when the object in the compass is in front of us
[X]
Variable COMC in workspace Option variables
The shape (i.e. thickness) of the dot on the compass
[X]
Subroutine PIXEL (category: Drawing pixels)
Draw a two-pixel dash, three-pixel dash or double-height three-pixel dash