summaryrefslogtreecommitdiff
path: root/src/engine/rtc.c
diff options
context:
space:
mode:
authorCameron Hall <cameronghall@cox.net>2018-01-16 22:25:35 -0600
committerCameron Hall <cameronghall@cox.net>2018-01-16 22:25:35 -0600
commit91cfb6a564f73f02eb57792f8a0f4aa82e1867d1 (patch)
tree16c7a1de365dabdd85dcc3621ea366fb79a5282c /src/engine/rtc.c
parent6b5a7d8611103ab2ee0210dc6d87bd42f4e3317f (diff)
add debug ifdefs
Diffstat (limited to 'src/engine/rtc.c')
-rw-r--r--src/engine/rtc.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/engine/rtc.c b/src/engine/rtc.c
index d73f943d2..a56fcd44e 100644
--- a/src/engine/rtc.c
+++ b/src/engine/rtc.c
@@ -268,6 +268,28 @@ void FormatHexDate(u8 *dest, s32 year, s32 month, s32 day)
*dest = EOS;
}
+#ifdef DEBUG
+
+void debug_sub_800987C(u8 *dest)
+{
+ FormatHexDate(dest, sRtc.year, sRtc.month, sRtc.day);
+}
+
+void debug_sub_8009894(u8 *dest)
+{
+ u16 dayCount;
+
+ dayCount = RtcGetDayCount(&sRtc);
+ ConvertIntToDecimalStringN(dest, dayCount, STR_CONV_MODE_RIGHT_ALIGN, 4);
+}
+
+void debug_sub_80098B8(u8 *dest)
+{
+ ConvertIntToHexStringN(dest, sRtc.status, STR_CONV_MODE_LEADING_ZEROS, 2);
+}
+
+#endif
+
void RtcCalcTimeDifference(struct SiiRtcInfo *rtc, struct Time *result, struct Time *t)
{
u16 days = RtcGetDayCount(rtc);
@@ -347,3 +369,10 @@ u32 RtcGetMinuteCount()
RtcGetInfo(&sRtc);
return (24 * 60) * RtcGetDayCount(&sRtc) + 60 * sRtc.hour + sRtc.minute;
}
+
+#ifdef DEBUG
+void debug_sub_8009A60()
+{
+ RtcGetRawInfo(&sRtc);
+}
+#endif