Optimizations: ld a, 0 -> xor a, a
This commit is contained in:
parent
932666b5bb
commit
7503937b22
BIN
bin/DMGTRIS.GBC
BIN
bin/DMGTRIS.GBC
Binary file not shown.
2180
bin/DMGTRIS.map
2180
bin/DMGTRIS.map
File diff suppressed because it is too large
Load Diff
Binary file not shown.
1946
bin/DMGTRIS.sym
1946
bin/DMGTRIS.sym
File diff suppressed because it is too large
Load Diff
|
@ -4667,7 +4667,7 @@ BigClearLines:
|
|||
ld [hl+], a
|
||||
ld [hl+], a
|
||||
ld [hl+], a
|
||||
ld a, 0
|
||||
xor a, a
|
||||
ld [hl+], a
|
||||
ld [hl+], a
|
||||
ld [hl+], a
|
||||
|
|
26
src/gbc.asm
26
src/gbc.asm
|
@ -109,7 +109,7 @@ ToATTR::
|
|||
ldh [rHDMA4], a
|
||||
ld a, 41
|
||||
ldh [rHDMA5], a
|
||||
ld a, 0
|
||||
xor a, a
|
||||
ldh [rVBK], a
|
||||
ret
|
||||
|
||||
|
@ -268,7 +268,7 @@ GBCTitleProcess::
|
|||
inc a
|
||||
cp a, $07
|
||||
jr c, .nores
|
||||
ld a, $00
|
||||
xor a, a
|
||||
.nores
|
||||
ld [wTitlePal], a
|
||||
.noinc
|
||||
|
@ -303,7 +303,7 @@ GBCTitleProcess::
|
|||
inc a
|
||||
cp a, $07
|
||||
jr c, .nores3
|
||||
ld a, $00
|
||||
xor a, a
|
||||
.nores3
|
||||
ld [wTitlePal], a
|
||||
.noinc3
|
||||
|
@ -338,7 +338,7 @@ GBCTitleProcess::
|
|||
inc a
|
||||
cp a, $07
|
||||
jr c, .nores1
|
||||
ld a, $00
|
||||
xor a, a
|
||||
.nores1
|
||||
ld [wTitlePal], a
|
||||
.noinc1
|
||||
|
@ -373,7 +373,7 @@ GBCTitleProcess::
|
|||
inc a
|
||||
cp a, $07
|
||||
jr c, .nores4
|
||||
ld a, $00
|
||||
xor a, a
|
||||
.nores4
|
||||
ld [wTitlePal], a
|
||||
.noinc4
|
||||
|
@ -395,7 +395,7 @@ GBCTitleProcess::
|
|||
inc a
|
||||
cp a, $07
|
||||
jr c, .nores2
|
||||
ld a, $00
|
||||
xor a, a
|
||||
.nores2
|
||||
ld [wTitlePal], a
|
||||
.noinc2
|
||||
|
@ -429,11 +429,11 @@ GBCGameplayProcess::
|
|||
jr z, .goverride
|
||||
ld a, [wSpeedCurveState]
|
||||
cp a, SCURVE_DEAT
|
||||
ld a, $00 ;Red
|
||||
xor a, a ;Red
|
||||
jr z, .goverride
|
||||
ld a, [wSpeedCurveState]
|
||||
cp a, SCURVE_SHIR
|
||||
ld a, $00 ;Red
|
||||
xor a, a ;Red
|
||||
jr z, .goverride ;Always red
|
||||
ld a, [wSpeedCurveState]
|
||||
cp a, SCURVE_CHIL
|
||||
|
@ -447,7 +447,7 @@ GBCGameplayProcess::
|
|||
ldh a, [hCurrentIntegerGravity]
|
||||
cp a, 20
|
||||
jr c, :+
|
||||
ld a, $00
|
||||
xor a, a
|
||||
ld d, a
|
||||
jr .colorfield
|
||||
: cp a, 3
|
||||
|
@ -645,11 +645,11 @@ GBCBigGameplayProcess::
|
|||
jr z, .goverride
|
||||
ld a, [wSpeedCurveState]
|
||||
cp a, SCURVE_DEAT
|
||||
ld a, $00 ;Red
|
||||
xor a, a ;Red
|
||||
jr z, .goverride
|
||||
ld a, [wSpeedCurveState]
|
||||
cp a, SCURVE_SHIR
|
||||
ld a, $00 ;Red
|
||||
xor a, a ;Red
|
||||
jr z, .goverride ;Always red
|
||||
ld a, [wSpeedCurveState]
|
||||
cp a, SCURVE_CHIL
|
||||
|
@ -663,7 +663,7 @@ GBCBigGameplayProcess::
|
|||
ldh a, [hCurrentIntegerGravity]
|
||||
cp a, 20
|
||||
jr c, :+
|
||||
ld a, $00
|
||||
xor a, a
|
||||
ld d, a
|
||||
jr .colorfield
|
||||
: cp a, 3
|
||||
|
@ -860,7 +860,7 @@ ToVRAM::
|
|||
ldh [rHDMA5], a
|
||||
|
||||
; Bank 0
|
||||
ld a, 0
|
||||
xor a, a
|
||||
ldh [rVBK], a
|
||||
ld a, HIGH(wShadowTilemap)
|
||||
ldh [rHDMA1], a
|
||||
|
|
|
@ -497,7 +497,7 @@ AdjustSpeedCurveForced:
|
|||
jr z, .continue
|
||||
ld a, 20
|
||||
ldh [hCurrentIntegerGravity], a
|
||||
ld a, $00
|
||||
xor a, a
|
||||
ldh [hCurrentFractionalGravity], a
|
||||
|
||||
.continue
|
||||
|
|
|
@ -331,7 +331,7 @@ GetNextTGM3Piece:
|
|||
jr z, :+ ; Same.
|
||||
jr c, :+ ; Nope.
|
||||
ld e, a
|
||||
ld a, 0
|
||||
xor a, a
|
||||
ld [wTGM3WorstDroughtIdx], a
|
||||
|
||||
; Is idx 1 worse?
|
||||
|
|
|
@ -163,7 +163,7 @@ ApplyTells::
|
|||
ld [wSPRModeRot+3], a
|
||||
ld a, 4
|
||||
ld [wSPRModeDrop+3], a
|
||||
ld a, 0
|
||||
xor a, a
|
||||
ld [wSPRModeHiG+3], a
|
||||
ret
|
||||
|
||||
|
|
|
@ -230,7 +230,7 @@ InitializeSRAM:
|
|||
ld [rCheck+2], a
|
||||
ld a, "T"
|
||||
ld [rCheck+3], a
|
||||
ld a, 0
|
||||
xor a, a
|
||||
ld [rCheck+4], a
|
||||
ld a, 4
|
||||
ld [rCheck+5], a
|
||||
|
|
Loading…
Reference in New Issue