summaryrefslogtreecommitdiff
path: root/arm9/src
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2020-08-03 12:54:10 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2020-08-03 15:58:18 -0400
commit4adfd8ba02e692e56c68c3e0dc3cd28fb04e9341 (patch)
tree72ce71b219776150a9892958ba6724db34a8d26e /arm9/src
parentf386f7082e96fe7d550b01f8844084d8ff3b80f7 (diff)
Decompile unk_02015CC0.s
Diffstat (limited to 'arm9/src')
-rw-r--r--arm9/src/unk_02015CC0.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/arm9/src/unk_02015CC0.c b/arm9/src/unk_02015CC0.c
new file mode 100644
index 00000000..5da221d0
--- /dev/null
+++ b/arm9/src/unk_02015CC0.c
@@ -0,0 +1,31 @@
+#include "global.h"
+#include "unk_02015CC0.h"
+
+#pragma thumb on
+
+const u16 UNK_020ED72C[] = {
+ 0,
+ 2000,
+ 3000
+};
+
+int FUN_02015CC0(u16 a0)
+{
+ int i;
+ for (i = 0; i < (int)NELEMS(UNK_020ED72C) - 1; i++) {
+ if (a0 < UNK_020ED72C[i + 1])
+ return i;
+ }
+ return i;
+}
+
+int FUN_02015CE0(u16 a0)
+{
+ return a0 - UNK_020ED72C[FUN_02015CC0(a0)];
+}
+
+int FUN_02015CF8(int a0, int a1)
+{
+ GF_ASSERT(a0 < (int)NELEMS(UNK_020ED72C));
+ return a1 + UNK_020ED72C[a0];
+}