summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arm9/asm/unk_02064E20.s25
-rw-r--r--arm9/src/unk_02064E20.c18
-rw-r--r--include/unk_02064E20.h6
3 files changed, 24 insertions, 25 deletions
diff --git a/arm9/asm/unk_02064E20.s b/arm9/asm/unk_02064E20.s
deleted file mode 100644
index 19ada5a3..00000000
--- a/arm9/asm/unk_02064E20.s
+++ /dev/null
@@ -1,25 +0,0 @@
- .include "asm/macros.inc"
- .include "global.inc"
-
- .text
-
- thumb_func_start FUN_02064E20
-FUN_02064E20: ; 0x02064E20
- push {r4, lr}
- bl ScriptEnvironment_GetSav2Ptr
- bl FUN_02024ED8
- add r4, r0, #0x0
- bl FUN_020254B4
- cmp r0, #0x6
- beq _02064E48
- add r0, r4, #0x0
- mov r1, #0x6
- bl FUN_02025490
- add r0, r4, #0x0
- mov r1, #0x6
- bl FUN_020254A0
- mov r1, #0x2
- strh r1, [r0, #0x0]
-_02064E48:
- pop {r4, pc}
- .balign 4
diff --git a/arm9/src/unk_02064E20.c b/arm9/src/unk_02064E20.c
new file mode 100644
index 00000000..270004c5
--- /dev/null
+++ b/arm9/src/unk_02064E20.c
@@ -0,0 +1,18 @@
+#include "global.h"
+#include "script.h"
+#include "scrcmd.h"
+#include "unk_02025484.h"
+#include "unk_02024E64.h"
+#include "unk_02064E20.h"
+
+THUMB_FUNC void FUN_02064E20(struct UnkSavStruct80* unk0)
+{
+ struct unk_2025484 * r4 = (struct unk_2025484 *)FUN_02024ED8(ScriptEnvironment_GetSav2Ptr(unk0));
+ if((u32)FUN_020254B4(r4) == 6)
+ {
+ return;
+ }
+ FUN_02025490(r4, 6);
+ u16 * ptr0 = (u16 *)FUN_020254A0(r4 , 6);
+ ptr0[0] = 2;
+}
diff --git a/include/unk_02064E20.h b/include/unk_02064E20.h
new file mode 100644
index 00000000..5a00f5d1
--- /dev/null
+++ b/include/unk_02064E20.h
@@ -0,0 +1,6 @@
+#ifndef POKEDIAMOND_UNK_02064E20_H
+#define POKEDIAMOND_UNK_02064E20_H
+
+void FUN_02064E20(struct UnkSavStruct80* unk0);
+
+#endif // POKEDIAMOND_UNK_02064E20_H