.IndicatorF LDA forceFactor+5 \ Set A to the force factor for zLiftDrag LDY flapsStatus \ If flapsStatus is non-zero then the flaps are on, so BNE indf1 \ jump to indf1 \ If we get here then the flaps are off SEC \ Set A = A - 200 SBC #200 \ \ so having the flaps off reduces drag LDX #0 \ Set X = 0 to use as the force factor for yFlapsLift \ below LDY #%01000100 \ Set Y to a four-pixel block with pixel 2 in white, to \ act as the centre of the flaps indicator when turned \ off BNE indf2 \ Jump to indf2 to update the indicator (this BNE is \ effectively a JMP as Y is never zero) .indf1 \ If we get here then the flaps are on CLC \ Set A = A + 200 ADC #200 \ \ so having the flaps on increases drag LDX #152 \ Set X = 152 to use as the force factor for yFlapsLift \ below LDY #%11001100 \ Set Y to a four-pixel block with pixels 1 and 2 in \ white, to act as the centre of the flaps indicator \ when turned on .indf2 STA forceFactor+5 \ Store A in the force factor for zLiftDrag, so it is \ incremented by 200 when the flaps are on, and reduced \ by 200 when the flaps are off, i.e. having the flaps \ on increases drag STX forceFactor+7 \ Store X in the force factor for yFlapsLift, so it is 0 \ if the flaps are off and 152 if they are on, i.e. \ having the flaps on increases the vertical lift TYA \ Set A to the pixel pattern in Y LDX #2 \ Set X = 2 to use as a pixel row counter for the three \ pixel rows in the flaps indicator .indf3 STA row30_char35_2,X \ Update pixel row X of the flaps indicator to the pixel \ pattern in A DEX \ Decrement the byte counter to the pixel row above BPL indf3 \ Loop back to update the next row of the indicator RTS \ Return from the subroutineName: IndicatorF [Show more] Type: Subroutine Category: Dashboard Summary: Update the flaps indicator ("F") and related variablesContext: See this subroutine in context in the source code References: This subroutine is called as follows: * NewGame calls IndicatorF * RetractFlapsIfFast calls IndicatorF * UpdateFlightModel (Part 3 of 4) calls IndicatorF
[X]
Variable flapsStatus in workspace Main variable workspace
Flaps status
[X]
Variable forceFactor (category: Flight model)
The factors by which the flight forces are multiplied as part of the scaling process
[X]
Label indf1 is local to this routine
[X]
Label indf2 is local to this routine
[X]
Label indf3 is local to this routine
[X]
Configuration variable row30_char35_2 = &7E9A
Flaps indicator