.ResetLineLists LDA #%10000000 \ Set colourLogic = %10000000 STA colourLogic LDA #%00001111 \ Set colourCycle = %00001111, so we show colour 1 and STA colourCycle \ hide colour 2 in the canopy view JSR ModifyDrawRoutine \ Modify the drawing routines so we draw canopy lines in \ colour 1 (as colourLogic = %10000000) LDA #0 \ Set lineId = 0 to act as a loop counter below STA lineId STA linesToShowEnd \ Set linesToShowEnd = 0 to reset the linesToShow list LDA #255 \ Set linesToHideEnd = 255 to reset the linesToHide list STA linesToHideEnd STA linesToShowPointer \ Set linesToShowPointer = 255 to reset the progress \ pointer for the linesToShow list STA linesToHidePointer \ Set linesToHidePointer = 255 to reset the progress \ pointer for the linesToHide list .rell1 JSR ShowOrHideLine \ Process the line with ID lineId, adding it to either \ the linesToShow or the linesToHide list INC lineId \ Increment lineId to move on to the next line LDA lineId \ Loop back until we have processed all 193 lines CMP numberOfLines BCC rell1 LDX #3 \ Set logical colour 3 to white so the dashboard display JSR SetColourToWhite \ shows up in white \ Fall through into FlipColours to flip the values of \ colourCycle and colourLogic to cycle to the next \ colour state, so we end up with drawing routines that \ draw in colour 1, while colourLogic = %01000000 and \ colourCycle = %11110000Name: ResetLineLists [Show more] Type: Subroutine Category: Visibility Summary: Reset the line lists at linesToShow and linesToHideContext: See this subroutine in context in the source code References: This subroutine is called as follows: * NewGame calls ResetLineLists
[X]
Subroutine ModifyDrawRoutine (category: Drawing lines)
Modify the drawing routines to draw in the correct colour for the current colour cycle
[X]
Subroutine SetColourToWhite (category: Graphics)
Set a logical colour to white
[X]
Subroutine ShowOrHideLine (category: Visibility)
Process a line, working out its visibility and adding it to the linesToShow or linesToHide list
[X]
Variable colourCycle in workspace Main variable workspace
Determines which of the two canopy screens we are showing, so we can use colour cycling for smooth animation
[X]
Variable colourLogic in workspace Main variable workspace
Determines the logic and bit patterns used to draw the canopy view
[X]
Variable linesToHideEnd in workspace Zero page
The index of the last entry in the linesToHide list
[X]
Variable linesToHidePointer in workspace Zero page
A pointer into the linesToHide list to keep track of where we have processed up to
[X]
Variable linesToShowEnd in workspace Zero page
The index of the first empty entry in the linesToShow list
[X]
Variable linesToShowPointer in workspace Zero page
A pointer into the linesToShow list to keep track of where we have processed up to
[X]
Variable numberOfLines (category: 3D geometry)
The total number of lines in Aviator's 3D world
[X]
Label rell1 is local to this routine