From 2aba2b9ff003cb4c208634d62fa1cd69418b92f0 Mon Sep 17 00:00:00 2001 From: Rangi Date: Mon, 10 Jan 2022 20:58:47 -0500 Subject: Use time constants more often --- engine/overworld/time.asm | 2 +- engine/pokegear/pokegear.asm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'engine') diff --git a/engine/overworld/time.asm b/engine/overworld/time.asm index f72b653f..aa7334e4 100644 --- a/engine/overworld/time.asm +++ b/engine/overworld/time.asm @@ -345,7 +345,7 @@ _CalcHoursDaysSince: ld c, a sbc [hl] jr nc, .skip - add 24 + add MAX_HOUR .skip ld [hl], c ; current hours dec hl diff --git a/engine/pokegear/pokegear.asm b/engine/pokegear/pokegear.asm index 08d8a3ae..32ba3956 100644 --- a/engine/pokegear/pokegear.asm +++ b/engine/pokegear/pokegear.asm @@ -1257,9 +1257,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 -- cgit v1.2.3