X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libsrc%2Fnes%2Fcolor.s;h=bb91ff908445c2083d86259fef6cfd17c1cfceef;hb=7a9fa9d4cd69bebf10054f123c836cde768e6884;hp=3ac4dd62014c1063dd14d6d9ea19ac52c7086ffa;hpb=d53211198b099aa59dcb1853f147c8640bd18ffa;p=cc65 diff --git a/libsrc/nes/color.s b/libsrc/nes/color.s index 3ac4dd620..bb91ff908 100644 --- a/libsrc/nes/color.s +++ b/libsrc/nes/color.s @@ -8,62 +8,62 @@ ; - .export _textcolor, _bgcolor, _bordercolor - .import return0, ppubuf_put + .export _textcolor, _bgcolor, _bordercolor + .import return0, ppubuf_put - .include "nes.inc" + .include "nes.inc" _textcolor = return0 _bordercolor = return0 .proc _bgcolor - tax - lda BGCOLOR ; get old value - stx BGCOLOR ; set new value - pha + tax + lda BGCOLOR ; get old value + stx BGCOLOR ; set new value + pha - lda colors,x - pha - ldy #$3F - ldx #0 - jsr ppubuf_put - pla - pha - ldy #$3F - ldx #4 - jsr ppubuf_put - pla - pha - ldy #$3F - ldx #8 - jsr ppubuf_put - pla - ldy #$3F - ldx #12 - jsr ppubuf_put + lda colors,x + pha + ldy #$3F + ldx #0 + jsr ppubuf_put + pla + pha + ldy #$3F + ldx #4 + jsr ppubuf_put + pla + pha + ldy #$3F + ldx #8 + jsr ppubuf_put + pla + ldy #$3F + ldx #12 + jsr ppubuf_put - pla - rts + pla + rts .endproc .rodata colors: .byte $0f ; 0 black - .byte $3d ; 1 white - .byte $04 ; 2 red - .byte $3b ; 3 cyan - .byte $14 ; 4 violett - .byte $1a ; 5 green - .byte $01 ; 6 blue - .byte $38 ; 7 yellow - .byte $18 ; 8 orange - .byte $08 ; 9 brown - .byte $35 ; a light red - .byte $2d ; b dark grey - .byte $10 ; c middle grey - .byte $2b ; d light green - .byte $22 ; e light blue - .byte $3d ; f light gray + .byte $3d ; 1 white + .byte $04 ; 2 red + .byte $3b ; 3 cyan + .byte $14 ; 4 violett + .byte $1a ; 5 green + .byte $01 ; 6 blue + .byte $38 ; 7 yellow + .byte $18 ; 8 orange + .byte $08 ; 9 brown + .byte $35 ; a light red + .byte $2d ; b dark grey + .byte $10 ; c middle grey + .byte $2b ; d light green + .byte $22 ; e light blue + .byte $3d ; f light gray