.dver28 LDA vergeOnScreenEdge \ If bit 7 of vergeOnScreenEdge is set then the edge we BMI dver29 \ are drawing is partially off-screen, so jump to dver29 \ to skip the following \ If we get here then the edge we are drawing is wholly \ on-screen, so we can store the edge's angles in M and \ N to be picked up in the next call to DrawSegmentEdge LDA W \ Set M = W, so we pass on 128 + yaw angle * 4 STA M LDA RR \ Set N = RR, so we pass on the pitch angle STA N .dver29 LDX thisYawIndex \ Set X to the original yaw angle index that we stored \ above, so X is preserved through calls to the routine LDY thisPitchIndex \ Set Y to the original pitch angle index that we stored \ above, so Y is preserved through calls to the routine RTS \ Return from the subroutine EQUB &A5, &53 \ These bytes appear to be unused EQUB &F0, &EB EQUB &20, &12 EQUB &2F, &4C EQUB &FC, &2CName: DrawSegmentEdge (Part 7 of 7) [Show more] Type: Subroutine Category: Drawing the track Summary: Save the angles for the next call to DrawSegmentEdge and return from the subroutine Deep dive: Drawing the track vergesContext: See this subroutine in context in the source code References: No direct references to this subroutine in this source file
This part gets things ready for the next call to DrawSegmentEdge, when we draw the next segment's verge edge, and returns from the subroutine.
[X]
Label dver29 is local to this routine
[X]
Variable thisPitchIndex in workspace Zero page
The index of the pitch angle in the track segment list for the verge we are processing
[X]
Variable thisYawIndex in workspace Zero page
The index of the yaw angle in the track segment list for the verge we are processing
[X]
Variable vergeOnScreenEdge in workspace Zero page
Determines whether the verge edge we are drawing for the current segment is partially off-screen