Fix bgcolor and textcolor must return last color, jmp remove.
This commit is contained in:
parent
f9e13abc11
commit
0fe98a7ca8
4 changed files with 9 additions and 9 deletions
|
@ -7,6 +7,8 @@
|
||||||
.include "telestrat.inc"
|
.include "telestrat.inc"
|
||||||
|
|
||||||
.proc _bgcolor
|
.proc _bgcolor
|
||||||
|
ldx BGCOLOR ; Get previous color
|
||||||
sta BGCOLOR
|
sta BGCOLOR
|
||||||
|
txa ; Return previous color
|
||||||
rts
|
rts
|
||||||
.endproc
|
.endproc
|
||||||
|
|
|
@ -34,12 +34,8 @@
|
||||||
dex
|
dex
|
||||||
stx SCRX
|
stx SCRX
|
||||||
|
|
||||||
; X is equal to 0
|
lda #$FF
|
||||||
stx BGCOLOR
|
sta OLD_BGCOLOR
|
||||||
stx OLD_BGCOLOR
|
|
||||||
|
|
||||||
lda #$07
|
|
||||||
sta CHARCOLOR
|
|
||||||
sta OLD_CHARCOLOR
|
sta OLD_CHARCOLOR
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
|
@ -24,8 +24,8 @@ gotoxy: jsr popa ; Get Y
|
||||||
jsr popa
|
jsr popa
|
||||||
sta SCRX
|
sta SCRX
|
||||||
|
|
||||||
jmp update_adscr ; Update adress video ram position when SCRY is modified
|
; Update adress video ram position when SCRY is modified (update_adscr)
|
||||||
|
; Fall through
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
.proc update_adscr
|
.proc update_adscr
|
||||||
|
@ -48,7 +48,7 @@ gotoxy: jsr popa ; Get Y
|
||||||
loop:
|
loop:
|
||||||
lda ADSCRL
|
lda ADSCRL
|
||||||
clc
|
clc
|
||||||
adc #$28
|
adc #SCREEN_XSIZE
|
||||||
bcc skip
|
bcc skip
|
||||||
inc ADSCRH
|
inc ADSCRH
|
||||||
skip:
|
skip:
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
.include "telestrat.inc"
|
.include "telestrat.inc"
|
||||||
|
|
||||||
.proc _textcolor
|
.proc _textcolor
|
||||||
|
ldx CHARCOLOR ; Get previous color
|
||||||
sta CHARCOLOR
|
sta CHARCOLOR
|
||||||
|
txa ; Return previous color
|
||||||
rts
|
rts
|
||||||
.endproc
|
.endproc
|
||||||
|
|
Loading…
Add table
Reference in a new issue