Skip to content

Commit 31cf760

Browse files
committed
scope
1 parent c4c4dcf commit 31cf760

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

compiler/res/prog8lib/cx16/gfx2.p8

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -628,15 +628,14 @@ gfx2 {
628628
}
629629
}
630630

631-
ubyte[4] fill_amask = [$c0,$30,$0c,$03] ; array of cmask bytes
632-
633631
sub fill(uword x, uword y, ubyte new_color) {
634632
; reuse a few virtual registers in ZP for variables
635633
&ubyte fillm = &cx16.r7L
636634
&ubyte seedm = &cx16.r8L
637635
&ubyte cmask = &cx16.r8H
638636
&ubyte vub = &cx16.r13L
639637
&ubyte nvub = &cx16.r13H
638+
ubyte[4] amask = [$c0,$30,$0c,$03] ; array of cmask bytes
640639

641640
; Non-recursive scanline flood fill.
642641
; based loosely on code found here https://www.codeproject.com/Articles/6017/QuickFill-An-efficient-flood-fill-algorithm
@@ -793,7 +792,7 @@ skip:
793792
void gfx2.addr_mul_24_for_highres_4c(yy as uword,vx)
794793
cx16.r1L |= %0001_1000 ; auto decrement
795794
set_vera_address()
796-
cmask = fill_amask[lsb(vx) & 3] ; set the color mask for the first color pel
795+
cmask = amask[lsb(vx) & 3] ; set the color mask for the first color pel
797796

798797
repeat {
799798
vub = cx16.VERA_DATA0 ; read the VERA color data for 4 pixels
@@ -837,7 +836,7 @@ set_byte:
837836
void gfx2.addr_mul_24_for_highres_4c(yy as uword,xx as uword)
838837
cx16.r1L |= %00010000 ; auto increment
839838
set_vera_address()
840-
cmask = fill_amask[lsb(xx) & 3] ; set the color mask for the first color pel
839+
cmask = amask[lsb(xx) & 3] ; set the color mask for the first color pel
841840

842841
repeat {
843842
vub = cx16.VERA_DATA0 ; read the VERA color data for 4 pixels

0 commit comments

Comments
 (0)