summaryrefslogtreecommitdiff
path: root/arm9/src
diff options
context:
space:
mode:
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];
+}