summaryrefslogtreecommitdiff
path: root/arm9/src/unk_02015E30.c
diff options
context:
space:
mode:
Diffstat (limited to 'arm9/src/unk_02015E30.c')
-rw-r--r--arm9/src/unk_02015E30.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/arm9/src/unk_02015E30.c b/arm9/src/unk_02015E30.c
new file mode 100644
index 00000000..8be466fb
--- /dev/null
+++ b/arm9/src/unk_02015E30.c
@@ -0,0 +1,35 @@
+
+#include "unk_02015E30.h"
+
+struct UnkStruct_02015E30 UNK_021C4898;
+
+THUMB_FUNC void FUN_02015E30()
+{
+ UNK_021C4898.unk00 = 0;
+}
+
+THUMB_FUNC void FUN_02015E3C(struct IGT *igt)
+{
+ struct UnkStruct_02015E30 *unk1 = &UNK_021C4898;
+ UNK_021C4898.unk00 = 1;
+ UNK_021C4898.unk10 = 0;
+ UNK_021C4898.unk14 = 0;
+ UNK_021C4898.unk08 = 0;
+ UNK_021C4898.unk04 = igt;
+
+ UNK_021C4898.unk18 = GetTimer3Count();
+}
+
+THUMB_FUNC void FUN_02015E60()
+{
+ if (UNK_021C4898.unk00 != 0)
+ {
+ u64 res = Timer3CountToSeconds(GetTimer3Count() - UNK_021C4898.unk18);
+
+ if (UNK_021C4898.unk08 < res)
+ {
+ AddIGTSeconds(UNK_021C4898.unk04, (u32)(res - UNK_021C4898.unk08));
+ UNK_021C4898.unk08 = res;
+ }
+ }
+}