Skip to content

Commit 51c428f

Browse files
Gérald DeGR00TEruner112
authored andcommitted
slightly optimised gfx_BlitRectangle (#125)
1 parent 269610a commit 51c428f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/graphx/graphx.asm

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,16 +1693,18 @@ gfx_BlitRectangle:
16931693
pop hl
16941694
ld a,(iy+15)
16951695
ld iy,0
1696-
.loop:
16971696
add iy,de
1698-
lea de,iy
1697+
.loop:
16991698
ld bc,0 ; smc for speedz
17001699
.width := $-3
17011700
ldir
1701+
inc b
1702+
ld c,$40 ; increment to next line
1703+
add iy,bc
1704+
lea de,iy
17021705
ld bc,0 ; increment to next line
17031706
.delta := $-3
17041707
add hl,bc
1705-
ld de,LcdWidth ; increment to next line
17061708
dec a
17071709
jr nz,.loop
17081710
ret

0 commit comments

Comments
 (0)