summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkira Akashi <rubenru09@aol.com>2021-06-02 01:52:56 +0100
committerGitHub <noreply@github.com>2021-06-02 01:52:56 +0100
commit8571ac60e7ab79a20196f402e76d511fb8302179 (patch)
tree2638ed527d2b2ac0c976c4d417cd8fb9270f5e96
parent389b33f7d8499cab5b3b9e2ba21d786b1059c059 (diff)
parent7e32d3758e7e36d7a67a1442cdb9386f9aa18a6e (diff)
Merge branch 'master' into unkk_020851B8
-rw-r--r--arm9/asm/unk_02033778.s60
-rw-r--r--arm9/src/unk_02033778.c33
-rw-r--r--include/unk_02033778.h9
3 files changed, 42 insertions, 60 deletions
diff --git a/arm9/asm/unk_02033778.s b/arm9/asm/unk_02033778.s
deleted file mode 100644
index 763e7b30..00000000
--- a/arm9/asm/unk_02033778.s
+++ /dev/null
@@ -1,60 +0,0 @@
- .include "asm/macros.inc"
- .include "global.inc"
-
- .text
-
- thumb_func_start FUN_02033778
-FUN_02033778: ; 0x02033778
- push {r3-r7, lr}
- str r0, [sp, #0x0]
- bl FUN_02030F20
- add r7, r0, #0x0
- mov r0, #0x0
- bl FUN_0202DFA4
- cmp r0, #0x0
- beq _020337C6
- mov r5, #0x0
- cmp r7, #0x0
- ble _020337C6
-_02033792:
- bl FUN_02031190
- cmp r5, r0
- beq _020337C0
- add r0, r5, #0x0
- bl FUN_0202E020
- add r4, r0, #0x0
- add r0, r5, #0x0
- bl FUN_0202E044
- add r6, r0, #0x0
- add r0, r5, #0x0
- bl FUN_0202DFA4
- bl PlayerProfile_GetLanguage
- add r3, r0, #0x0
- ldr r0, [sp, #0x0]
- add r1, r4, #0x0
- add r2, r6, #0x0
- bl FUN_020337C8
-_020337C0:
- add r5, r5, #0x1
- cmp r5, r7
- blt _02033792
-_020337C6:
- pop {r3-r7, pc}
-
- thumb_func_start FUN_020337C8
-FUN_020337C8: ; 0x020337C8
- push {r4-r6, lr}
- add r5, r0, #0x0
- add r4, r1, #0x0
- add r6, r2, #0x0
- bl FUN_02029B40
- cmp r0, #0x0
- bne _020337E4
- add r0, r5, #0x0
- add r1, r4, #0x0
- add r2, r6, #0x0
- mov r3, #0x1
- bl FUN_02029B90
-_020337E4:
- pop {r4-r6, pc}
- .balign 4
diff --git a/arm9/src/unk_02033778.c b/arm9/src/unk_02033778.c
new file mode 100644
index 00000000..fa2a67da
--- /dev/null
+++ b/arm9/src/unk_02033778.c
@@ -0,0 +1,33 @@
+#include "global.h"
+#include "unk_02033778.h"
+#include "unk_0202F150.h"
+#include "player_data.h"
+
+extern struct PlayerData *FUN_0202DFA4(s32 param0);
+extern u32 FUN_0202E020(s32 param0);
+extern u32 FUN_0202E044(s32 param0);
+extern u32 FUN_02029B40(u32 param0, u32 param1, u32 param2, u32 language);
+extern void FUN_02029B90(u32 param0, u32 param1, u32 param2, u32 param3);
+
+THUMB_FUNC void FUN_02033778(u32 param0)
+{
+ s32 unk = FUN_02030F20();
+ if (FUN_0202DFA4(0) != NULL)
+ {
+ for (s32 i = 0; i < unk; i++)
+ {
+ if (FUN_02031190() != i)
+ {
+ FUN_020337C8(param0, FUN_0202E020(i), FUN_0202E044(i), PlayerProfile_GetLanguage(FUN_0202DFA4(i)));
+ }
+ }
+ }
+}
+
+THUMB_FUNC void FUN_020337C8(u32 param0, u32 param1, u32 param2, u32 language)
+{
+ if (FUN_02029B40(param0, param1, param2, language) == 0)
+ {
+ FUN_02029B90(param0, param1, param2, 1);
+ }
+}
diff --git a/include/unk_02033778.h b/include/unk_02033778.h
new file mode 100644
index 00000000..e1f64e05
--- /dev/null
+++ b/include/unk_02033778.h
@@ -0,0 +1,9 @@
+#ifndef POKEDIAMOND_UNK_02033778_H
+#define POKEDIAMOND_UNK_02033778_H
+
+#include "nitro/types.h"
+
+void FUN_02033778(u32 param0);
+void FUN_020337C8(u32 param0, u32 param1, u32 param2, u32 language);
+
+#endif //POKEDIAMOND_UNK_02033778_H