Skip to content

Commit d86552b

Browse files
ZERICO2005mateoconlechuga
authored andcommitted
changed JP to JR in gfx_Deprecated by reordering blocks of code (saving 8 bytes)
1 parent 5243756 commit d86552b

File tree

1 file changed

+29
-20
lines changed

1 file changed

+29
-20
lines changed

src/graphx/graphx.asm

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4496,15 +4496,16 @@ gfx_Deprecated:
44964496
or a, a
44974497
sbc hl, hl
44984498
ld (ix - 6), hl
4499-
d_17: ld bc, (ix - 3)
4499+
d_17:
4500+
ld bc, (ix - 3)
45004501
ld hl, (ix + 6)
45014502
add hl, bc
45024503
inc bc
45034504
ld (ix - 3), bc
45044505
ld a, (hl)
45054506
ld (ix - 7), a
45064507
cp a, (ix - 8)
4507-
jp nz, d_16
4508+
jr nz, d_16
45084509
ld bc, (ix - 3)
45094510
ld hl, (ix + 6)
45104511
add hl, bc
@@ -4523,7 +4524,27 @@ d_17: ld bc, (ix - 3)
45234524
inc bc
45244525
ld (ix - 3), bc
45254526
jr d_18
4526-
d_13: ld bc, (ix - 14)
4527+
4528+
d_16:
4529+
ld bc, (ix - 6)
4530+
ld hl, (ix + 9)
4531+
add hl, bc
4532+
inc bc
4533+
ld (ix - 6), bc
4534+
ld a, (ix - 7)
4535+
ld (hl), a
4536+
d_18:
4537+
ld bc, (ix - 17)
4538+
ld hl, (ix - 3)
4539+
or a, a
4540+
sbc hl, bc
4541+
jr c, d_17
4542+
ld sp, ix
4543+
pop ix
4544+
ret
4545+
4546+
d_13:
4547+
ld bc, (ix - 14)
45274548
push bc
45284549
pea ix - 20
45294550
call _LZ_ReadVarSize
@@ -4546,7 +4567,9 @@ d_13: ld bc, (ix - 14)
45464567
sbc hl, hl
45474568
ld (ix - 11), hl
45484569
jr d_11
4549-
d_9: ld bc, (ix - 23)
4570+
4571+
d_9:
4572+
ld bc, (ix - 23)
45504573
ld hl, (ix - 6)
45514574
or a, a
45524575
sbc hl, bc
@@ -4564,27 +4587,13 @@ d_9: ld bc, (ix - 23)
45644587
ld bc, (ix - 11)
45654588
inc bc
45664589
ld (ix - 11), bc
4567-
d_11: ld bc, (ix - 20)
4590+
d_11:
4591+
ld bc, (ix - 20)
45684592
ld hl, (ix - 11)
45694593
or a, a
45704594
sbc hl, bc
45714595
jr c, d_9
45724596
jr d_18
4573-
d_16: ld bc, (ix - 6)
4574-
ld hl, (ix + 9)
4575-
add hl, bc
4576-
inc bc
4577-
ld (ix - 6), bc
4578-
ld a, (ix - 7)
4579-
ld (hl), a
4580-
d_18: ld bc, (ix - 17)
4581-
ld hl, (ix - 3)
4582-
or a, a
4583-
sbc hl, bc
4584-
jp c, d_17
4585-
ld sp, ix
4586-
pop ix
4587-
ret
45884597

45894598
;-------------------------------------------------------------------------------
45904599
gfx_FlipSpriteY:

0 commit comments

Comments
 (0)