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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

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

View File

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

View File

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