Skip to navigation

Aviator on the BBC Micro

Visibility: ResetLineLists

Name: ResetLineLists [Show more] Type: Subroutine Category: Visibility Summary: Reset the line lists at linesToShow and linesToHide
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * NewGame calls ResetLineLists
.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 = %11110000