Skip to content

Commit d2de3fc

Browse files
fix #353
1 parent 7bd14b3 commit d2de3fc

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/graphx/graphx.asm

+13-1
Original file line numberDiff line numberDiff line change
@@ -2657,6 +2657,7 @@ gfx_TransparentSprite:
26572657
pop iy
26582658
push ix
26592659
ld ixh,a
2660+
.transparent_color := $+1
26602661
ld a,TRASPARENT_COLOR
26612662
smcByte _TransparentColor
26622663
wait_quick
@@ -3573,6 +3574,7 @@ smcByte _TextBGColor
35733574
smcByte _TextFGColor
35743575
.bgcolor:
35753576
cp a,TEXT_TP_COLOR ; check if transparent
3577+
gfx_PrintChar.transparent_color := $-1
35763578
smcByte _TextTPColor
35773579
jr z,.transparent
35783580
ld (de),a
@@ -3679,6 +3681,13 @@ smcByte _TextHeight
36793681
ld iyh,a ; ixh = char width
36803682
ld (_TmpCharSprite),a ; store width of character we are drawing
36813683
call _GetChar ; store the character data
3684+
3685+
ld hl,gfx_TransparentSprite.transparent_color
3686+
ld a,(hl)
3687+
push af
3688+
ld a,(gfx_PrintChar.transparent_color)
3689+
ld (hl),a
3690+
36823691
ld bc,(_TextYPos)
36833692
push bc
36843693
ld bc,(_TextXPos) ; compute the new locations
@@ -3696,6 +3705,9 @@ smcByte _TextHeight
36963705
pop bc
36973706
pop bc
36983707

3708+
pop af
3709+
ld (gfx_TransparentSprite.transparent_color),a
3710+
36993711
pop hl ; restore hl and stack pointer
37003712
ret
37013713

@@ -3912,7 +3924,7 @@ smcByte _TextTPColor
39123924
ret
39133925
.transparent:
39143926
ld a,0
3915-
smcByte _TransparentColor
3927+
smcByte _TextTPColor
39163928
ld (de),a
39173929
inc de ; move to next pixel
39183930
djnz .nextpixel

0 commit comments

Comments
 (0)