File tree 1 file changed +6
-13
lines changed
1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -497,17 +497,15 @@ _FillRectangle:
497
497
add hl , de
498
498
ld (iy + 12 ) , hl
499
499
call _ClipRectRegion_ASM \.r
500
- ret c ; return if offscreen
500
+ ret c ; return if offscreen or degenerate
501
501
ld de , (iy + 3 )
502
502
ld hl , (iy + 9 )
503
- sbc hl , de ; make sure that the width is not 0
504
- ret z
503
+ sbc hl , de
505
504
push hl
506
505
ld de , (iy + 6 )
507
506
ld hl , (iy + 12 )
508
507
sbc hl , de
509
508
pop bc ; bc = new width
510
- ret z
511
509
ld a , l ; a = new height
512
510
ld hl , (iy + 3 ) ; hl = new x, de = new y
513
511
jr _FillRectangle_NoClip_ASM
@@ -4516,7 +4514,7 @@ _ClipRectRegion_ASM:
4516
4514
call _Min_ASM \.r
4517
4515
ld (iy + 9 ) , hl
4518
4516
ld de , (iy + 3 )
4519
- call _SignedCompare_ASM \.r
4517
+ call _ClipRectRegion_Compare_ASM \.r
4520
4518
ret c
4521
4519
ld hl , (_ymin) \.r
4522
4520
ld de , (iy + 6 )
@@ -4527,20 +4525,15 @@ _ClipRectRegion_ASM:
4527
4525
call _Min_ASM \.r
4528
4526
ld (iy + 12 ) , hl
4529
4527
ld de , (iy + 6 )
4528
+ _ClipRectRegion_Compare_ASM:
4529
+ dec hl
4530
4530
_SignedCompare_ASM:
4531
4531
or a , a
4532
4532
sbc hl , de
4533
4533
add hl , hl
4534
4534
ret po
4535
4535
ccf
4536
4536
ret
4537
- _SignedCompareBC_ASM:
4538
- or a , a
4539
- sbc hl , bc
4540
- add hl , hl
4541
- ret po
4542
- ccf
4543
- ret
4544
4537
4545
4538
;-------------------------------------------------------------------------------
4546
4539
_SetFullScrnClip_ASM:
@@ -4556,7 +4549,7 @@ _SetFullScrnClip_ASM:
4556
4549
sbc hl , hl
4557
4550
ld (_xmin) , hl \.r
4558
4551
inc h
4559
- ld l , lcdWidth - $ ff
4552
+ ld l , lcdWidth& $ ff
4560
4553
ld (_xmax) , hl \.r
4561
4554
ret
4562
4555
You can’t perform that action at this time.
0 commit comments