summaryrefslogtreecommitdiff
path: root/home/rtc.asm
diff options
context:
space:
mode:
Diffstat (limited to 'home/rtc.asm')
-rw-r--r--home/rtc.asm41
1 files changed, 21 insertions, 20 deletions
diff --git a/home/rtc.asm b/home/rtc.asm
index e2fa121f..4b950ac6 100644
--- a/home/rtc.asm
+++ b/home/rtc.asm
@@ -1,21 +1,22 @@
-Function343::
- ld a, [$c1cd] ; 343
- cp $0 ; 346
- ret z ; 348
- call Function467 ; 349
- ld a, [$cfe5] ; 34c
- bit 0, a ; 34f
- ret z ; 351
-Function352::
- ld hl, $4366 ; 352
- ld a, $23 ; 355
- rst FarCall ; 357
- ret ; 358
-; 359
+Function343:: ; 343
+; update time and time-sensitive palettes
-Function359::
- ld hl, $4397 ; 359
- ld a, $23 ; 35c
- rst FarCall ; 35e
- ret ; 35f
-; 360
+; rtc enabled?
+ ld a, [wRTCEnabled]
+ cp 0
+ ret z
+
+ call UpdateTime
+
+; obj update on?
+ ld a, [wVramState]
+ bit 0, a
+ ret z
+
+TimeOfDayPals:: ; 352
+ callab _TimeOfDayPals
+ ret
+
+UpdateTimePals:: ; 359
+ callab _UpdateTimePals
+ ret