Fix bug with bgcolor and textcolor
This commit is contained in:
@@ -3,23 +3,10 @@
|
||||
|
||||
.export _bgcolor
|
||||
.import BGCOLOR
|
||||
.import BGCOLOR_CHANGE
|
||||
|
||||
.include "telestrat.inc"
|
||||
|
||||
.proc _bgcolor
|
||||
cmp BGCOLOR ; Do we set the same color? If we don't detect it, we loose one char on the screen for each bgcolor call with the same color
|
||||
bne out ; Yes
|
||||
|
||||
ldy #$00
|
||||
sty BGCOLOR_CHANGE
|
||||
|
||||
rts
|
||||
out:
|
||||
ldx BGCOLOR ; Get last color in order to return it
|
||||
sta BGCOLOR
|
||||
|
||||
lda #$01 ; Notify the change color
|
||||
sta BGCOLOR_CHANGE
|
||||
txa ; Return previous color
|
||||
rts
|
||||
.endproc
|
||||
|
||||
Reference in New Issue
Block a user