Optimize jumps
This commit is contained in:
parent
134e1b559e
commit
c2239e3290
|
@ -51,7 +51,7 @@ LCDCInterrupt_WaitUntilNotBusy:
|
||||||
; Check our interrupt counter
|
; Check our interrupt counter
|
||||||
ldh a, [hLCDCCtr]
|
ldh a, [hLCDCCtr]
|
||||||
cp 21
|
cp 21
|
||||||
jp nz, LCDCInterrupt_End
|
jr nz, LCDCInterrupt_End
|
||||||
ld a, 255
|
ld a, 255
|
||||||
ldh [hLCDCCtr], a
|
ldh [hLCDCCtr], a
|
||||||
ld a, 6
|
ld a, 6
|
||||||
|
|
|
@ -11,7 +11,7 @@ UnsafeMemCopy::
|
||||||
dec bc
|
dec bc
|
||||||
ld a, b
|
ld a, b
|
||||||
or a, c
|
or a, c
|
||||||
jp nz, UnsafeMemCopy
|
jr nz, UnsafeMemCopy
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ SafeMemCopy::
|
||||||
dec bc
|
dec bc
|
||||||
ld a, b
|
ld a, b
|
||||||
or a, c
|
or a, c
|
||||||
jp nz, SafeMemCopy
|
jr nz, SafeMemCopy
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; Sets memory from hl to hl+bc to d
|
; Sets memory from hl to hl+bc to d
|
||||||
|
@ -34,7 +34,7 @@ UnsafeMemSet::
|
||||||
dec bc
|
dec bc
|
||||||
ld a, b
|
ld a, b
|
||||||
or a, c
|
or a, c
|
||||||
jp nz, UnsafeMemSet
|
jr nz, UnsafeMemSet
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,7 @@ ApplyNext::
|
||||||
; Index of hold piece in A.
|
; Index of hold piece in A.
|
||||||
ApplyHold::
|
ApplyHold::
|
||||||
cp 255
|
cp 255
|
||||||
jp nz, .doApplyHold
|
jr nz, .doApplyHold
|
||||||
ld hl, wSPRHold1
|
ld hl, wSPRHold1
|
||||||
ld bc, 16
|
ld bc, 16
|
||||||
ld d, 0
|
ld d, 0
|
||||||
|
|
|
@ -118,7 +118,7 @@ GameLoopEnd:
|
||||||
wait_vblank
|
wait_vblank
|
||||||
call hOAMDMA
|
call hOAMDMA
|
||||||
call BlitField
|
call BlitField
|
||||||
jp GameLoop
|
jr GameLoop
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue