diff options
author | Rangi <35663410+Rangi42@users.noreply.github.com> | 2020-02-04 11:17:14 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-04 11:17:14 -0500 |
commit | ed44d1cdb7e2f389be56a0158f8ce857e02a76b3 (patch) | |
tree | f0b0c99546651898e1c326697164f2f95aa97d0b /home/time.asm | |
parent | dd6812c06a3a5123fa277c9c07089cb35647b4d2 (diff) | |
parent | 24a23b19224fd8d2ac255e810c4b9c235118277a (diff) |
Merge pull request #680 from Rangi42/master
Miscellaneous fixes for #676
Diffstat (limited to 'home/time.asm')
-rw-r--r-- | home/time.asm | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/home/time.asm b/home/time.asm index 8f6879397..e631fe060 100644 --- a/home/time.asm +++ b/home/time.asm @@ -76,11 +76,11 @@ FixDays:: jr z, .daylo ; reset dh (bit 8) res 0, a - ldh [hRTCDayHi], a ; DH + ldh [hRTCDayHi], a ; mod 140 ; mod twice since bit 8 (DH) was set - ldh a, [hRTCDayLo] ; DL + ldh a, [hRTCDayLo] .modh sub 140 jr nc, .modh @@ -90,7 +90,7 @@ FixDays:: add 140 ; update dl - ldh [hRTCDayLo], a ; DL + ldh [hRTCDayLo], a ; flag for sRTCStatusFlags ld a, %01000000 @@ -98,7 +98,7 @@ FixDays:: .daylo ; quit if fewer than 140 days have passed - ldh a, [hRTCDayLo] ; DL + ldh a, [hRTCDayLo] cp 140 jr c, .quit @@ -109,7 +109,7 @@ FixDays:: add 140 ; update dl - ldh [hRTCDayLo], a ; DL + ldh [hRTCDayLo], a ; flag for sRTCStatusFlags ld a, %00100000 @@ -128,11 +128,10 @@ FixDays:: FixTime:: ; add ingame time (set at newgame) to current time -; day hr min sec ; store time in wCurDay, hHours, hMinutes, hSeconds ; second - ldh a, [hRTCSeconds] ; S + ldh a, [hRTCSeconds] ld c, a ld a, [wStartSecond] add c @@ -144,7 +143,7 @@ FixTime:: ; minute ccf ; carry is set, so turn it off - ldh a, [hRTCMinutes] ; M + ldh a, [hRTCMinutes] ld c, a ld a, [wStartMinute] adc c @@ -156,7 +155,7 @@ FixTime:: ; hour ccf ; carry is set, so turn it off - ldh a, [hRTCHours] ; H + ldh a, [hRTCHours] ld c, a ld a, [wStartHour] adc c @@ -168,7 +167,7 @@ FixTime:: ; day ccf ; carry is set, so turn it off - ldh a, [hRTCDayLo] ; DL + ldh a, [hRTCDayLo] ld c, a ld a, [wStartDay] adc c @@ -178,7 +177,7 @@ FixTime:: InitTimeOfDay:: xor a ld [wStringBuffer2], a - ld a, $0 ; useless + ld a, 0 ; useless ld [wStringBuffer2 + 3], a jr InitTime |