.ProcessRunwayLine LDA objectStatus+1 \ Fetch the status byte for object 1, the runway object BEQ prun3 \ If object 1's status byte is zero, then we have not \ yet calculated the runway object's coordinates and \ visibility, so jump to prun3 to do this BMI prun1 \ If bit 7 of object 1's status byte is set, then we \ have already decided that the runway object is \ visible, so jump to prun1 to set the line's visibility \ accordingly JMP prun9 \ If we get here then we have already decided that the \ runway object is hidden, so jump to prun9 to set the \ line's visibility as hidden .prun1 LDA lineId \ If lineId < 5, then the line ID is in the range 1 to CMP #5 \ 4, so it's part of the runway outline, so jump to BCC prun2 \ prun2 to return from the subroutine as we always show \ the outline when the runway is visible LDA showRunwayDashes \ The line we are checking is one of the dashes down the STA showLine \ middle of the runway, so set the line's visibility to \ the value of showRunwayDashes, which contains the \ visibility of the runway dashes .prun2 RTS \ Return from the subroutineName: ProcessRunwayLine (Part 1 of 5) [Show more] Type: Subroutine Category: Visibility Summary: Calculate coordinates and visibility for a runway line Deep dive: Visibility checksContext: See this subroutine in context in the source code References: This subroutine is called as follows: * ProcessLine (Part 2 of 7) calls ProcessRunwayLine
Arguments: lineId The line ID to process (1 to 11): * 1 to 4 are the runway outline * 5 to 11 are the dashes down the middle of the runway
Returns: showLine Whether this line is visible: * 0 = line is visible * Non-zero = line is not visible
[X]
Variable objectStatus in workspace Main variable workspace
Each object's status byte
[X]
Label prun1 is local to this routine
[X]
Label prun2 is local to this routine
[X]
Label prun3 in subroutine ProcessRunwayLine (Part 2 of 5)
[X]
Label prun9 in subroutine ProcessRunwayLine (Part 3 of 5)
[X]
Variable showLine in workspace Main variable workspace
Determines whether a line is visible
[X]
Variable showRunwayDashes in workspace Main variable workspace
Determines whether the dashes down the middle of the runway are close enough to be visible