mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Clean up comments in home/time.asm
This commit is contained in:
parent
80cf859cd3
commit
b1c8548628
@ -76,11 +76,11 @@ FixDays::
|
|||||||
jr z, .daylo
|
jr z, .daylo
|
||||||
; reset dh (bit 8)
|
; reset dh (bit 8)
|
||||||
res 0, a
|
res 0, a
|
||||||
ldh [hRTCDayHi], a ; DH
|
ldh [hRTCDayHi], a
|
||||||
|
|
||||||
; mod 140
|
; mod 140
|
||||||
; mod twice since bit 8 (DH) was set
|
; mod twice since bit 8 (DH) was set
|
||||||
ldh a, [hRTCDayLo] ; DL
|
ldh a, [hRTCDayLo]
|
||||||
.modh
|
.modh
|
||||||
sub 140
|
sub 140
|
||||||
jr nc, .modh
|
jr nc, .modh
|
||||||
@ -90,7 +90,7 @@ FixDays::
|
|||||||
add 140
|
add 140
|
||||||
|
|
||||||
; update dl
|
; update dl
|
||||||
ldh [hRTCDayLo], a ; DL
|
ldh [hRTCDayLo], a
|
||||||
|
|
||||||
; flag for sRTCStatusFlags
|
; flag for sRTCStatusFlags
|
||||||
ld a, %01000000
|
ld a, %01000000
|
||||||
@ -98,7 +98,7 @@ FixDays::
|
|||||||
|
|
||||||
.daylo
|
.daylo
|
||||||
; quit if fewer than 140 days have passed
|
; quit if fewer than 140 days have passed
|
||||||
ldh a, [hRTCDayLo] ; DL
|
ldh a, [hRTCDayLo]
|
||||||
cp 140
|
cp 140
|
||||||
jr c, .quit
|
jr c, .quit
|
||||||
|
|
||||||
@ -109,7 +109,7 @@ FixDays::
|
|||||||
add 140
|
add 140
|
||||||
|
|
||||||
; update dl
|
; update dl
|
||||||
ldh [hRTCDayLo], a ; DL
|
ldh [hRTCDayLo], a
|
||||||
|
|
||||||
; flag for sRTCStatusFlags
|
; flag for sRTCStatusFlags
|
||||||
ld a, %00100000
|
ld a, %00100000
|
||||||
@ -128,11 +128,10 @@ FixDays::
|
|||||||
|
|
||||||
FixTime::
|
FixTime::
|
||||||
; add ingame time (set at newgame) to current time
|
; add ingame time (set at newgame) to current time
|
||||||
; day hr min sec
|
|
||||||
; store time in wCurDay, hHours, hMinutes, hSeconds
|
; store time in wCurDay, hHours, hMinutes, hSeconds
|
||||||
|
|
||||||
; second
|
; second
|
||||||
ldh a, [hRTCSeconds] ; S
|
ldh a, [hRTCSeconds]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [wStartSecond]
|
ld a, [wStartSecond]
|
||||||
add c
|
add c
|
||||||
@ -144,7 +143,7 @@ FixTime::
|
|||||||
|
|
||||||
; minute
|
; minute
|
||||||
ccf ; carry is set, so turn it off
|
ccf ; carry is set, so turn it off
|
||||||
ldh a, [hRTCMinutes] ; M
|
ldh a, [hRTCMinutes]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [wStartMinute]
|
ld a, [wStartMinute]
|
||||||
adc c
|
adc c
|
||||||
@ -156,7 +155,7 @@ FixTime::
|
|||||||
|
|
||||||
; hour
|
; hour
|
||||||
ccf ; carry is set, so turn it off
|
ccf ; carry is set, so turn it off
|
||||||
ldh a, [hRTCHours] ; H
|
ldh a, [hRTCHours]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [wStartHour]
|
ld a, [wStartHour]
|
||||||
adc c
|
adc c
|
||||||
@ -168,7 +167,7 @@ FixTime::
|
|||||||
|
|
||||||
; day
|
; day
|
||||||
ccf ; carry is set, so turn it off
|
ccf ; carry is set, so turn it off
|
||||||
ldh a, [hRTCDayLo] ; DL
|
ldh a, [hRTCDayLo]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [wStartDay]
|
ld a, [wStartDay]
|
||||||
adc c
|
adc c
|
||||||
@ -178,7 +177,7 @@ FixTime::
|
|||||||
InitTimeOfDay::
|
InitTimeOfDay::
|
||||||
xor a
|
xor a
|
||||||
ld [wStringBuffer2], a
|
ld [wStringBuffer2], a
|
||||||
ld a, $0 ; useless
|
ld a, 0 ; useless
|
||||||
ld [wStringBuffer2 + 3], a
|
ld [wStringBuffer2 + 3], a
|
||||||
jr InitTime
|
jr InitTime
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user