Use time constants more often (#867)

This commit is contained in:
Idain
2022-01-10 21:57:40 -04:00
committed by GitHub
parent 67207fab94
commit 5ac4a51751
3 changed files with 4 additions and 4 deletions

View File

@@ -390,7 +390,7 @@ _CalcHoursDaysSince:
ld c, a
sbc [hl]
jr nc, .skip
add 24
add MAX_HOUR
.skip
ld [hl], c ; current hours
dec hl

View File

@@ -1271,9 +1271,9 @@ PokegearPhoneContactSubmenu:
GetAMPMHours: ; unreferenced
ldh a, [hHours]
cp 12
cp NOON_HOUR
jr c, .am
sub 12
sub NOON_HOUR
ld [wTempByteValue], a
scf
ret

View File

@@ -1083,7 +1083,7 @@ Function1006dc:
ldh a, [hHours]
sbc c
jr nc, .asm_1006fb
add $18
add MAX_HOUR
.asm_1006fb
ld [de], a