.MoveSights JSR MoveSightsSideways \ Check for the left/right keys and move the sights \ accordingly, panning to the left or right if they go \ past the screen edges LDA panKeyBeingPressed \ If panKeyBeingPressed contains a key press then one BPL sigh1 \ of the left and right keys is being pressed, so jump \ to sigh1 to skip scanning the up and down keys as we \ can only move the sights in one direction at a time JSR MoveSightsUpDown \ Check for the up/down keys and move the sights \ accordingly, panning up or down if they go past the \ screen edges .sigh1 JMP DrawSights \ Jump to DrawSights to draw the sights in their new \ position, returning from the subroutine using a tail \ callName: MoveSights [Show more] Type: Subroutine Category: Sights Summary: Check for up/down/left/right key presses and move the sights accordingly, panning the screen if they go past the screen edgesContext: See this subroutine in context in the source code References: This subroutine is called as follows: * CheckForKeyPresses calls MoveSights
[X]
Subroutine DrawSights (category: Sights)
Draw the sights on the screen, saving the existing screen contents in the sights pixel byte stash
[X]
Subroutine MoveSightsSideways (category: Sights)
Check for the left/right keys and move the sights accordingly, panning to the left or right if they go past the screen edges
[X]
Subroutine MoveSightsUpDown (category: Sights)
Check for the up/down keys and move the sights accordingly, panning up or down if they go past the screen edges
[X]
Variable panKeyBeingPressed in workspace Zero page
The direction in which the player is currently panning
[X]
Label sigh1 is local to this routine