Fix bug with bgcolor and textcolor

This commit is contained in:
jede
2019-07-17 21:48:53 +02:00
committed by greg-king5
parent 6f7f6b5119
commit ede64f68a9
7 changed files with 59 additions and 89 deletions

View File

@@ -3,25 +3,9 @@
.export _textcolor
.import CHARCOLOR
.import CHARCOLOR_CHANGE
.include "telestrat.inc"
.proc _textcolor
cmp CHARCOLOR ; Do we set the same color? If we don't detect it, we loose one char on the screen for each textcolor call with the same color
bne out ; yes
ldy #$00
sty CHARCOLOR_CHANGE
; Return last color
rts
out:
ldx CHARCOLOR ; Get last color in order to return it
sta CHARCOLOR
lda #$01
sta CHARCOLOR_CHANGE
txa ; Return previous color
rts
.endproc