summaryrefslogtreecommitdiff
path: root/src/rtc.c
diff options
context:
space:
mode:
authorDizzyEggg <jajkodizzy@wp.pl>2017-09-02 23:37:06 +0200
committerDizzyEggg <jajkodizzy@wp.pl>2017-09-02 23:37:06 +0200
commite0725bca55b2c2e081ea4cee0c4bea9ec5533164 (patch)
tree2b3c7adf92e59055883634da6b0df3f449740f7c /src/rtc.c
parent048700fe579834f6933bb0488e2ab37782cbe7fe (diff)
move variables to rtc.c
Diffstat (limited to 'src/rtc.c')
-rw-r--r--src/rtc.c32
1 files changed, 25 insertions, 7 deletions
diff --git a/src/rtc.c b/src/rtc.c
index 7dabb2efa..ca8b9567e 100644
--- a/src/rtc.c
+++ b/src/rtc.c
@@ -3,16 +3,34 @@
#include "string_util.h"
#include "text.h"
-extern u16 sErrorStatus;
-extern struct SiiRtcInfo sRtc;
-extern u8 sProbeResult;
-extern u16 sSavedIme;
+// iwram bss
+IWRAM_DATA static u16 sErrorStatus;
+IWRAM_DATA static struct SiiRtcInfo sRtc;
+IWRAM_DATA static u8 sProbeResult;
+IWRAM_DATA static u16 sSavedIme;
-extern struct Time gLocalTime;
+// iwram common
+struct Time gLocalTime;
-extern const struct SiiRtcInfo sRtcDummy;
+// const rom
-extern const s32 sNumDaysInMonths[12];
+static const struct SiiRtcInfo sRtcDummy = {0, MONTH_JAN, 1}; // 2000 Jan 1
+
+static const s32 sNumDaysInMonths[12] =
+{
+ 31,
+ 28,
+ 31,
+ 30,
+ 31,
+ 30,
+ 31,
+ 31,
+ 30,
+ 31,
+ 30,
+ 31,
+};
void RtcDisableInterrupts(void)
{