diff options
author | ProjectRevoTPP <projectrevotpp@hotmail.com> | 2018-02-17 22:03:02 -0500 |
---|---|---|
committer | ProjectRevoTPP <projectrevotpp@hotmail.com> | 2018-02-17 22:03:02 -0500 |
commit | de302527c3eb7fae0c09236b6d405ea64f579845 (patch) | |
tree | b692c7e99ed61fd558f59feed5a77f768cb05744 /src/engine/rtc.c | |
parent | 08a79136313ec5d82d1e62f3c9bcd2c9967a9e89 (diff) | |
parent | 28987bb1cd0e6864257ff0434508dddcddb22e98 (diff) |
Merge branch 'master' of https://github.com/pret/pokeruby into evobjmv
Diffstat (limited to 'src/engine/rtc.c')
-rw-r--r-- | src/engine/rtc.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/engine/rtc.c b/src/engine/rtc.c index d73f943d2..5462298ed 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; } +#if 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; } + +#if DEBUG +void debug_sub_8009A60() +{ + RtcGetRawInfo(&sRtc); +} +#endif |