summaryrefslogtreecommitdiff
path: root/arm9/src
diff options
context:
space:
mode:
authorAkira Akashi <rubenru09@aol.com>2021-03-19 20:18:27 +0000
committerGitHub <noreply@github.com>2021-03-19 20:18:27 +0000
commite2efdddfacd3c9453fda373d83e5078cd4f25a09 (patch)
tree9d46de7614c657019c83f7d8fb9fbe2b465035c9 /arm9/src
parent885d7c10805d581e4758e57ada3908b5dc9eded7 (diff)
parent2b1cbfa8627fc799a53c6dfb5356dbcb10000126 (diff)
Merge pull request #338 from remicalixte/unk_02015E30
Decompile unk_02015E30.s
Diffstat (limited to 'arm9/src')
-rw-r--r--arm9/src/unk_02015E30.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/arm9/src/unk_02015E30.c b/arm9/src/unk_02015E30.c
new file mode 100644
index 00000000..d52fb236
--- /dev/null
+++ b/arm9/src/unk_02015E30.c
@@ -0,0 +1,38 @@
+
+#include "unk_02015E30.h"
+
+extern u64 FUN_02020BF4();
+extern u64 FUN_02020C14(u64 param0);
+
+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 = FUN_02020BF4();
+}
+
+THUMB_FUNC void FUN_02015E60()
+{
+ if (UNK_021C4898.unk00 != 0)
+ {
+ u64 res = FUN_02020C14(FUN_02020BF4() - UNK_021C4898.unk18);
+
+ if (UNK_021C4898.unk08 < res)
+ {
+ AddIGTSeconds(UNK_021C4898.unk04, (u32)(res - UNK_021C4898.unk08));
+ UNK_021C4898.unk08 = res;
+ }
+ }
+}