.DrawLeftEarring LDA #108 ; Set the pattern number for sprite 12 to 108, which is STA pattSprite12 ; the left earring LDA #%00000010 ; Set the attributes for sprite 12 as follows: STA attrSprite12 ; ; * Bits 0-1 = sprite palette 2 ; * Bit 5 clear = show in front of background ; * Bit 6 clear = do not flip horizontally ; * Bit 7 clear = do not flip vertically LDA #227 ; Set the x-coordinate for sprite 12 to 227 STA xSprite12 LDA languageNumber ; If bit 2 of languageNumber is clear then the chosen AND #%00000100 ; language is not French, so jump to earl1 with A = 0 BEQ earl1 LDA #16 ; The chosen language is French, so the commander image ; is 16 pixels lower down the screen, so set A = 16 to ; add to the y-coordinate of the earring .earl1 CLC ; Set the y-coordinate for sprite 12 to 98, plus the ADC #98+YPAL ; margin we just set in A STA ySprite12 RTS ; Return from the subroutineName: DrawLeftEarring [Show more] Type: Subroutine Category: Status Summary: Draw an earring in the commander's left ear (i.e. on the right side of the commander imageContext: See this subroutine in context in the source code References: This subroutine is called as follows: * DrawCmdrImage calls DrawLeftEarring
[X]
Configuration variable YPAL = 6 AND _PAL
A margin of 6 pixels that is applied to a number of y-coordinates for the PAL version only (as the PAL version has a taller screen than NTSC)
[X]
Variable attrSprite12 in workspace Sprite buffer
Attributes for sprite 12
[X]
Label earl1 is local to this routine
[X]
Variable languageNumber in workspace WP
The language that was chosen on the Start screen as a number
[X]
Variable pattSprite12 in workspace Sprite buffer
Pattern number for sprite 12
[X]
Variable xSprite12 in workspace Sprite buffer
Screen x-coordinate for sprite 12
[X]
Variable ySprite12 in workspace Sprite buffer
Screen y-coordinate for sprite 12