Skip to content

Commit 9294665

Browse files
Gérald DeGR00TEruner112
authored andcommitted
PrintStringXY_Clip optimised (#128)
(before=193 ; after=175)
1 parent e7b67f5 commit 9294665

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

src/graphx/graphx.asm

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2803,20 +2803,15 @@ _PrintStringXY_Clip:
28032803
; arg2 : Text Y Pos
28042804
; Returns:
28052805
; None
2806-
ld hl,3
2807-
add hl,sp
2808-
ld de,(hl)
2809-
push de
2810-
inc hl
2811-
inc hl
2812-
inc hl
2806+
ld iy,3
2807+
lea bc,iy
2808+
add iy,sp
2809+
lea hl,iy+3
28132810
ld de,_TextXPos
2814-
ldi
2815-
ldi
2816-
ldi ; copy in the y location
2811+
ldir ; copy in the y location
28172812
ld hl,(hl)
28182813
ld (_TextYPos),hl ; set new y pos
2819-
pop hl
2814+
ld hl,(iy)
28202815
jr _DrawCharacters ; jump to the main string handler
28212816

28222817
;-------------------------------------------------------------------------------

0 commit comments

Comments
 (0)