Skip to content

Commit 126c525

Browse files
fix #390
Signed-off-by: mateoconlechuga <matthewwaltzis@gmail.com>
1 parent 5ab0b7c commit 126c525

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

src/graphx/graphx.asm

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5446,14 +5446,14 @@ gfx_FloodFill:
54465446
jr nc,.badpush0 ; check stack limit
54475447
ld a,(_YMin)
54485448
ld e,a
5449-
ld a,(ix-4)
5450-
neg
5451-
add a,(ix+9)
5449+
ld a,(ix+9)
5450+
sub a,(ix-4)
54525451
cp a,e
54535452
jr c,.badpush0
54545453
ld e,a
54555454
ld a,(_YMax)
5456-
cp a,e
5455+
scf
5456+
sbc a,e
54575457
jr c,.badpush0 ; compare y values
54585458
ld a,(ix+9)
54595459
ld (iy+6),a
@@ -5514,7 +5514,8 @@ gfx_FloodFill:
55145514
jr c,.badpush1
55155515
ld e,a
55165516
ld a,(_YMax)
5517-
cp a,e
5517+
scf
5518+
sbc a,e
55185519
jr c,.badpush1 ; compare y values
55195520
dec bc
55205521
ld (iy+3),bc
@@ -5539,14 +5540,14 @@ gfx_FloodFill:
55395540
jr nc,.badpush2
55405541
ld a,(_YMin)
55415542
ld e,a
5542-
ld a,(ix-4)
5543-
neg
5544-
add a,(ix+9)
5543+
ld a,(ix+9)
5544+
sub a,(ix-4)
55455545
cp a,e
55465546
jr c,.badpush2
55475547
ld e,a
55485548
ld a,(_YMax)
5549-
cp a,e
5549+
scf
5550+
sbc a,e
55505551
jr c,.badpush2 ; compare y values
55515552
dec bc
55525553
ld (iy+3),bc

src/graphx/graphx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1650,7 +1650,7 @@ uint16_t gfx_Darken(uint16_t color,
16501650
* @note This routine performs clipping to stay within the window,
16511651
* but you must ensure it starts in the window.
16521652
*/
1653-
void gfx_FloodFill(unsigned int x,
1653+
void gfx_FloodFill(uint24_t x,
16541654
uint8_t y,
16551655
uint8_t color);
16561656

0 commit comments

Comments
 (0)