diff options
author | Cameron Hall <camthesaxman@users.noreply.github.com> | 2018-02-06 19:45:56 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-06 19:45:56 -0600 |
commit | c79d259508d47a8b5bde5b9060b8fe8c6989bd44 (patch) | |
tree | 912c739848391da17525e57420570b3730053675 /src/engine/rtc.c | |
parent | 5969695b8bbdab5182d0d651bbd2d256a12c0404 (diff) | |
parent | 9a8ec555e68fb143ffe900c778ddb85d5bd145a5 (diff) |
Merge pull request #541 from camthesaxman/german_debug
build German debug version
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 |