Optimize jumps

This commit is contained in:
Randy Thiemann 2023-10-13 11:26:40 +02:00
parent 134e1b559e
commit c2239e3290
4 changed files with 6 additions and 6 deletions

View File

@ -51,7 +51,7 @@ LCDCInterrupt_WaitUntilNotBusy:
; Check our interrupt counter
ldh a, [hLCDCCtr]
cp 21
jp nz, LCDCInterrupt_End
jr nz, LCDCInterrupt_End
ld a, 255
ldh [hLCDCCtr], a
ld a, 6

View File

@ -11,7 +11,7 @@ UnsafeMemCopy::
dec bc
ld a, b
or a, c
jp nz, UnsafeMemCopy
jr nz, UnsafeMemCopy
ret
@ -24,7 +24,7 @@ SafeMemCopy::
dec bc
ld a, b
or a, c
jp nz, SafeMemCopy
jr nz, SafeMemCopy
ret
; Sets memory from hl to hl+bc to d
@ -34,7 +34,7 @@ UnsafeMemSet::
dec bc
ld a, b
or a, c
jp nz, UnsafeMemSet
jr nz, UnsafeMemSet
ret

View File

@ -134,7 +134,7 @@ ApplyNext::
; Index of hold piece in A.
ApplyHold::
cp 255
jp nz, .doApplyHold
jr nz, .doApplyHold
ld hl, wSPRHold1
ld bc, 16
ld d, 0

View File

@ -118,7 +118,7 @@ GameLoopEnd:
wait_vblank
call hOAMDMA
call BlitField
jp GameLoop
jr GameLoop