.HideMostSprites SETUP_PPU_FOR_ICON_BAR ; If the PPU has started drawing the icon bar, configure ; the PPU to use nametable 0 and pattern table 0 LDX #58 ; Set X = 58 so we hide 59 sprites LDY #20 ; Set Y so we start hiding from sprite 20 / 4 = 5 BNE HideMoreSprites ; Jump to HideMoreSprites to hide 59 sprites from ; sprite 5 onwards (i.e. sprites 5 to 63, which only ; leaves sprite 0 and the icon bar pointer sprites 1 to ; 4) ; ; We return from the subroutine using a tail call (this ; BNE is effectively a JMP as Y is never zero)Name: HideMostSprites [Show more] Type: Subroutine Category: Drawing sprites Summary: Hide all sprites except for sprite 0 and the icon bar pointerContext: See this subroutine in context in the source code References: This subroutine is called as follows: * DEATH calls HideMostSprites * DrawTitleScreen calls HideMostSprites * LAUN calls HideMostSprites * SetScreenForUpdate calls HideMostSprites
[X]
Subroutine HideMoreSprites (category: Drawing sprites)
Hide X + 1 sprites from sprite Y / 4 onwards
[X]
Macro SETUP_PPU_FOR_ICON_BAR (category: PPU)
If the PPU has started drawing the icon bar, configure the PPU to use nametable 0 and pattern table 0