summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arm9/asm/scrcmd.s26
-rw-r--r--arm9/asm/scrcmd_21.s4
-rw-r--r--arm9/asm/unk_02029FB0.s2
-rw-r--r--arm9/asm/unk_0202C144.s2
-rw-r--r--arm9/asm/unk_02035068.s2
-rw-r--r--arm9/asm/unk_02060CCC.s24
-rw-r--r--arm9/asm/unk_02064E90.s6
-rw-r--r--arm9/asm/unk_0206C700.s4
-rw-r--r--arm9/asm/unk_02080C38.s2
-rw-r--r--arm9/asm/unk_02087A1C.s65
-rw-r--r--arm9/asm/unk_02088F0C.s2
-rw-r--r--arm9/global.inc44
-rw-r--r--arm9/modules/05/asm/module_05.s4
-rw-r--r--arm9/modules/06/asm/module_06.s6
-rw-r--r--arm9/modules/11/asm/module_11_thumb2.s10
-rw-r--r--arm9/modules/16/asm/module_16.s26
-rw-r--r--arm9/modules/23/asm/module_23.s2
-rw-r--r--arm9/modules/80/asm/module_80.s8
-rw-r--r--arm9/modules/83/asm/module_83.s6
-rw-r--r--arm9/modules/84/asm/module_84_thumb2.s2
-rw-r--r--arm9/src/pokedex.c258
-rw-r--r--arm9/src/unk_02087A1C.c69
-rw-r--r--include/config.h1
-rw-r--r--include/pokedex.h90
-rw-r--r--include/unk_02087A1C.h5
25 files changed, 339 insertions, 331 deletions
diff --git a/arm9/asm/scrcmd.s b/arm9/asm/scrcmd.s
index 482f814b..8f2956b7 100644
--- a/arm9/asm/scrcmd.s
+++ b/arm9/asm/scrcmd.s
@@ -6724,7 +6724,7 @@ FUN_0203CF04: ; 0x0203CF04
bl GetVarPointer
add r5, r0, #0x0
add r0, r4, #0x0
- bl FUN_020244A4
+ bl Pokedex_CountSinnohDexSeenMons
strh r0, [r5, #0x0]
mov r0, #0x0
pop {r3-r5, pc}
@@ -6747,7 +6747,7 @@ FUN_0203CF34: ; 0x0203CF34
bl GetVarPointer
add r5, r0, #0x0
add r0, r4, #0x0
- bl FUN_0202445C
+ bl Pokedex_CountSinnohDexCaughtMons
strh r0, [r5, #0x0]
mov r0, #0x0
pop {r3-r5, pc}
@@ -6770,7 +6770,7 @@ FUN_0203CF64: ; 0x0203CF64
bl GetVarPointer
add r5, r0, #0x0
add r0, r4, #0x0
- bl FUN_02024404
+ bl Pokedex_CountNationalDexSeenMons
strh r0, [r5, #0x0]
mov r0, #0x0
pop {r3-r5, pc}
@@ -6793,7 +6793,7 @@ FUN_0203CF94: ; 0x0203CF94
bl GetVarPointer
add r5, r0, #0x0
add r0, r4, #0x0
- bl FUN_020243C8
+ bl Pokedex_CountNationalDexCaughtMons
strh r0, [r5, #0x0]
mov r0, #0x0
pop {r3-r5, pc}
@@ -6834,7 +6834,7 @@ FUN_0203CFC8: ; 0x0203CFC8
cmp r6, #0x0
bne _0203D02E
add r0, r7, #0x0
- bl FUN_02024550
+ bl Pokedex_CountSinnohDexSeenMons_OmitMythicals
add r5, #0x80
add r6, r0, #0x0
ldr r0, [r5, #0x0]
@@ -6851,7 +6851,7 @@ FUN_0203CFC8: ; 0x0203CFC8
b _0203D048
_0203D02E:
add r0, r7, #0x0
- bl FUN_02024518
+ bl Pokedex_CountNationalDexCaughtMons_OmitMythicals
add r5, r0, #0x0
ldr r0, [sp, #0x0]
bl PlayerProfile_GetTrainerGender
@@ -9317,7 +9317,7 @@ FUN_0203E3D0: ; 0x0203E3D0
mov r0, #0x0
strh r0, [r4, #0x0]
add r0, r5, #0x0
- bl FUN_02024504
+ bl Pokedex_HasCompletedSinnohDex
cmp r0, #0x1
bne _0203E404
mov r0, #0x1
@@ -9345,7 +9345,7 @@ FUN_0203E408: ; 0x0203E408
mov r0, #0x0
strh r0, [r4, #0x0]
add r0, r5, #0x0
- bl FUN_020244EC
+ bl Pokedex_HasCompletedNationalDex
cmp r0, #0x1
bne _0203E43C
mov r0, #0x1
@@ -9775,7 +9775,7 @@ FUN_0203E774: ; 0x0203E774
bl GetVarPointer
str r0, [sp, #0x0]
add r0, r7, #0x0
- bl FUN_020244A4
+ bl Pokedex_CountSinnohDexSeenMons
add r4, r0, #0x0
bl LCRandom
add r1, r4, #0x0
@@ -9790,7 +9790,7 @@ FUN_0203E774: ; 0x0203E774
_0203E7B6:
add r0, r7, #0x0
add r1, r4, #0x0
- bl FUN_020245F0
+ bl Pokedex_CheckMonSeenFlag
cmp r0, #0x1
bne _0203E7DC
add r0, r4, #0x0
@@ -10490,7 +10490,7 @@ FUN_0203ED2C: ; 0x0203ED2C
bl CreateMon
add r0, r6, #0x0
add r1, r4, #0x0
- bl FUN_0202498C
+ bl Pokedex_SetMonSeenFlag
add r0, r4, #0x0
bl FreeToHeap
add sp, #0x10
@@ -10733,7 +10733,7 @@ _0203EF18:
bl CalcMonLevelAndStats
add r0, r7, #0x0
add r1, r4, #0x0
- bl FUN_02024AF0
+ bl Pokedex_SetMonCaughtFlag
_0203EF48:
add r5, r5, #0x1
cmp r5, r6
@@ -11452,7 +11452,7 @@ FUN_0203F4D8: ; 0x0203F4D8
bl GetVarPointer
add r5, r0, #0x0
add r0, r4, #0x0
- bl FUN_0202471C
+ bl Pokedex_CountSeenUnown
strh r0, [r5, #0x0]
mov r0, #0x0
pop {r3-r5, pc}
diff --git a/arm9/asm/scrcmd_21.s b/arm9/asm/scrcmd_21.s
index 900a2f2b..a831ff21 100644
--- a/arm9/asm/scrcmd_21.s
+++ b/arm9/asm/scrcmd_21.s
@@ -26,7 +26,7 @@ FUN_020453F4: ; 0x020453F4
bl GetVarPointer
add r5, r0, #0x0
add r0, r4, #0x0
- bl FUN_02024D64
+ bl Pokedex_GetSinnohDexFlag
strh r0, [r5, #0x0]
mov r0, #0x0
pop {r3-r5, pc}
@@ -39,7 +39,7 @@ FUN_02045424: ; 0x02045424
ldr r0, [r0, #0x0]
ldr r0, [r0, #0xc]
bl FUN_02024DA0
- bl FUN_02024D80
+ bl Pokedex_SetSinnohDexFlag
mov r0, #0x0
pop {r3, pc}
diff --git a/arm9/asm/unk_02029FB0.s b/arm9/asm/unk_02029FB0.s
index da0a42d2..ac457105 100644
--- a/arm9/asm/unk_02029FB0.s
+++ b/arm9/asm/unk_02029FB0.s
@@ -323,7 +323,7 @@ FUN_0202A1C4: ; 0x0202A1C4
add r4, r0, #0x0
add r0, r1, #0x0
add r1, r2, #0x0
- bl FUN_02024594
+ bl Pokedex_CheckMonCaughtFlag
cmp r0, #0x0
bne _0202A1DC
add r0, r4, #0x0
diff --git a/arm9/asm/unk_0202C144.s b/arm9/asm/unk_0202C144.s
index e6448c07..7aacf6eb 100644
--- a/arm9/asm/unk_0202C144.s
+++ b/arm9/asm/unk_0202C144.s
@@ -32,7 +32,7 @@ FUN_0202C144: ; 0x0202C144
bl FUN_0202A1C4
add r0, r6, #0x0
add r1, r4, #0x0
- bl FUN_02024AF0
+ bl Pokedex_SetMonCaughtFlag
add r0, r5, #0x0
bl Sav2_Poketch_get
add r1, r4, #0x0
diff --git a/arm9/asm/unk_02035068.s b/arm9/asm/unk_02035068.s
index c03af51e..deb0f8eb 100644
--- a/arm9/asm/unk_02035068.s
+++ b/arm9/asm/unk_02035068.s
@@ -317,7 +317,7 @@ FUN_02035270: ; 0x02035270
ldr r0, [r5, #0xc]
mov r4, #0x0
bl FUN_02024DA0
- bl FUN_02024D64
+ bl Pokedex_GetSinnohDexFlag
cmp r0, #0x0
bne _02035288
mov r0, #0x1
diff --git a/arm9/asm/unk_02060CCC.s b/arm9/asm/unk_02060CCC.s
index 0f319d3c..6c9dcb7d 100644
--- a/arm9/asm/unk_02060CCC.s
+++ b/arm9/asm/unk_02060CCC.s
@@ -835,7 +835,7 @@ FUN_020611E8: ; 0x020611E8
add r1, r0, #0x0
ldrh r1, [r1, #0x6]
add r0, r4, #0x0
- bl FUN_020245F0
+ bl Pokedex_CheckMonSeenFlag
pop {r3-r5, pc}
.balign 4
@@ -921,7 +921,7 @@ _0206129E:
ldr r0, [r5, #0xc]
bl FUN_02024DA0
ldrh r1, [r4, #0x0]
- bl FUN_020245F0
+ bl Pokedex_CheckMonSeenFlag
pop {r3-r5, pc}
thumb_func_start FUN_020612AC
@@ -1137,7 +1137,7 @@ FUN_02061444: ; 0x02061444
ldr r0, [r5, #0xc]
bl FUN_02024DA0
ldrh r1, [r4, #0x0]
- bl FUN_020245F0
+ bl Pokedex_CheckMonSeenFlag
pop {r3-r5, pc}
.balign 4
@@ -1228,7 +1228,7 @@ FUN_020614FC: ; 0x020614FC
add r1, r0, #0x0
ldrh r1, [r1, #0x0]
add r0, r4, #0x0
- bl FUN_020245F0
+ bl Pokedex_CheckMonSeenFlag
pop {r3-r5, pc}
.balign 4
@@ -1355,7 +1355,7 @@ FUN_020615F8: ; 0x020615F8
add r1, r0, #0x0
ldrh r1, [r1, #0x0]
add r0, r4, #0x0
- bl FUN_020245F0
+ bl Pokedex_CheckMonSeenFlag
pop {r3-r5, pc}
.balign 4
@@ -1425,7 +1425,7 @@ FUN_02061688: ; 0x02061688
ldr r0, [r5, #0xc]
bl FUN_02024DA0
ldrh r1, [r4, #0x0]
- bl FUN_020245F0
+ bl Pokedex_CheckMonSeenFlag
pop {r3-r5, pc}
.balign 4
@@ -1634,7 +1634,7 @@ FUN_02061834: ; 0x02061834
ldr r0, [r5, #0xc]
bl FUN_02024DA0
ldrh r1, [r4, #0x0]
- bl FUN_020245F0
+ bl Pokedex_CheckMonSeenFlag
pop {r3-r5, pc}
.balign 4
@@ -1816,7 +1816,7 @@ FUN_02061990: ; 0x02061990
ldr r0, [r5, #0xc]
bl FUN_02024DA0
ldrh r1, [r4, #0x2]
- bl FUN_020245F0
+ bl Pokedex_CheckMonSeenFlag
cmp r0, #0x0
bne _020619B0
mov r0, #0x0
@@ -1922,7 +1922,7 @@ FUN_02061A70: ; 0x02061A70
ldr r0, [r5, #0xc]
bl FUN_02024DA0
ldrh r1, [r4, #0x0]
- bl FUN_020245F0
+ bl Pokedex_CheckMonSeenFlag
pop {r3-r5, pc}
.balign 4
@@ -2275,7 +2275,7 @@ FUN_02061D30: ; 0x02061D30
ldr r0, [r5, #0xc]
bl FUN_02024DA0
ldrh r1, [r4, #0x0]
- bl FUN_020245F0
+ bl Pokedex_CheckMonSeenFlag
pop {r3-r5, pc}
.balign 4
@@ -2422,7 +2422,7 @@ FUN_02061E60: ; 0x02061E60
ldr r0, [r5, #0xc]
bl FUN_02024DA0
ldrh r1, [r4, #0x2]
- bl FUN_020245F0
+ bl Pokedex_CheckMonSeenFlag
pop {r3-r5, pc}
.balign 4
@@ -2482,7 +2482,7 @@ FUN_02061EDC: ; 0x02061EDC
ldr r0, [r5, #0xc]
bl FUN_02024DA0
ldrh r1, [r4, #0x0]
- bl FUN_020245F0
+ bl Pokedex_CheckMonSeenFlag
pop {r3-r5, pc}
.balign 4
diff --git a/arm9/asm/unk_02064E90.s b/arm9/asm/unk_02064E90.s
index ea21d648..ac0ad8a0 100644
--- a/arm9/asm/unk_02064E90.s
+++ b/arm9/asm/unk_02064E90.s
@@ -49,11 +49,11 @@ FUN_02064E90: ; 0x02064E90
str r0, [sp, #0x34]
ldr r0, [r6, #0xc]
bl FUN_02024DA0
- bl FUN_02024440
+ bl Pokedex_CountSeenMons
str r0, [sp, #0x38]
ldr r0, [r6, #0xc]
bl FUN_02024DA0
- bl FUN_02024D64
+ bl Pokedex_GetSinnohDexFlag
str r0, [sp, #0x3c]
add r0, r4, #0x0
bl FUN_0202A1B8
@@ -239,7 +239,7 @@ FUN_02065078: ; 0x02065078
_020650A8:
add r0, r7, #0x0
bl FUN_02024DA0
- bl FUN_020244EC
+ bl Pokedex_HasCompletedNationalDex
cmp r0, #0x0
beq _020650BC
add r0, r4, #0x1
diff --git a/arm9/asm/unk_0206C700.s b/arm9/asm/unk_0206C700.s
index 39550e2a..f23632f0 100644
--- a/arm9/asm/unk_0206C700.s
+++ b/arm9/asm/unk_0206C700.s
@@ -1096,7 +1096,7 @@ _0206CFFA:
bne _0206D084
ldr r0, [r4, #0x48]
ldr r1, [r4, #0x28]
- bl FUN_02024AF0
+ bl Pokedex_SetMonCaughtFlag
ldr r0, [r4, #0x50]
mov r1, #0xc
bl FUN_0202A0E8
@@ -2198,7 +2198,7 @@ _0206D8EA:
bl AddMonToParty
ldr r0, [r4, #0x48]
add r1, r5, #0x0
- bl FUN_02024AF0
+ bl Pokedex_SetMonCaughtFlag
ldr r0, [r4, #0x50]
mov r1, #0xc
bl FUN_0202A0E8
diff --git a/arm9/asm/unk_02080C38.s b/arm9/asm/unk_02080C38.s
index 80943988..4e6969ab 100644
--- a/arm9/asm/unk_02080C38.s
+++ b/arm9/asm/unk_02080C38.s
@@ -3657,7 +3657,7 @@ _0208274C:
_02082762:
ldr r1, [r5, #0x0]
add r0, r7, #0x0
- bl FUN_0202498C
+ bl Pokedex_SetMonSeenFlag
add r6, r6, #0x1
add r5, r5, #0x4
cmp r6, #0x4
diff --git a/arm9/asm/unk_02087A1C.s b/arm9/asm/unk_02087A1C.s
deleted file mode 100644
index 89e18978..00000000
--- a/arm9/asm/unk_02087A1C.s
+++ /dev/null
@@ -1,65 +0,0 @@
- .include "asm/macros.inc"
- .include "global.inc"
-
- .section .rodata
-
- .global UNK_020FD120
-UNK_020FD120: ; 0x020FD120
- .byte 0x17, 0x00, 0x19, 0x00, 0x36, 0x00, 0x4D, 0x00, 0x78, 0x00, 0x81, 0x00, 0xCA, 0x00, 0xD6, 0x00
- .byte 0xD7, 0x00, 0xD8, 0x00, 0xE4, 0x00, 0x16, 0x01, 0x1F, 0x01, 0x3B, 0x01
-
- .global UNK_020FD13C
-UNK_020FD13C: ; 0x020FD13C
- .byte 0x01, 0x02, 0x03, 0x05, 0x04, 0x07
-
- .text
-
- thumb_func_start FUN_02087A1C
-FUN_02087A1C: ; 0x02087A1C
- ldr r3, _02087A34 ; =UNK_020FD13C
- mov r2, #0x0
-_02087A20:
- ldrb r1, [r3, #0x0]
- cmp r0, r1
- beq _02087A2E
- add r2, r2, #0x1
- add r3, r3, #0x1
- cmp r2, #0x6
- blt _02087A20
-_02087A2E:
- add r0, r2, #0x0
- bx lr
- nop
-_02087A34: .word UNK_020FD13C
-
- thumb_func_start FUN_02087A38
-FUN_02087A38: ; 0x02087A38
- push {r4, lr}
- add r4, r0, #0x0
- cmp r4, #0x6
- blt _02087A44
- bl ErrorHandling
-_02087A44:
- ldr r0, _02087A4C ; =UNK_020FD13C
- ldrb r0, [r0, r4]
- pop {r4, pc}
- nop
-_02087A4C: .word UNK_020FD13C
-
- thumb_func_start FUN_02087A50
-FUN_02087A50: ; 0x02087A50
- ldr r3, _02087A68 ; =UNK_020FD120
- mov r2, #0x0
-_02087A54:
- ldrh r1, [r3, #0x0]
- cmp r0, r1
- beq _02087A62
- add r2, r2, #0x1
- add r3, r3, #0x2
- cmp r2, #0xe
- blt _02087A54
-_02087A62:
- add r0, r2, #0x0
- bx lr
- nop
-_02087A68: .word UNK_020FD120
diff --git a/arm9/asm/unk_02088F0C.s b/arm9/asm/unk_02088F0C.s
index 490492fa..1c3bc9f2 100644
--- a/arm9/asm/unk_02088F0C.s
+++ b/arm9/asm/unk_02088F0C.s
@@ -640,7 +640,7 @@ FUN_02088FA0: ; 0x02088FA0
_02088FBE:
ldrh r1, [r5, #0x0]
ldr r0, [sp, #0x8]
- bl FUN_020245F0
+ bl Pokedex_CheckMonSeenFlag
cmp r0, #0x0
beq _02088FEC
ldrh r3, [r5, #0x0]
diff --git a/arm9/global.inc b/arm9/global.inc
index 754dfe33..95d01e4b 100644
--- a/arm9/global.inc
+++ b/arm9/global.inc
@@ -1538,21 +1538,21 @@
.extern Sav2_Pokedex_new
.extern Sav2_Pokedex_Copy
.extern Sav2_Pokedex_init
-.extern FUN_020243C8
-.extern FUN_02024404
-.extern FUN_02024440
-.extern FUN_0202445C
-.extern FUN_020244A4
-.extern FUN_020244EC
-.extern FUN_02024504
-.extern FUN_02024518
-.extern FUN_02024550
-.extern FUN_02024594
-.extern FUN_020245F0
-.extern FUN_02024648
+.extern Pokedex_CountNationalDexCaughtMons
+.extern Pokedex_CountNationalDexSeenMons
+.extern Pokedex_CountSeenMons
+.extern Pokedex_CountSinnohDexCaughtMons
+.extern Pokedex_CountSinnohDexSeenMons
+.extern Pokedex_HasCompletedNationalDex
+.extern Pokedex_HasCompletedSinnohDex
+.extern Pokedex_CountNationalDexCaughtMons_OmitMythicals
+.extern Pokedex_CountSinnohDexSeenMons_OmitMythicals
+.extern Pokedex_CheckMonCaughtFlag
+.extern Pokedex_CheckMonSeenFlag
+.extern Pokedex_GetSeenSpindaPersonality
.extern FUN_02024674
-.extern FUN_020246DC
-.extern FUN_0202471C
+.extern Pokedex_GetSeenUnownI
+.extern Pokedex_CountSeenUnown
.extern FUN_02024748
.extern FUN_020247A4
.extern FUN_020247C8
@@ -1563,17 +1563,17 @@
.extern FUN_0202490C
.extern FUN_02024930
.extern FUN_02024970
-.extern FUN_0202498C
-.extern FUN_02024AF0
+.extern Pokedex_SetMonSeenFlag
+.extern Pokedex_SetMonCaughtFlag
.extern Pokedex_SetNatDexFlag
.extern Pokedex_GetNatDexFlag
.extern FUN_02024CC4
.extern FUN_02024CE0
-.extern FUN_02024D00
+.extern Pokedex_GetMeisterFlagBySpeciesAndLanguage
.extern FUN_02024D4C
.extern FUN_02024D58
-.extern FUN_02024D64
-.extern FUN_02024D80
+.extern Pokedex_GetSinnohDexFlag
+.extern Pokedex_SetSinnohDexFlag
.extern FUN_02024DA0
.extern FUN_02024DAC
.extern FUN_02024E64
@@ -5393,9 +5393,9 @@
.extern FUN_02086F8C
.extern FUN_02086F98
.extern FUN_02086FA8
-.extern FUN_02087A1C
-.extern FUN_02087A38
-.extern FUN_02087A50
+.extern GetMeisterLanguageIdx
+.extern GetMeisterLanguage
+.extern GetMeisterSpeciesIdx
.extern FUN_02087A6C
.extern FUN_02087A84
.extern FUN_02087A98
diff --git a/arm9/modules/05/asm/module_05.s b/arm9/modules/05/asm/module_05.s
index 2244fdd6..1c4bc742 100644
--- a/arm9/modules/05/asm/module_05.s
+++ b/arm9/modules/05/asm/module_05.s
@@ -6326,11 +6326,11 @@ MOD05_021E8310: ; 0x021E8310
bl FUN_02034824
str r0, [r5, #4]
add r0, r7, #0
- bl FUN_02024D64
+ bl Pokedex_GetSinnohDexFlag
cmp r0, #0
beq _021E8344
add r0, r7, #0
- bl FUN_02024440
+ bl Pokedex_CountSeenMons
b _021E8346
_021E8344:
mov r0, #0
diff --git a/arm9/modules/06/asm/module_06.s b/arm9/modules/06/asm/module_06.s
index dd12992e..58a3eca1 100644
--- a/arm9/modules/06/asm/module_06.s
+++ b/arm9/modules/06/asm/module_06.s
@@ -21819,7 +21819,7 @@ _02244264:
add r7, r0, #0
ldr r0, [sp, #0x18]
add r1, r7, #0
- bl FUN_020245F0
+ bl Pokedex_CheckMonSeenFlag
cmp r0, #0
beq _0224429E
ldr r0, [sp, #0x10]
@@ -32179,7 +32179,7 @@ MOD06_02249184: ; 0x02249184
push {r3, lr}
ldr r0, [r0, #0xc]
bl FUN_02024DA0
- bl FUN_02024504
+ bl Pokedex_HasCompletedSinnohDex
pop {r3, pc}
.align 2, 0
@@ -32188,7 +32188,7 @@ MOD06_02249194: ; 0x02249194
push {r3, lr}
ldr r0, [r0, #0xc]
bl FUN_02024DA0
- bl FUN_02024D64
+ bl Pokedex_GetSinnohDexFlag
pop {r3, pc}
.align 2, 0
diff --git a/arm9/modules/11/asm/module_11_thumb2.s b/arm9/modules/11/asm/module_11_thumb2.s
index ba099f93..fb098d96 100644
--- a/arm9/modules/11/asm/module_11_thumb2.s
+++ b/arm9/modules/11/asm/module_11_thumb2.s
@@ -4744,7 +4744,7 @@ MOD11_022315C0: ; 0x022315C0
_022315FE:
ldr r0, [r5, #0x60]
add r1, r6, #0
- bl FUN_0202498C
+ bl Pokedex_SetMonSeenFlag
_02231606:
mov r0, #1
tst r0, r4
@@ -4759,7 +4759,7 @@ _02231606:
bne _02231626
ldr r0, [r5, #0x60]
add r1, r6, #0
- bl FUN_02024AF0
+ bl Pokedex_SetMonCaughtFlag
_02231626:
pop {r4, r5, r6, pc}
@@ -4790,20 +4790,20 @@ MOD11_02231628: ; 0x02231628
bl MOD11_02230014
add r1, r0, #0
ldr r0, [r5, #0x60]
- bl FUN_02024AF0
+ bl Pokedex_SetMonCaughtFlag
_02231664:
pop {r3, r4, r5, pc}
.align 2, 0
thumb_func_start MOD11_02231668
MOD11_02231668: ; 0x02231668
- ldr r3, _02231674 ; =FUN_02024594
+ ldr r3, _02231674 ; =Pokedex_CheckMonCaughtFlag
lsl r1, r1, #0x10
ldr r0, [r0, #0x60]
lsr r1, r1, #0x10
bx r3
nop
-_02231674: .word FUN_02024594
+_02231674: .word Pokedex_CheckMonCaughtFlag
thumb_func_start MOD11_02231678
MOD11_02231678: ; 0x02231678
diff --git a/arm9/modules/16/asm/module_16.s b/arm9/modules/16/asm/module_16.s
index 1448cc55..33ec12da 100644
--- a/arm9/modules/16/asm/module_16.s
+++ b/arm9/modules/16/asm/module_16.s
@@ -4732,7 +4732,7 @@ MOD16_021D98EC: ; 0x021D98EC
_021D98FA:
ldr r0, [r5]
add r1, r4, #0
- bl FUN_020246DC
+ bl Pokedex_GetSeenUnownI
pop {r3, r4, r5, pc}
thumb_func_end MOD16_021D98EC
@@ -4882,11 +4882,11 @@ _021D99F0:
thumb_func_start MOD16_021D99F4
MOD16_021D99F4: ; 0x021D99F4
- ldr r3, _021D99FC ; =FUN_0202471C
+ ldr r3, _021D99FC ; =Pokedex_CountSeenUnown
ldr r0, [r0]
bx r3
nop
-_021D99FC: .word FUN_0202471C
+_021D99FC: .word Pokedex_CountSeenUnown
thumb_func_end MOD16_021D99F4
thumb_func_start MOD16_021D9A00
@@ -4927,12 +4927,12 @@ _021D9A2C: .word FUN_0202490C
thumb_func_start MOD16_021D9A30
MOD16_021D9A30: ; 0x021D9A30
- ldr r3, _021D9A38 ; =FUN_02024648
+ ldr r3, _021D9A38 ; =Pokedex_GetSeenSpindaPersonality
ldr r0, [r0]
mov r1, #0
bx r3
.align 2, 0
-_021D9A38: .word FUN_02024648
+_021D9A38: .word Pokedex_GetSeenSpindaPersonality
thumb_func_end MOD16_021D9A30
thumb_func_start MOD16_021D9A3C
@@ -5703,7 +5703,7 @@ _021D9F72:
ldr r0, [r5]
lsr r1, r1, #0x10
add r2, r6, #0
- bl FUN_02024D00
+ bl Pokedex_GetMeisterFlagBySpeciesAndLanguage
pop {r4, r5, r6, pc}
thumb_func_end MOD16_021D9F58
@@ -5767,7 +5767,7 @@ MOD16_021D9FC4: ; 0x021D9FC4
_021D9FDA:
ldrh r1, [r4]
ldr r0, [sp, #4]
- bl FUN_020245F0
+ bl Pokedex_CheckMonSeenFlag
cmp r0, #0
beq _021D9FF6
ldr r1, [r5]
@@ -5825,7 +5825,7 @@ _021DA034:
cmp r0, #1
beq _021DA054
ldr r0, [sp, #0x34]
- bl FUN_02024594
+ bl Pokedex_CheckMonCaughtFlag
cmp r0, #0
bne _021DA054
_021DA04C:
@@ -5875,7 +5875,7 @@ MOD16_021DA080: ; 0x021DA080
_021DA094:
ldrh r1, [r4]
ldr r0, [sp]
- bl FUN_02024594
+ bl Pokedex_CheckMonCaughtFlag
cmp r0, #0
ldr r0, _021DA0D4 ; =0x00000F6C
beq _021DA0AC
@@ -9673,12 +9673,12 @@ _021DBBB0: .word String_dtor
MOD16_021DBBB4: ; 0x021DBBB4
add r1, r0, #1
ldr r0, _021DBBC0 ; =0x021FF568
- ldr r3, _021DBBC4 ; =FUN_02087A38
+ ldr r3, _021DBBC4 ; =GetMeisterLanguage
ldrb r0, [r0, r1]
bx r3
nop
_021DBBC0: .word MOD16_021FF568
-_021DBBC4: .word FUN_02087A38
+_021DBBC4: .word GetMeisterLanguage
thumb_func_end MOD16_021DBBB4
thumb_func_start MOD16_021DBBC8
@@ -9847,14 +9847,14 @@ MOD16_021DBCE0: ; 0x021DBCE0
add r4, r2, #0
add r5, r3, #0
ldr r6, [sp, #0x18]
- bl FUN_02087A1C
+ bl GetMeisterLanguageIdx
str r0, [r5]
cmp r0, #6
blt _021DBCFA
bl ErrorHandling
_021DBCFA:
add r0, r7, #0
- bl FUN_02087A50
+ bl GetMeisterSpeciesIdx
str r0, [r4]
ldr r5, [r5]
cmp r5, #6
diff --git a/arm9/modules/23/asm/module_23.s b/arm9/modules/23/asm/module_23.s
index a7bb626a..281489a4 100644
--- a/arm9/modules/23/asm/module_23.s
+++ b/arm9/modules/23/asm/module_23.s
@@ -1042,7 +1042,7 @@ _02254FD8:
bhi _02254FF4
add r0, r5, #0
add r1, r4, #0
- bl FUN_020245F0
+ bl Pokedex_CheckMonSeenFlag
cmp r0, #0
beq _02254FF4
add r0, r4, #0
diff --git a/arm9/modules/80/asm/module_80.s b/arm9/modules/80/asm/module_80.s
index 196c959f..8e74df8f 100644
--- a/arm9/modules/80/asm/module_80.s
+++ b/arm9/modules/80/asm/module_80.s
@@ -13765,7 +13765,7 @@ _0223441E:
beq _02234434
ldrh r1, [r5]
add r0, r4, #0
- bl FUN_020245F0
+ bl Pokedex_CheckMonSeenFlag
cmp r0, #0
beq _0223444A
add r6, r6, #1
@@ -13777,7 +13777,7 @@ _02234434:
cmp r0, #0
beq _0223444A
add r0, r4, #0
- bl FUN_020245F0
+ bl Pokedex_CheckMonSeenFlag
cmp r0, #0
beq _0223444A
add r6, r6, #1
@@ -13808,7 +13808,7 @@ _02234472:
beq _02234494
ldrh r1, [r5]
add r0, r4, #0
- bl FUN_020245F0
+ bl Pokedex_CheckMonSeenFlag
cmp r0, #0
beq _022344B6
ldrh r2, [r5]
@@ -13825,7 +13825,7 @@ _02234494:
cmp r0, #0
beq _022344B6
add r0, r4, #0
- bl FUN_020245F0
+ bl Pokedex_CheckMonSeenFlag
cmp r0, #0
beq _022344B6
ldrh r2, [r5]
diff --git a/arm9/modules/83/asm/module_83.s b/arm9/modules/83/asm/module_83.s
index fec76301..0a5cc547 100644
--- a/arm9/modules/83/asm/module_83.s
+++ b/arm9/modules/83/asm/module_83.s
@@ -1101,7 +1101,7 @@ _0222DDB8:
beq _0222DE76
ldr r0, [sp, #0x10]
ldr r0, [r0, #8]
- bl FUN_02024440
+ bl Pokedex_CountSeenMons
add r1, r0, #0
ldr r0, [sp, #0x28]
bl MOD83_0222DCF4
@@ -1958,7 +1958,7 @@ MOD83_0222E48C: ; 0x0222E48C
bl Sav2_PlayerData_GetIGTAddr
str r0, [r4, #0x10]
ldr r0, [r4, #8]
- bl FUN_02024D64
+ bl Pokedex_GetSinnohDexFlag
str r0, [r4, #0x4c]
ldr r0, [r4, #0xc]
bl PlayerProfile_CountBadges
@@ -3133,7 +3133,7 @@ _0222EEAC: ; jump table
_0222EEC8:
bl MOD83_0222E954
ldr r0, [r4, #0xc]
- bl FUN_02024D64
+ bl Pokedex_GetSinnohDexFlag
cmp r0, #0
bne _0222EEE4
mov r0, #1
diff --git a/arm9/modules/84/asm/module_84_thumb2.s b/arm9/modules/84/asm/module_84_thumb2.s
index f80b3bb3..661e1a84 100644
--- a/arm9/modules/84/asm/module_84_thumb2.s
+++ b/arm9/modules/84/asm/module_84_thumb2.s
@@ -241,7 +241,7 @@ _021D82CC:
lsl r1, r5, #0x10
add r0, r6, #0
lsr r1, r1, #0x10
- bl FUN_02024594
+ bl Pokedex_CheckMonCaughtFlag
cmp r0, #0
beq _021D8340
lsl r0, r5, #0x10
diff --git a/arm9/src/pokedex.c b/arm9/src/pokedex.c
index 307196bc..022ceaa5 100644
--- a/arm9/src/pokedex.c
+++ b/arm9/src/pokedex.c
@@ -58,24 +58,24 @@ void Sav2_Pokedex_Copy(const struct Pokedex * src, struct Pokedex * dest)
MI_CpuCopy8(src, dest, sizeof(struct Pokedex));
}
-s32 FUN_02023D8C(struct Pokedex * pokedex, u32 species)
+s32 Pokedex_CountSeenShellosOrGastrodon(struct Pokedex * pokedex, u32 species)
{
GF_ASSERT(species == SPECIES_SHELLOS || species == SPECIES_GASTRODON);
- if (!FUN_020245F0(pokedex, (u16)species))
+ if (!Pokedex_CheckMonSeenFlag(pokedex, (u16)species))
return 0;
- u8 *flags = species == SPECIES_SHELLOS ? &pokedex->field_0108[0] : &pokedex->field_0108[1];
+ u8 *flags = species == SPECIES_SHELLOS ? &pokedex->shellosGastrodon[0] : &pokedex->shellosGastrodon[1];
BOOL r2 = CheckDexFlag(flags, 1);
BOOL r0 = CheckDexFlag(flags, 2);
return (r2 == r0) ? 1 : 2;
}
-BOOL FUN_02023DEC(struct Pokedex * pokedex, u32 species, u8 state)
+BOOL Pokedex_HasSeenShellosOrGastrodonForme(struct Pokedex * pokedex, u32 species, u8 state)
{
GF_ASSERT(species == SPECIES_SHELLOS || species == SPECIES_GASTRODON);
- if (!FUN_020245F0(pokedex, (u16)species))
+ if (!Pokedex_CheckMonSeenFlag(pokedex, (u16)species))
return FALSE;
- u8 *flags = species == SPECIES_SHELLOS ? &pokedex->field_0108[0] : &pokedex->field_0108[1];
- u32 r0 = (u32)FUN_02023D8C(pokedex, species);
+ u8 *flags = species == SPECIES_SHELLOS ? &pokedex->shellosGastrodon[0] : &pokedex->shellosGastrodon[1];
+ u32 r0 = (u32)Pokedex_CountSeenShellosOrGastrodon(pokedex, species);
for (int i = 0; i < r0; i++)
{
BOOL r2 = CheckDexFlag(flags, (u16)(i + 1));
@@ -85,13 +85,13 @@ BOOL FUN_02023DEC(struct Pokedex * pokedex, u32 species, u8 state)
return FALSE;
}
-void FUN_02023E70(struct Pokedex * pokedex, u32 species, u32 state)
+void Pokedex_SetSeenShellosOrGastrodonForme(struct Pokedex * pokedex, u32 species, u32 state)
{
GF_ASSERT(species == SPECIES_SHELLOS || species == SPECIES_GASTRODON);
- if (FUN_02023DEC(pokedex, species, (u8)state))
+ if (Pokedex_HasSeenShellosOrGastrodonForme(pokedex, species, (u8)state))
return;
- u8 *flags = species == SPECIES_SHELLOS ? &pokedex->field_0108[0] : &pokedex->field_0108[1];
- s32 r5 = FUN_02023D8C(pokedex, species);
+ u8 *flags = species == SPECIES_SHELLOS ? &pokedex->shellosGastrodon[0] : &pokedex->shellosGastrodon[1];
+ s32 r5 = Pokedex_CountSeenShellosOrGastrodon(pokedex, species);
if (r5 < 2)
{
UpdateDexFlag(flags, (u16)(r5 + 1), (u8)state);
@@ -102,12 +102,12 @@ void FUN_02023E70(struct Pokedex * pokedex, u32 species, u32 state)
}
}
-s32 FUN_02023F2C(struct Pokedex * pokedex, u32 species)
+s32 Pokedex_CountSeenBurmyOrWormadam(struct Pokedex * pokedex, u32 species)
{
GF_ASSERT(species == SPECIES_BURMY || species == SPECIES_WORMADAM);
- if (!FUN_020245F0(pokedex, (u16)species))
+ if (!Pokedex_CheckMonSeenFlag(pokedex, (u16)species))
return 0;
- u8 *flags = species == SPECIES_BURMY ? &pokedex->field_010A[0] : &pokedex->field_010A[1];
+ u8 *flags = species == SPECIES_BURMY ? &pokedex->burmyWormadam[0] : &pokedex->burmyWormadam[1];
s32 i;
for (i = 0; i < 3; i++)
{
@@ -118,12 +118,12 @@ s32 FUN_02023F2C(struct Pokedex * pokedex, u32 species)
return i;
}
-BOOL FUN_02023F88(struct Pokedex * pokedex, u32 species, u8 state)
+BOOL Pokedex_HasSeenBurmyOrWormadamForme(struct Pokedex * pokedex, u32 species, u8 state)
{
GF_ASSERT(species == SPECIES_BURMY || species == SPECIES_WORMADAM);
- if (!FUN_020245F0(pokedex, (u16)species))
+ if (!Pokedex_CheckMonSeenFlag(pokedex, (u16)species))
return FALSE;
- u8 *flags = species == SPECIES_BURMY ? &pokedex->field_010A[0] : &pokedex->field_010A[1];
+ u8 *flags = species == SPECIES_BURMY ? &pokedex->burmyWormadam[0] : &pokedex->burmyWormadam[1];
s32 i;
for (i = 0; i < 3; i++)
{
@@ -134,13 +134,13 @@ BOOL FUN_02023F88(struct Pokedex * pokedex, u32 species, u8 state)
return FALSE;
}
-void FUN_02023FEC(struct Pokedex * pokedex, u32 species, s32 state)
+void Pokedex_SetSeenBurmyOrWormadamForme(struct Pokedex * pokedex, u32 species, s32 state)
{
GF_ASSERT(species == SPECIES_BURMY || species == SPECIES_WORMADAM);
- if (FUN_02023F88(pokedex, species, (u8)state))
+ if (Pokedex_HasSeenBurmyOrWormadamForme(pokedex, species, (u8)state))
return;
- u8 *flags = species == SPECIES_BURMY ? &pokedex->field_010A[0] : &pokedex->field_010A[1];
- s32 r5 = FUN_02023F2C(pokedex, species);
+ u8 *flags = species == SPECIES_BURMY ? &pokedex->burmyWormadam[0] : &pokedex->burmyWormadam[1];
+ s32 r5 = Pokedex_CountSeenBurmyOrWormadam(pokedex, species);
if (r5 >= 3)
return;
UpdateDexFlagPair(flags, (u16)r5, (u8)state);
@@ -152,18 +152,18 @@ static inline void SetDeoxysFormeFlag(struct Pokedex * pokedex, u8 r4, u8 r6)
GF_ASSERT(r4 <= 15);
if (r6 < 2)
{
- pokedex->field_0040 &= ~(15 << (24 + 4 * r6));
- pokedex->field_0040 |= r4 << (24 + 4 * r6);
+ pokedex->caughtFlagsHi_Deoxys1 &= ~(15 << (24 + 4 * r6));
+ pokedex->caughtFlagsHi_Deoxys1 |= r4 << (24 + 4 * r6);
}
else
{
r6 -= 2;
- pokedex->field_0080 &= ~(15 << (24 + 4 * r6));
- pokedex->field_0080 |= r4 << (24 + 4 * r6);
+ pokedex->seenFlagsHi_Deoxys2 &= ~(15 << (24 + 4 * r6));
+ pokedex->seenFlagsHi_Deoxys2 |= r4 << (24 + 4 * r6);
}
}
-void FUN_02024068(struct Pokedex * pokedex, u8 r4, u8 r6)
+void Pokedex_SetSeenDeoxysFormeAt(struct Pokedex * pokedex, u8 r4, u8 r6)
{
SetDeoxysFormeFlag(pokedex, r4, r6);
}
@@ -172,16 +172,16 @@ static inline u32 GetDeoxysFormeFlag(struct Pokedex * pokedex, u8 r6)
{
if (r6 < 2)
{
- return (pokedex->field_0040 >> (24 + 4 * r6)) & 15;
+ return (pokedex->caughtFlagsHi_Deoxys1 >> (24 + 4 * r6)) & 15;
}
else
{
r6 -= 2;
- return (pokedex->field_0080 >> (24 + 4 * r6)) & 15;
+ return (pokedex->seenFlagsHi_Deoxys2 >> (24 + 4 * r6)) & 15;
}
}
-s32 FUN_020240D0(struct Pokedex * pokedex)
+s32 Pokedex_CountSeenDeoxysFormes(struct Pokedex * pokedex)
{
s32 i;
for (i = 0; i < 4; i++)
@@ -193,7 +193,7 @@ s32 FUN_020240D0(struct Pokedex * pokedex)
return i;
}
-BOOL FUN_02024114(struct Pokedex * pokedex, u32 state)
+BOOL Pokedex_HasSeenDeoxysForme(struct Pokedex * pokedex, u32 state)
{
s32 i;
for (i = 0; i < 4; i++)
@@ -205,22 +205,22 @@ BOOL FUN_02024114(struct Pokedex * pokedex, u32 state)
return FALSE;
}
-void FUN_0202415C(struct Pokedex * pokedex, u16 species, struct Pokemon * pokemon)
+void Pokedex_TrySetSeenDeoxysForme(struct Pokedex * pokedex, u16 species, struct Pokemon * pokemon)
{
u8 forme = (u8)GetMonData(pokemon, MON_DATA_FORME, NULL);
- if (species == SPECIES_DEOXYS && !FUN_02024114(pokedex, forme))
+ if (species == SPECIES_DEOXYS && !Pokedex_HasSeenDeoxysForme(pokedex, forme))
{
- s32 r2 = FUN_020240D0(pokedex);
- FUN_02024068(pokedex, forme, (u8)r2);
+ s32 r2 = Pokedex_CountSeenDeoxysFormes(pokedex);
+ Pokedex_SetSeenDeoxysFormeAt(pokedex, forme, (u8)r2);
}
}
-void FUN_0202419C(struct Pokedex * pokedex)
+void Pokedex_InitSeenDeoxysFormesArray(struct Pokedex * pokedex)
{
s32 i;
for (i = 0; i < 4; i++)
{
- FUN_02024068(pokedex, 15, (u8)i);
+ Pokedex_SetSeenDeoxysFormeAt(pokedex, 15, (u8)i);
}
}
@@ -259,10 +259,10 @@ static inline void SetSeenUnownLetter(struct Pokedex * pokedex, u32 species, s32
idx = FindFirstAvailableUnownLetterSlot(pokedex);
if (idx >= 28)
return;
- pokedex->field_010C[idx] = (u8)letter;
+ pokedex->seenUnown[idx] = (u8)letter;
}
-void FUN_020241B8(struct Pokedex * pokedex, u16 species, struct Pokemon * pokemon)
+void Pokedex_SetMonSeenForme(struct Pokedex * pokedex, u16 species, struct Pokemon * pokemon)
{
if (species == SPECIES_UNOWN)
{
@@ -270,33 +270,33 @@ void FUN_020241B8(struct Pokedex * pokedex, u16 species, struct Pokemon * pokemo
}
else if (species == SPECIES_BURMY)
{
- FUN_02023FEC(pokedex, species, (s32)GetMonData(pokemon, MON_DATA_FORME, NULL));
+ Pokedex_SetSeenBurmyOrWormadamForme(pokedex, species, (s32)GetMonData(pokemon, MON_DATA_FORME, NULL));
}
else if (species == SPECIES_WORMADAM)
{
- FUN_02023FEC(pokedex, species, (s32)GetMonData(pokemon, MON_DATA_FORME, NULL));
+ Pokedex_SetSeenBurmyOrWormadamForme(pokedex, species, (s32)GetMonData(pokemon, MON_DATA_FORME, NULL));
}
else if (species == SPECIES_SHELLOS)
{
- FUN_02023E70(pokedex, species, GetMonData(pokemon, MON_DATA_FORME, NULL));
+ Pokedex_SetSeenShellosOrGastrodonForme(pokedex, species, GetMonData(pokemon, MON_DATA_FORME, NULL));
}
else if (species == SPECIES_GASTRODON)
{
- FUN_02023E70(pokedex, species, GetMonData(pokemon, MON_DATA_FORME, NULL));
+ Pokedex_SetSeenShellosOrGastrodonForme(pokedex, species, GetMonData(pokemon, MON_DATA_FORME, NULL));
}
else if (species == SPECIES_DEOXYS)
{
- FUN_0202415C(pokedex, species, pokemon);
+ Pokedex_TrySetSeenDeoxysForme(pokedex, species, pokemon);
}
}
-void FUN_02024294(struct Pokedex * pokedex, u32 species, u32 language)
+void Pokedex_SetMeisterFlagBySpeciesAndLanguage(struct Pokedex * pokedex, u32 species, u32 language)
{
- s32 r4 = FUN_02087A50(species);
- s32 r0 = FUN_02087A1C(language);
+ s32 r4 = GetMeisterSpeciesIdx(species);
+ s32 r0 = GetMeisterLanguageIdx(language);
if (r4 != 14 && r0 != 6)
{
- pokedex->field_0129[r4] |= (1 << r0);
+ pokedex->meister[r4] |= (1 << r0);
}
}
@@ -320,9 +320,11 @@ s32 FUN_020242C8(struct Pokedex * pokedex, u16 species, s32 r4)
return r1;
}
-const u16 UNK_020EE940 = SPECIES_MANAPHY;
+const u16 sSinnohDexMythicalMons[] = {
+ SPECIES_MANAPHY
+};
-const u16 UNK_020EE942[] = {
+const u16 sNationalDexMythicalMons[] = {
SPECIES_MEW,
SPECIES_LUGIA,
SPECIES_HO_OH,
@@ -336,22 +338,22 @@ const u16 UNK_020EE942[] = {
SPECIES_ARCEUS
};
-BOOL FUN_02024340(u16 species)
+BOOL Pokedex_SpeciesIsNotMythical(u16 species)
{
s32 i;
BOOL ret = TRUE;
- for (i = 0; i < (s32)NELEMS(UNK_020EE942); i++)
+ for (i = 0; i < (s32)NELEMS(sNationalDexMythicalMons); i++)
{
- if (species == UNK_020EE942[i])
+ if (species == sNationalDexMythicalMons[i])
ret = FALSE;
}
return ret;
}
-BOOL FUN_02024364(u16 a0)
+BOOL Pokedex_SpeciesIsNotSinnohMythical(u16 species)
{
BOOL ret = TRUE;
- if (a0 == SPECIES_MANAPHY)
+ if (species == SPECIES_MANAPHY)
ret = FALSE;
return ret;
}
@@ -360,104 +362,104 @@ void Sav2_Pokedex_init(struct Pokedex * pokedex)
{
memset(pokedex, 0, sizeof(struct Pokedex));
pokedex->magic = 0xBEEFCAFE;
- pokedex->field_0139 = 0;
- memset(pokedex->field_010C, 0xFF, 28);
- pokedex->field_0108[0] = 0xFF;
- pokedex->field_0108[1] = 0xFF;
- pokedex->field_010A[0] = 0xFF;
- pokedex->field_010A[1] = 0xFF;
- FUN_0202419C(pokedex);
+ pokedex->unlockedNationalDex = 0;
+ memset(pokedex->seenUnown, 0xFF, 28);
+ pokedex->shellosGastrodon[0] = 0xFF;
+ pokedex->shellosGastrodon[1] = 0xFF;
+ pokedex->burmyWormadam[0] = 0xFF;
+ pokedex->burmyWormadam[1] = 0xFF;
+ Pokedex_InitSeenDeoxysFormesArray(pokedex);
}
-u16 FUN_020243C8(struct Pokedex * pokedex)
+u16 Pokedex_CountNationalDexCaughtMons(struct Pokedex * pokedex)
{
GF_ASSERT(pokedex->magic == 0xBEEFCAFE);
s32 i;
s32 count = 0;
for (i = 1; i <= NATIONAL_DEX_COUNT; i++)
{
- if (FUN_02024594(pokedex, (u16)i) == TRUE)
+ if (Pokedex_CheckMonCaughtFlag(pokedex, (u16)i) == TRUE)
count++;
}
return (u16)count;
}
-u16 FUN_02024404(struct Pokedex * pokedex)
+u16 Pokedex_CountNationalDexSeenMons(struct Pokedex * pokedex)
{
GF_ASSERT(pokedex->magic == 0xBEEFCAFE);
s32 i;
s32 count = 0;
for (i = 1; i <= NATIONAL_DEX_COUNT; i++)
{
- if (FUN_020245F0(pokedex, (u16)i) == TRUE)
+ if (Pokedex_CheckMonSeenFlag(pokedex, (u16)i) == TRUE)
count++;
}
return (u16)count;
}
-u16 FUN_02024440(struct Pokedex * pokedex)
+u16 Pokedex_CountSeenMons(struct Pokedex * pokedex)
{
if (Pokedex_GetNatDexFlag(pokedex))
- return FUN_02024404(pokedex);
+ return Pokedex_CountNationalDexSeenMons(pokedex);
else
- return FUN_020244A4(pokedex);
+ return Pokedex_CountSinnohDexSeenMons(pokedex);
}
-u16 FUN_0202445C(struct Pokedex * pokedex)
+u16 Pokedex_CountSinnohDexCaughtMons(struct Pokedex * pokedex)
{
GF_ASSERT(pokedex->magic == 0xBEEFCAFE);
s32 i;
s32 count = 0;
for (i = 1; i <= NATIONAL_DEX_COUNT; i++)
{
- if (FUN_02024594(pokedex, (u16)i) == TRUE && SpeciesToSinnohDexNo((u16)i) != 0)
+ if (Pokedex_CheckMonCaughtFlag(pokedex, (u16)i) == TRUE && SpeciesToSinnohDexNo((u16)i) != 0)
count++;
}
return (u16)count;
}
-u16 FUN_020244A4(struct Pokedex * pokedex)
+u16 Pokedex_CountSinnohDexSeenMons(struct Pokedex * pokedex)
{
GF_ASSERT(pokedex->magic == 0xBEEFCAFE);
s32 i;
s32 count = 0;
for (i = 1; i <= NATIONAL_DEX_COUNT; i++)
{
- if (FUN_020245F0(pokedex, (u16)i) == TRUE && SpeciesToSinnohDexNo((u16)i) != 0)
+ if (Pokedex_CheckMonSeenFlag(pokedex, (u16)i) == TRUE && SpeciesToSinnohDexNo((u16)i) != 0)
count++;
}
return (u16)count;
}
-BOOL FUN_020244EC(struct Pokedex * pokedex)
+BOOL Pokedex_HasCompletedNationalDex(struct Pokedex * pokedex)
{
- return FUN_02024518(pokedex) >= 482;
+ return Pokedex_CountNationalDexCaughtMons_OmitMythicals(pokedex) >= 482;
}
-BOOL FUN_02024504(struct Pokedex * pokedex)
+BOOL Pokedex_HasCompletedSinnohDex(struct Pokedex * pokedex)
{
- return FUN_02024550(pokedex) >= 150;
+ return Pokedex_CountSinnohDexSeenMons_OmitMythicals(pokedex) >= 150;
}
-u16 FUN_02024518(struct Pokedex * pokedex)
+u16 Pokedex_CountNationalDexCaughtMons_OmitMythicals(struct Pokedex * pokedex)
{
s32 i;
u16 count = 0;
for (i = 1; i <= NATIONAL_DEX_COUNT; i++)
{
- if (FUN_02024594(pokedex, (u16)i) == TRUE && FUN_02024340((u16)i) == TRUE)
+ if (Pokedex_CheckMonCaughtFlag(pokedex, (u16)i) == TRUE && Pokedex_SpeciesIsNotMythical((u16)i) == TRUE)
count++;
}
return count;
}
-u16 FUN_02024550(struct Pokedex * pokedex)
+u16 Pokedex_CountSinnohDexSeenMons_OmitMythicals(struct Pokedex * pokedex)
{
s32 i;
u16 count = 0;
for (i = 1; i <= NATIONAL_DEX_COUNT; i++)
{
- if (FUN_020245F0(pokedex, (u16)i) == TRUE && SpeciesToSinnohDexNo((u16)i) != 0 && FUN_02024364((u16)i) == TRUE)
+ if (Pokedex_CheckMonSeenFlag(pokedex, (u16)i) == TRUE && SpeciesToSinnohDexNo((u16)i) != 0 && Pokedex_SpeciesIsNotSinnohMythical((u16)i) == TRUE)
count++;
}
return count;
@@ -473,30 +475,30 @@ static inline BOOL DexSpeciesIsInvalid(u16 species)
return FALSE;
}
-BOOL FUN_02024594(struct Pokedex * pokedex, u16 species)
+BOOL Pokedex_CheckMonCaughtFlag(struct Pokedex * pokedex, u16 species)
{
GF_ASSERT(pokedex->magic == 0xBEEFCAFE);
if (DexSpeciesIsInvalid(species))
return FALSE;
- if (!CheckDexFlag(pokedex->field_0004, species) || !CheckDexFlag(pokedex->field_0044, species))
+ if (!CheckDexFlag(pokedex->caughtFlags, species) || !CheckDexFlag(pokedex->seenFlags, species))
return FALSE;
return TRUE;
}
-BOOL FUN_020245F0(struct Pokedex * pokedex, u16 species)
+BOOL Pokedex_CheckMonSeenFlag(struct Pokedex * pokedex, u16 species)
{
GF_ASSERT(pokedex->magic == 0xBEEFCAFE);
if (DexSpeciesIsInvalid(species))
return FALSE;
- return CheckDexFlag(pokedex->field_0044, species);
+ return CheckDexFlag(pokedex->seenFlags, species);
}
-u32 FUN_02024648(struct Pokedex * pokedex, u32 a1)
+u32 Pokedex_GetSeenSpindaPersonality(struct Pokedex * pokedex, u32 a1)
{
u32 r6;
GF_ASSERT(pokedex->magic == 0xBEEFCAFE);
if (a1 == 0)
- r6 = (u32)pokedex->field_0104;
+ r6 = (u32)pokedex->spindaPersonality;
else
GF_ASSERT(0); // r6 is not initialized because execution should halt here
return r6;
@@ -507,7 +509,7 @@ s32 FUN_02024674(struct Pokedex * pokedex, u16 species, s32 r6)
GF_ASSERT(pokedex->magic == 0xBEEFCAFE);
if (DexSpeciesIsInvalid(species))
return -1;
- if (CheckDexFlag(pokedex->field_0044, species))
+ if (CheckDexFlag(pokedex->seenFlags, species))
return FUN_020242C8(pokedex, species, r6);
else
return -1;
@@ -518,23 +520,23 @@ static inline s32 FindFirstAvailableUnownLetterSlot_2(struct Pokedex * pokedex)
s32 i;
for (i = 0; i < 28; i++)
{
- if (pokedex->field_010C[i] == 0xFF)
+ if (pokedex->seenUnown[i] == 0xFF)
break;
}
return i;
}
-s32 FUN_020246DC(struct Pokedex * pokedex, s32 a1)
+s32 Pokedex_GetSeenUnownI(struct Pokedex * pokedex, s32 a1)
{
GF_ASSERT(pokedex->magic == 0xBEEFCAFE);
s32 i;
i = FindFirstAvailableUnownLetterSlot_2(pokedex);
if (i <= a1)
return -1;
- return pokedex->field_010C[a1];
+ return pokedex->seenUnown[a1];
}
-s32 FUN_0202471C(struct Pokedex * pokedex)
+s32 Pokedex_CountSeenUnown(struct Pokedex * pokedex)
{
GF_ASSERT(pokedex->magic == 0xBEEFCAFE);
return FindFirstAvailableUnownLetterSlot_2(pokedex);
@@ -543,61 +545,61 @@ s32 FUN_0202471C(struct Pokedex * pokedex)
BOOL FUN_02024748(struct Pokedex * pokedex, s32 a1)
{
GF_ASSERT(pokedex->magic == 0xBEEFCAFE);
- if (FUN_02023D8C(pokedex, SPECIES_SHELLOS) <= a1)
+ if (Pokedex_CountSeenShellosOrGastrodon(pokedex, SPECIES_SHELLOS) <= a1)
return -1;
GF_ASSERT(a1 < 2);
- return CheckDexFlag(&pokedex->field_0108[0], (u16)(a1 + 1));
+ return CheckDexFlag(&pokedex->shellosGastrodon[0], (u16)(a1 + 1));
}
s32 FUN_020247A4(struct Pokedex * pokedex)
{
GF_ASSERT(pokedex->magic == 0xBEEFCAFE);
- return FUN_02023D8C(pokedex, SPECIES_SHELLOS);
+ return Pokedex_CountSeenShellosOrGastrodon(pokedex, SPECIES_SHELLOS);
}
BOOL FUN_020247C8(struct Pokedex * pokedex, s32 a1)
{
GF_ASSERT(pokedex->magic == 0xBEEFCAFE);
- if (FUN_02023D8C(pokedex, SPECIES_GASTRODON) <= a1)
+ if (Pokedex_CountSeenShellosOrGastrodon(pokedex, SPECIES_GASTRODON) <= a1)
return -1;
GF_ASSERT(a1 < 2);
- return CheckDexFlag(&pokedex->field_0108[1], (u16)(a1 + 1));
+ return CheckDexFlag(&pokedex->shellosGastrodon[1], (u16)(a1 + 1));
}
s32 FUN_02024828(struct Pokedex * pokedex)
{
GF_ASSERT(pokedex->magic == 0xBEEFCAFE);
- return FUN_02023D8C(pokedex, SPECIES_GASTRODON);
+ return Pokedex_CountSeenShellosOrGastrodon(pokedex, SPECIES_GASTRODON);
}
s32 FUN_0202484C(struct Pokedex * pokedex, s32 a1)
{
GF_ASSERT(pokedex->magic == 0xBEEFCAFE);
- if (FUN_02023F2C(pokedex, SPECIES_BURMY) <= a1)
+ if (Pokedex_CountSeenBurmyOrWormadam(pokedex, SPECIES_BURMY) <= a1)
return -1;
GF_ASSERT(a1 < 3);
- return CheckDexFlagPair(&pokedex->field_010A[0], (u16)a1);
+ return CheckDexFlagPair(&pokedex->burmyWormadam[0], (u16)a1);
}
s32 FUN_0202489C(struct Pokedex * pokedex)
{
GF_ASSERT(pokedex->magic == 0xBEEFCAFE);
- return FUN_02023F2C(pokedex, SPECIES_BURMY);
+ return Pokedex_CountSeenBurmyOrWormadam(pokedex, SPECIES_BURMY);
}
s32 FUN_020248BC(struct Pokedex * pokedex, s32 a1)
{
GF_ASSERT(pokedex->magic == 0xBEEFCAFE);
- if (FUN_02023F2C(pokedex, SPECIES_WORMADAM) <= a1)
+ if (Pokedex_CountSeenBurmyOrWormadam(pokedex, SPECIES_WORMADAM) <= a1)
return -1;
GF_ASSERT(a1 < 3);
- return CheckDexFlagPair(&pokedex->field_010A[1], (u16)a1);
+ return CheckDexFlagPair(&pokedex->burmyWormadam[1], (u16)a1);
}
s32 FUN_0202490C(struct Pokedex * pokedex)
{
GF_ASSERT(pokedex->magic == 0xBEEFCAFE);
- return FUN_02023F2C(pokedex, SPECIES_WORMADAM);
+ return Pokedex_CountSeenBurmyOrWormadam(pokedex, SPECIES_WORMADAM);
}
s32 FUN_02024930(struct Pokedex * pokedex, s32 a1)
@@ -609,7 +611,7 @@ s32 FUN_02024930(struct Pokedex * pokedex, s32 a1)
s32 FUN_02024970(struct Pokedex * pokedex)
{
GF_ASSERT(pokedex->magic == 0xBEEFCAFE);
- return FUN_020240D0(pokedex);
+ return Pokedex_CountSeenDeoxysFormes(pokedex);
}
static inline void SetSeenCaughtGender(struct Pokedex * pokedex, u16 species, u8 gender)
@@ -629,7 +631,7 @@ static inline void SetSeenGender(struct Pokedex * pokedex, u16 species, u8 gende
UpdateDexFlag(pokedex->field_00C4, species, gender);
}
-void FUN_0202498C(struct Pokedex * pokedex, struct Pokemon * pokemon)
+void Pokedex_SetMonSeenFlag(struct Pokedex * pokedex, struct Pokemon * pokemon)
{
u16 species = (u16)GetMonData(pokemon, MON_DATA_SPECIES, NULL);
u32 personality = GetMonData(pokemon, MON_DATA_PERSONALITY, NULL);
@@ -637,10 +639,10 @@ void FUN_0202498C(struct Pokedex * pokedex, struct Pokemon * pokemon)
GF_ASSERT(pokedex->magic == 0xBEEFCAFE);
if (DexSpeciesIsInvalid(species))
return;
- if (!CheckDexFlag(pokedex->field_0044, species))
+ if (!CheckDexFlag(pokedex->seenFlags, species))
{
if (species == SPECIES_SPINDA)
- pokedex->field_0104 = personality;
+ pokedex->spindaPersonality = personality;
SetSeenCaughtGender(pokedex, species, (u8)gender);
}
else
@@ -651,11 +653,11 @@ void FUN_0202498C(struct Pokedex * pokedex, struct Pokemon * pokemon)
SetSeenGender(pokedex, species, (u8)gender);
}
}
- FUN_020241B8(pokedex, species, pokemon);
- SetDexFlag(pokedex->field_0044, species);
+ Pokedex_SetMonSeenForme(pokedex, species, pokemon);
+ SetDexFlag(pokedex->seenFlags, species);
}
-void FUN_02024AF0(struct Pokedex * pokedex, struct Pokemon * pokemon)
+void Pokedex_SetMonCaughtFlag(struct Pokedex * pokedex, struct Pokemon * pokemon)
{
u32 language; // sp08
u32 personality; // sp04
@@ -669,10 +671,10 @@ void FUN_02024AF0(struct Pokedex * pokedex, struct Pokemon * pokemon)
GF_ASSERT(pokedex->magic == 0xBEEFCAFE);
if (DexSpeciesIsInvalid(species))
return;
- if (!CheckDexFlag(pokedex->field_0044, species))
+ if (!CheckDexFlag(pokedex->seenFlags, species))
{
if (species == SPECIES_SPINDA)
- pokedex->field_0104 = personality;
+ pokedex->spindaPersonality = personality;
SetSeenCaughtGender(pokedex, species, (u8)gender);
}
else
@@ -683,22 +685,22 @@ void FUN_02024AF0(struct Pokedex * pokedex, struct Pokemon * pokemon)
SetSeenGender(pokedex, species, (u8)gender);
}
}
- FUN_020241B8(pokedex, species, pokemon);
- FUN_02024294(pokedex, species, language);
- SetDexFlag(pokedex->field_0004, species);
- SetDexFlag(pokedex->field_0044, species);
+ Pokedex_SetMonSeenForme(pokedex, species, pokemon);
+ Pokedex_SetMeisterFlagBySpeciesAndLanguage(pokedex, species, language);
+ SetDexFlag(pokedex->caughtFlags, species);
+ SetDexFlag(pokedex->seenFlags, species);
}
void Pokedex_SetNatDexFlag(struct Pokedex * pokedex)
{
GF_ASSERT(pokedex->magic == 0xBEEFCAFE);
- pokedex->field_0139 = 1;
+ pokedex->unlockedNationalDex = 1;
}
BOOL Pokedex_GetNatDexFlag(struct Pokedex * pokedex)
{
GF_ASSERT(pokedex->magic == 0xBEEFCAFE);
- return pokedex->field_0139;
+ return pokedex->unlockedNationalDex;
}
BOOL FUN_02024CC4(struct Pokedex * pokedex)
@@ -713,15 +715,15 @@ void FUN_02024CE0(struct Pokedex * pokedex)
pokedex->field_0128 = 1;
}
-s32 FUN_02024D00(struct Pokedex * pokedex, u32 species, u32 language)
+s32 Pokedex_GetMeisterFlagBySpeciesAndLanguage(struct Pokedex * pokedex, u32 species, u32 language)
{
GF_ASSERT(language < 8);
GF_ASSERT(pokedex->magic == 0xBEEFCAFE);
- s32 r5 = FUN_02087A50(species);
+ s32 r5 = GetMeisterSpeciesIdx(species);
if (r5 == 14)
return 0;
- s32 r0 = FUN_02087A1C(language);
- return pokedex->field_0129[r5] & (1 << r0);
+ s32 r0 = GetMeisterLanguageIdx(language);
+ return pokedex->meister[r5] & (1 << r0);
}
void FUN_02024D4C(struct Pokedex * pokedex)
@@ -734,16 +736,16 @@ BOOL FUN_02024D58(struct Pokedex * pokedex)
return pokedex->field_0137;
}
-BOOL FUN_02024D64(struct Pokedex * pokedex)
+BOOL Pokedex_GetSinnohDexFlag(struct Pokedex * pokedex)
{
GF_ASSERT(pokedex->magic == 0xBEEFCAFE);
- return pokedex->field_0138;
+ return pokedex->unlockedSinnohDex;
}
-void FUN_02024D80(struct Pokedex * pokedex)
+void Pokedex_SetSinnohDexFlag(struct Pokedex * pokedex)
{
GF_ASSERT(pokedex->magic == 0xBEEFCAFE);
- pokedex->field_0138 = 1;
+ pokedex->unlockedSinnohDex = 1;
}
struct Pokedex * FUN_02024DA0(struct SaveBlock2 * sav2)
@@ -756,8 +758,8 @@ s32 FUN_02024DAC(struct Pokedex * pokedex, s32 a1, u32 a2)
switch (a1)
{
case SPECIES_UNOWN:
- if (a2 < FUN_0202471C(pokedex))
- return FUN_020246DC(pokedex, (s32)a2);
+ if (a2 < Pokedex_CountSeenUnown(pokedex))
+ return Pokedex_GetSeenUnownI(pokedex, (s32)a2);
break;
case SPECIES_SHELLOS:
if (a2 < FUN_020247A4(pokedex))
diff --git a/arm9/src/unk_02087A1C.c b/arm9/src/unk_02087A1C.c
new file mode 100644
index 00000000..f20707ad
--- /dev/null
+++ b/arm9/src/unk_02087A1C.c
@@ -0,0 +1,69 @@
+#include "global.h"
+#include "constants/species.h"
+#include "unk_02087A1C.h"
+
+#pragma thumb on
+
+struct MeisterRodata
+{
+ u16 species[14];
+ u8 languages[6];
+};
+
+static const struct MeisterRodata sMeister = {
+ {
+ SPECIES_EKANS,
+ SPECIES_PIKACHU,
+ SPECIES_PSYDUCK,
+ SPECIES_PONYTA,
+ SPECIES_STARYU,
+ SPECIES_MAGIKARP,
+ SPECIES_WOBBUFFET,
+ SPECIES_HERACROSS,
+ SPECIES_SNEASEL,
+ SPECIES_TEDDIURSA,
+ SPECIES_HOUNDOUR,
+ SPECIES_WINGULL,
+ SPECIES_SLAKOTH,
+ SPECIES_ROSELIA
+ },
+ {
+ LANGUAGE_JAPANESE,
+ LANGUAGE_ENGLISH,
+ LANGUAGE_FRENCH,
+ LANGUAGE_GERMAN,
+ LANGUAGE_ITALIAN,
+ LANGUAGE_SPANISH
+ }
+};
+
+s32 GetMeisterLanguageIdx(u32 language)
+{
+ s32 i;
+ const u8 * ptr = sMeister.languages;
+ for (i = 0; i < 6; i++, ptr++)
+ {
+ if (language == *ptr)
+ break;
+ }
+ return i;
+}
+
+u8 GetMeisterLanguage(s32 idx)
+{
+ GF_ASSERT(idx < 6);
+ const u8 * ptr = sMeister.languages;
+ return ptr[idx];
+}
+
+s32 GetMeisterSpeciesIdx(u32 species)
+{
+ s32 i;
+ const u16 * ptr = sMeister.species;
+ for (i = 0; i < 14; i++, ptr++)
+ {
+ if (species == *ptr)
+ break;
+ }
+ return i;
+}
diff --git a/include/config.h b/include/config.h
index 7b75cd06..c32220d0 100644
--- a/include/config.h
+++ b/include/config.h
@@ -16,6 +16,7 @@
#define LANGUAGE_GERMAN 5
#define LANGUAGE_SPANISH 7
#define LANGUAGE_KOREAN 8
+#define LANGUAGE_COUNT LANGUAGE_KOREAN
#ifdef DIAMOND
#define GAME_VERSION VERSION_DIAMOND
diff --git a/include/pokedex.h b/include/pokedex.h
index 61c051da..cf389f84 100644
--- a/include/pokedex.h
+++ b/include/pokedex.h
@@ -6,59 +6,59 @@
struct Pokedex
{
/* 0x0000 */ u32 magic; // BEEFCAFE
- /* 0x0004 */ u8 field_0004[0x3C];
- /* 0x0040 */ u32 field_0040; // Deoxys forme plus top 13 dex flags
- /* 0x0044 */ u8 field_0044[0x3C];
- /* 0x0080 */ u32 field_0080; // Deoxys forme plus top 13 dex flags
+ /* 0x0004 */ u8 caughtFlags[0x3C];
+ /* 0x0040 */ u32 caughtFlagsHi_Deoxys1; // Deoxys forme plus top 13 dex flags
+ /* 0x0044 */ u8 seenFlags[0x3C];
+ /* 0x0080 */ u32 seenFlagsHi_Deoxys2; // Deoxys forme plus top 13 dex flags
/* 0x0084 */ u8 field_0084[0x40]; // Genders
/* 0x00C4 */ u8 field_00C4[0x40]; // Genders
- /* 0x0104 */ u32 field_0104; // spinda personality
- /* 0x0108 */ u8 field_0108[2]; // Shellos/Gastrodon
- /* 0x0108 */ u8 field_010A[2]; // Burmy/Wormadam
- /* 0x010C */ u8 field_010C[28]; // Unown
+ /* 0x0104 */ u32 spindaPersonality; // spinda personality
+ /* 0x0108 */ u8 shellosGastrodon[2]; // Shellos/Gastrodon
+ /* 0x0108 */ u8 burmyWormadam[2]; // Burmy/Wormadam
+ /* 0x010C */ u8 seenUnown[28]; // Unown
/* 0x0128 */ u8 field_0128;
- /* 0x0129 */ u8 field_0129[14]; // Meister?
+ /* 0x0129 */ u8 meister[14]; // Meister?
/* 0x0137 */ u8 field_0137;
- /* 0x0138 */ u8 field_0138;
- /* 0x0139 */ u8 field_0139;
+ /* 0x0138 */ u8 unlockedSinnohDex;
+ /* 0x0139 */ u8 unlockedNationalDex;
/* 0x013A */ u8 padding_013A[2];
};
u32 Sav2_Pokedex_sizeof(void);
struct Pokedex * Sav2_Pokedex_new(u32 heap_id);
void Sav2_Pokedex_Copy(const struct Pokedex * src, struct Pokedex * dest);
-s32 FUN_02023D8C(struct Pokedex * pokedex, u32 species);
-BOOL FUN_02023DEC(struct Pokedex * pokedex, u32 species, u8 state);
-void FUN_02023E70(struct Pokedex * pokedex, u32 species, u32 state);
-s32 FUN_02023F2C(struct Pokedex * pokedex, u32 species);
-BOOL FUN_02023F88(struct Pokedex * pokedex, u32 species, u8 state);
-void FUN_02023FEC(struct Pokedex * pokedex, u32 species, s32 state);
-void FUN_02024068(struct Pokedex * pokedex, u8 r4, u8 r6);
-s32 FUN_020240D0(struct Pokedex * pokedex);
-BOOL FUN_02024114(struct Pokedex * pokedex, u32 state);
-void FUN_0202415C(struct Pokedex * pokedex, u16 species, struct Pokemon * pokemon);
-void FUN_0202419C(struct Pokedex * pokedex);
-void FUN_020241B8(struct Pokedex * pokedex, u16 species, struct Pokemon * pokemon);
-void FUN_02024294(struct Pokedex * pokedex, u32 species, u32 language);
+s32 Pokedex_CountSeenShellosOrGastrodon(struct Pokedex * pokedex, u32 species);
+BOOL Pokedex_HasSeenShellosOrGastrodonForme(struct Pokedex * pokedex, u32 species, u8 state);
+void Pokedex_SetSeenShellosOrGastrodonForme(struct Pokedex * pokedex, u32 species, u32 state);
+s32 Pokedex_CountSeenBurmyOrWormadam(struct Pokedex * pokedex, u32 species);
+BOOL Pokedex_HasSeenBurmyOrWormadamForme(struct Pokedex * pokedex, u32 species, u8 state);
+void Pokedex_SetSeenBurmyOrWormadamForme(struct Pokedex * pokedex, u32 species, s32 state);
+void Pokedex_SetSeenDeoxysFormeAt(struct Pokedex * pokedex, u8 r4, u8 r6);
+s32 Pokedex_CountSeenDeoxysFormes(struct Pokedex * pokedex);
+BOOL Pokedex_HasSeenDeoxysForme(struct Pokedex * pokedex, u32 state);
+void Pokedex_TrySetSeenDeoxysForme(struct Pokedex * pokedex, u16 species, struct Pokemon * pokemon);
+void Pokedex_InitSeenDeoxysFormesArray(struct Pokedex * pokedex);
+void Pokedex_SetMonSeenForme(struct Pokedex * pokedex, u16 species, struct Pokemon * pokemon);
+void Pokedex_SetMeisterFlagBySpeciesAndLanguage(struct Pokedex * pokedex, u32 species, u32 language);
s32 FUN_020242C8(struct Pokedex * pokedex, u16 species, s32 r4);
-BOOL FUN_02024340(u16 species);
-BOOL FUN_02024364(u16 a0);
+BOOL Pokedex_SpeciesIsNotMythical(u16 species);
+BOOL Pokedex_SpeciesIsNotSinnohMythical(u16 species);
void Sav2_Pokedex_init(struct Pokedex * pokedex);
-u16 FUN_020243C8(struct Pokedex * pokedex);
-u16 FUN_02024404(struct Pokedex * pokedex);
-u16 FUN_02024440(struct Pokedex * pokedex);
-u16 FUN_0202445C(struct Pokedex * pokedex);
-u16 FUN_020244A4(struct Pokedex * pokedex);
-BOOL FUN_020244EC(struct Pokedex * pokedex);
-BOOL FUN_02024504(struct Pokedex * pokedex);
-u16 FUN_02024518(struct Pokedex * pokedex);
-u16 FUN_02024550(struct Pokedex * pokedex);
-BOOL FUN_02024594(struct Pokedex * pokedex, u16 species);
-BOOL FUN_020245F0(struct Pokedex * pokedex, u16 species);
-u32 FUN_02024648(struct Pokedex * pokedex, u32 a1);
+u16 Pokedex_CountNationalDexCaughtMons(struct Pokedex * pokedex);
+u16 Pokedex_CountNationalDexSeenMons(struct Pokedex * pokedex);
+u16 Pokedex_CountSeenMons(struct Pokedex * pokedex);
+u16 Pokedex_CountSinnohDexCaughtMons(struct Pokedex * pokedex);
+u16 Pokedex_CountSinnohDexSeenMons(struct Pokedex * pokedex);
+BOOL Pokedex_HasCompletedNationalDex(struct Pokedex * pokedex);
+BOOL Pokedex_HasCompletedSinnohDex(struct Pokedex * pokedex);
+u16 Pokedex_CountNationalDexCaughtMons_OmitMythicals(struct Pokedex * pokedex);
+u16 Pokedex_CountSinnohDexSeenMons_OmitMythicals(struct Pokedex * pokedex);
+BOOL Pokedex_CheckMonCaughtFlag(struct Pokedex * pokedex, u16 species);
+BOOL Pokedex_CheckMonSeenFlag(struct Pokedex * pokedex, u16 species);
+u32 Pokedex_GetSeenSpindaPersonality(struct Pokedex * pokedex, u32 a1);
s32 FUN_02024674(struct Pokedex * pokedex, u16 species, s32 r6);
-s32 FUN_020246DC(struct Pokedex * pokedex, s32 a1);
-s32 FUN_0202471C(struct Pokedex * pokedex);
+s32 Pokedex_GetSeenUnownI(struct Pokedex * pokedex, s32 a1);
+s32 Pokedex_CountSeenUnown(struct Pokedex * pokedex);
BOOL FUN_02024748(struct Pokedex * pokedex, s32 a1);
s32 FUN_020247A4(struct Pokedex * pokedex);
BOOL FUN_020247C8(struct Pokedex * pokedex, s32 a1);
@@ -69,17 +69,17 @@ s32 FUN_020248BC(struct Pokedex * pokedex, s32 a1);
s32 FUN_0202490C(struct Pokedex * pokedex);
s32 FUN_02024930(struct Pokedex * pokedex, s32 a1);
s32 FUN_02024970(struct Pokedex * pokedex);
-void FUN_0202498C(struct Pokedex * pokedex, struct Pokemon * pokemon);
-void FUN_02024AF0(struct Pokedex * pokedex, struct Pokemon * pokemon);
+void Pokedex_SetMonSeenFlag(struct Pokedex * pokedex, struct Pokemon * pokemon);
+void Pokedex_SetMonCaughtFlag(struct Pokedex * pokedex, struct Pokemon * pokemon);
void Pokedex_SetNatDexFlag(struct Pokedex * pokedex);
BOOL Pokedex_GetNatDexFlag(struct Pokedex * pokedex);
BOOL FUN_02024CC4(struct Pokedex * pokedex);
void FUN_02024CE0(struct Pokedex * pokedex);
-s32 FUN_02024D00(struct Pokedex * pokedex, u32 species, u32 language);
+s32 Pokedex_GetMeisterFlagBySpeciesAndLanguage(struct Pokedex * pokedex, u32 species, u32 language);
void FUN_02024D4C(struct Pokedex * pokedex);
BOOL FUN_02024D58(struct Pokedex * pokedex);
-BOOL FUN_02024D64(struct Pokedex * pokedex);
-void FUN_02024D80(struct Pokedex * pokedex);
+BOOL Pokedex_GetSinnohDexFlag(struct Pokedex * pokedex);
+void Pokedex_SetSinnohDexFlag(struct Pokedex * pokedex);
struct Pokedex * FUN_02024DA0(struct SaveBlock2 * sav2);
s32 FUN_02024DAC(struct Pokedex * pokedex, s32 a1, u32 a2);
diff --git a/include/unk_02087A1C.h b/include/unk_02087A1C.h
index 28155209..f19b3c93 100644
--- a/include/unk_02087A1C.h
+++ b/include/unk_02087A1C.h
@@ -1,7 +1,8 @@
#ifndef POKEDIAMOND_UNK_02087A1C_H
#define POKEDIAMOND_UNK_02087A1C_H
-s32 FUN_02087A50(u32 species);
-s32 FUN_02087A1C(u32 language);
+s32 GetMeisterLanguageIdx(u32 language);
+u8 GetMeisterLanguage(s32 idx);
+s32 GetMeisterSpeciesIdx(u32 species);
#endif //POKEDIAMOND_UNK_02087A1C_H