summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortgsm <doodrabbit@hotmail.com>2021-04-08 21:31:13 -0400
committertgsm <doodrabbit@hotmail.com>2021-04-09 13:25:52 -0400
commitcbe18ecb3e513a30da11aaef1ef22cd855c60d7a (patch)
tree65ccba71cb739fff1366bb5dbad351405a727613
parent98a3dd5714237857654ae7ec4bfd69f2ad6558db (diff)
Decompile scrcmd_4 -> scrcmd_names
-rw-r--r--arm9/arm9.lsf2
-rw-r--r--arm9/asm/scrcmd_4.s1313
-rw-r--r--arm9/asm/unk_02038C78.s82
-rw-r--r--arm9/global.inc82
-rw-r--r--arm9/src/scrcmd_names.c540
-rw-r--r--include/scrcmd.h44
6 files changed, 667 insertions, 1396 deletions
diff --git a/arm9/arm9.lsf b/arm9/arm9.lsf
index b0bb0a55..dee43fd0 100644
--- a/arm9/arm9.lsf
+++ b/arm9/arm9.lsf
@@ -155,7 +155,7 @@ Static arm9
Object scrcmd_asm.o
Object scrcmd_2.o
Object scrcmd_3.o
- Object scrcmd_4.o
+ Object scrcmd_names.o
Object scrcmd_5.o
Object scrcmd_6.o
Object scrcmd_7.o
diff --git a/arm9/asm/scrcmd_4.s b/arm9/asm/scrcmd_4.s
deleted file mode 100644
index 3bad9d50..00000000
--- a/arm9/asm/scrcmd_4.s
+++ /dev/null
@@ -1,1313 +0,0 @@
- .include "asm/macros.inc"
- .include "global.inc"
-
- .extern gGameLanguage
-
- .text
-
- thumb_func_start FUN_020406CC
-FUN_020406CC: ; 0x020406CC
- push {r4-r6, lr}
- add r5, r0, #0x0
- add r0, #0x80
- ldr r6, [r0, #0x0]
- mov r1, #0xf
- add r0, r6, #0x0
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r4, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- ldrb r5, [r1, #0x0]
- add r0, r6, #0x0
- bl ScriptEnvironment_GetSav2Ptr
- bl Sav2_PlayerData_GetProfileAddr
- add r2, r0, #0x0
- ldr r0, [r4, #0x0]
- add r1, r5, #0x0
- bl BufferPlayersName
- mov r0, #0x0
- pop {r4-r6, pc}
- .balign 4
-
- thumb_func_start FUN_02040700
-FUN_02040700: ; 0x02040700
- push {r3-r5, lr}
- add r5, r0, #0x0
- add r0, #0x80
- ldr r4, [r0, #0x0]
- mov r1, #0xf
- add r0, r4, #0x0
- bl FUN_02039438
- ldr r2, [r5, #0x8]
- add r1, r2, #0x1
- str r1, [r5, #0x8]
- ldrb r1, [r2, #0x0]
- ldr r0, [r0, #0x0]
- ldr r2, [r4, #0xc]
- bl BufferRivalsName
- mov r0, #0x0
- pop {r3-r5, pc}
-
- thumb_func_start FUN_02040724
-FUN_02040724: ; 0x02040724
- push {r3-r5, lr}
- add r5, r0, #0x0
- add r0, #0x80
- ldr r4, [r0, #0x0]
- mov r1, #0xf
- add r0, r4, #0x0
- bl FUN_02039438
- ldr r2, [r5, #0x8]
- add r1, r2, #0x1
- str r1, [r5, #0x8]
- ldrb r1, [r2, #0x0]
- ldr r0, [r0, #0x0]
- ldr r2, [r4, #0xc]
- bl BufferFriendsName
- mov r0, #0x0
- pop {r3-r5, pc}
-
- thumb_func_start FUN_02040748
-FUN_02040748: ; 0x02040748
- push {r3-r7, lr}
- add r5, r0, #0x0
- add r0, #0x80
- ldr r6, [r0, #0x0]
- mov r1, #0xf
- add r0, r6, #0x0
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r7, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- add r0, r5, #0x0
- ldrb r4, [r1, #0x0]
- bl ScriptReadHalfword
- add r5, #0x80
- add r1, r0, #0x0
- ldr r0, [r5, #0x0]
- bl VarGet
- add r5, r0, #0x0
- ldr r0, [r6, #0xc]
- bl SavArray_PlayerParty_get
- add r1, r5, #0x0
- bl GetPartyMonByIndex
- add r2, r0, #0x0
- ldr r0, [r7, #0x0]
- add r1, r4, #0x0
- bl BufferBoxMonSpeciesName
- mov r0, #0x0
- pop {r3-r7, pc}
- .balign 4
-
- thumb_func_start FUN_02040790
-FUN_02040790: ; 0x02040790
- push {r4-r6, lr}
- add r5, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r6, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- add r0, r5, #0x0
- ldrb r4, [r1, #0x0]
- bl ScriptReadHalfword
- add r5, #0x80
- add r1, r0, #0x0
- ldr r0, [r5, #0x0]
- bl VarGet
- add r2, r0, #0x0
- ldr r0, [r6, #0x0]
- add r1, r4, #0x0
- bl BufferItemName
- mov r0, #0x0
- pop {r4-r6, pc}
- .balign 4
-
- thumb_func_start FUN_020407C8
-FUN_020407C8: ; 0x020407C8
- push {r4-r6, lr}
- add r5, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r6, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- add r0, r5, #0x0
- ldrb r4, [r1, #0x0]
- bl ScriptReadHalfword
- add r5, #0x80
- add r1, r0, #0x0
- ldr r0, [r5, #0x0]
- bl VarGet
- add r2, r0, #0x0
- ldr r0, [r6, #0x0]
- add r1, r4, #0x0
- bl BufferPocketName
- mov r0, #0x0
- pop {r4-r6, pc}
- .balign 4
-
- thumb_func_start FUN_02040800
-FUN_02040800: ; 0x02040800
- push {r4-r6, lr}
- add r5, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r6, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- add r0, r5, #0x0
- ldrb r4, [r1, #0x0]
- bl ScriptReadHalfword
- add r5, #0x80
- add r1, r0, #0x0
- ldr r0, [r5, #0x0]
- bl VarGet
- bl TMHMGetMove
- add r2, r0, #0x0
- ldr r0, [r6, #0x0]
- add r1, r4, #0x0
- bl BufferMoveName
- mov r0, #0x0
- pop {r4-r6, pc}
- .balign 4
-
- thumb_func_start FUN_0204083C
-FUN_0204083C: ; 0x0204083C
- push {r4-r6, lr}
- add r5, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r6, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- add r0, r5, #0x0
- ldrb r4, [r1, #0x0]
- bl ScriptReadHalfword
- add r5, #0x80
- add r1, r0, #0x0
- ldr r0, [r5, #0x0]
- bl VarGet
- add r2, r0, #0x0
- ldr r0, [r6, #0x0]
- add r1, r4, #0x0
- bl BufferMoveName
- mov r0, #0x0
- pop {r4-r6, pc}
- .balign 4
-
- thumb_func_start FUN_02040874
-FUN_02040874: ; 0x02040874
- push {r4-r6, lr}
- sub sp, #0x8
- add r5, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r6, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- add r0, r5, #0x0
- ldrb r4, [r1, #0x0]
- bl ScriptReadHalfword
- add r5, #0x80
- add r1, r0, #0x0
- ldr r0, [r5, #0x0]
- bl VarGet
- add r5, r0, #0x0
- bl FUN_02054C14
- add r3, r0, #0x0
- mov r0, #0x1
- str r0, [sp, #0x0]
- str r0, [sp, #0x4]
- ldr r0, [r6, #0x0]
- add r1, r4, #0x0
- add r2, r5, #0x0
- bl BufferIntegerAsString
- mov r0, #0x0
- add sp, #0x8
- pop {r4-r6, pc}
-
- thumb_func_start FUN_020408BC
-FUN_020408BC: ; 0x020408BC
- push {r4-r7, lr}
- sub sp, #0xc
- add r5, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r7, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- add r0, r5, #0x0
- ldrb r6, [r1, #0x0]
- bl ScriptReadHalfword
- add r1, r0, #0x0
- add r0, r5, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- bl VarGet
- str r0, [sp, #0x8]
- ldr r1, [r5, #0x8]
- add r2, r1, #0x1
- str r2, [r5, #0x8]
- ldrb r4, [r1, #0x0]
- add r1, r2, #0x1
- str r1, [r5, #0x8]
- ldrb r3, [r2, #0x0]
- cmp r4, #0x0
- bne _02040904
- bl FUN_02054C14
- lsl r0, r0, #0x18
- lsr r3, r0, #0x18
-_02040904:
- str r4, [sp, #0x0]
- mov r0, #0x1
- str r0, [sp, #0x4]
- ldr r0, [r7, #0x0]
- ldr r2, [sp, #0x8]
- add r1, r6, #0x0
- bl BufferIntegerAsString
- mov r0, #0x0
- add sp, #0xc
- pop {r4-r7, pc}
- .balign 4
-
- thumb_func_start FUN_0204091C
-FUN_0204091C: ; 0x0204091C
- push {r3-r7, lr}
- add r5, r0, #0x0
- add r0, #0x80
- ldr r6, [r0, #0x0]
- mov r1, #0xf
- add r0, r6, #0x0
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r7, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- add r0, r5, #0x0
- ldrb r4, [r1, #0x0]
- bl ScriptReadHalfword
- add r5, #0x80
- add r1, r0, #0x0
- ldr r0, [r5, #0x0]
- bl VarGet
- add r5, r0, #0x0
- ldr r0, [r6, #0xc]
- bl SavArray_PlayerParty_get
- add r1, r5, #0x0
- bl GetPartyMonByIndex
- add r2, r0, #0x0
- ldr r0, [r7, #0x0]
- add r1, r4, #0x0
- bl BufferBoxMonNickname
- mov r0, #0x0
- pop {r3-r7, pc}
- .balign 4
-
- thumb_func_start FUN_02040964
-FUN_02040964: ; 0x02040964
- push {r3-r7, lr}
- add r5, r0, #0x0
- add r0, #0x80
- ldr r4, [r0, #0x0]
- ldr r0, [r4, #0xc]
- bl GetStoragePCPointer
- str r0, [sp, #0x0]
- add r0, r4, #0x0
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r6, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- add r0, r5, #0x0
- ldrb r4, [r1, #0x0]
- bl ScriptReadHalfword
- add r5, #0x80
- add r1, r0, #0x0
- ldr r0, [r5, #0x0]
- bl VarGet
- add r5, r0, #0x0
- mov r1, #0x1e
- bl _s32_div_f
- add r7, r0, #0x0
- add r0, r5, #0x0
- mov r1, #0x1e
- bl _s32_div_f
- add r2, r1, #0x0
- ldr r0, [sp, #0x0]
- add r1, r7, #0x0
- bl PCStorage_GetMonByIndexPair
- add r2, r0, #0x0
- ldr r0, [r6, #0x0]
- add r1, r4, #0x0
- bl BufferBoxMonNickname
- mov r0, #0x0
- pop {r3-r7, pc}
-
- thumb_func_start FUN_020409C0
-FUN_020409C0: ; 0x020409C0
- push {r4-r6, lr}
- add r5, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r6, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- add r0, r5, #0x0
- ldrb r4, [r1, #0x0]
- bl ScriptReadHalfword
- add r5, #0x80
- add r1, r0, #0x0
- ldr r0, [r5, #0x0]
- bl VarGet
- add r2, r0, #0x0
- ldr r0, [r6, #0x0]
- add r1, r4, #0x0
- bl BufferPoketchAppName
- mov r0, #0x0
- pop {r4-r6, pc}
- .balign 4
-
- thumb_func_start FUN_020409F8
-FUN_020409F8: ; 0x020409F8
- push {r4-r6, lr}
- add r5, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r6, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- add r0, r5, #0x0
- ldrb r4, [r1, #0x0]
- bl ScriptReadHalfword
- add r5, #0x80
- add r1, r0, #0x0
- ldr r0, [r5, #0x0]
- bl VarGet
- add r2, r0, #0x0
- ldr r0, [r6, #0x0]
- add r1, r4, #0x0
- bl BufferTrainerClassName
- mov r0, #0x0
- pop {r4-r6, pc}
- .balign 4
-
- thumb_func_start FUN_02040A30
-FUN_02040A30: ; 0x02040A30
- push {r3-r7, lr}
- add r7, r0, #0x0
- add r0, #0x80
- ldr r5, [r0, #0x0]
- add r0, r5, #0x0
- bl ScriptEnvironment_GetSav2Ptr
- bl Sav2_PlayerData_GetProfileAddr
- add r4, r0, #0x0
- add r0, r5, #0x0
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r7, #0x8]
- add r6, r0, #0x0
- add r0, r1, #0x1
- str r0, [r7, #0x8]
- add r0, r4, #0x0
- ldrb r5, [r1, #0x0]
- bl PlayerProfile_GetTrainerGender
- add r7, r0, #0x0
- add r0, r4, #0x0
- bl PlayerProfile_GetAvatar
- add r1, r0, #0x0
- add r0, r7, #0x0
- mov r2, #0x2
- bl FUN_020536D0
- add r2, r0, #0x0
- ldr r0, [r6, #0x0]
- add r1, r5, #0x0
- bl BufferTrainerClassNameWithArticle
- mov r0, #0x0
- pop {r3-r7, pc}
-
- thumb_func_start FUN_02040A7C
-FUN_02040A7C: ; 0x02040A7C
- push {r4-r7, lr}
- sub sp, #0xc
- add r5, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r7, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- add r0, r5, #0x0
- ldrb r4, [r1, #0x0]
- bl ScriptReadHalfword
- add r1, r0, #0x0
- add r0, r5, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- bl VarGet
- add r6, r0, #0x0
- add r0, r5, #0x0
- bl ScriptReadHalfword
- ldr r1, [r5, #0x8]
- str r0, [sp, #0x8]
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- ldrb r5, [r1, #0x0]
- add r0, r6, #0x0
- mov r1, #0x4
- bl FUN_02040AE4
- add r6, r0, #0x0
- str r5, [sp, #0x0]
- mov r0, #0x2
- str r0, [sp, #0x4]
- ldr r0, [r7, #0x0]
- ldr r3, [sp, #0x8]
- add r1, r4, #0x0
- add r2, r6, #0x0
- bl BufferString
- add r0, r6, #0x0
- bl String_dtor
- mov r0, #0x0
- add sp, #0xc
- pop {r4-r7, pc}
- .balign 4
-
- thumb_func_start FUN_02040AE4
-FUN_02040AE4: ; 0x02040AE4
- push {r3-r5, lr}
- ldr r2, _02040B08 ; =0x0000016A
- add r4, r0, #0x0
- add r3, r1, #0x0
- mov r0, #0x1
- mov r1, #0x1a
- bl NewMsgDataFromNarc
- add r5, r0, #0x0
- add r1, r4, #0x0
- bl NewString_ReadMsgData
- add r4, r0, #0x0
- add r0, r5, #0x0
- bl DestroyMsgData
- add r0, r4, #0x0
- pop {r3-r5, pc}
- .balign 4
-_02040B08: .word 0x0000016A
-
- thumb_func_start FUN_02040B0C
-FUN_02040B0C: ; 0x02040B0C
- push {r4-r6, lr}
- sub sp, #0x8
- add r4, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r4, #0x8]
- add r6, r0, #0x0
- add r0, r1, #0x1
- str r0, [r4, #0x8]
- add r4, #0x80
- ldr r0, [r4, #0x0]
- ldrb r5, [r1, #0x0]
- ldr r0, [r0, #0xc]
- bl SavArray_Flags_get
- bl FUN_0205F388
- mov r1, #0x4
- bl FUN_02040AE4
- add r4, r0, #0x0
- mov r0, #0x1
- str r0, [sp, #0x0]
- mov r0, #0x2
- str r0, [sp, #0x4]
- ldr r0, [r6, #0x0]
- add r1, r5, #0x0
- add r2, r4, #0x0
- mov r3, #0x0
- bl BufferString
- add r0, r4, #0x0
- bl String_dtor
- mov r0, #0x0
- add sp, #0x8
- pop {r4-r6, pc}
-
- thumb_func_start FUN_02040B5C
-FUN_02040B5C: ; 0x02040B5C
- push {r4-r6, lr}
- sub sp, #0x8
- add r4, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r4, #0x8]
- add r6, r0, #0x0
- add r0, r1, #0x1
- str r0, [r4, #0x8]
- add r4, #0x80
- ldr r0, [r4, #0x0]
- ldrb r5, [r1, #0x0]
- ldr r0, [r0, #0xc]
- bl SavArray_Flags_get
- bl FUN_0205F398
- mov r1, #0x4
- bl FUN_02040AE4
- add r4, r0, #0x0
- mov r0, #0x1
- str r0, [sp, #0x0]
- mov r0, #0x2
- str r0, [sp, #0x4]
- ldr r0, [r6, #0x0]
- add r1, r5, #0x0
- add r2, r4, #0x0
- mov r3, #0x0
- bl BufferString
- add r0, r4, #0x0
- bl String_dtor
- mov r0, #0x0
- add sp, #0x8
- pop {r4-r6, pc}
-
- thumb_func_start FUN_02040BAC
-FUN_02040BAC: ; 0x02040BAC
- push {r4-r6, lr}
- sub sp, #0x8
- add r4, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r4, #0x8]
- add r6, r0, #0x0
- add r0, r1, #0x1
- str r0, [r4, #0x8]
- add r4, #0x80
- ldr r0, [r4, #0x0]
- ldrb r5, [r1, #0x0]
- ldr r0, [r0, #0xc]
- bl SavArray_Flags_get
- bl FUN_0205F3C0
- mov r1, #0x4
- bl FUN_02040AE4
- add r4, r0, #0x0
- mov r0, #0x1
- str r0, [sp, #0x0]
- mov r0, #0x2
- str r0, [sp, #0x4]
- ldr r0, [r6, #0x0]
- add r1, r5, #0x0
- add r2, r4, #0x0
- mov r3, #0x0
- bl BufferString
- add r0, r4, #0x0
- bl String_dtor
- mov r0, #0x0
- add sp, #0x8
- pop {r4-r6, pc}
-
- thumb_func_start FUN_02040BFC
-FUN_02040BFC: ; 0x02040BFC
- push {r4-r6, lr}
- add r5, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r6, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- add r0, r5, #0x0
- ldrb r4, [r1, #0x0]
- bl ScriptReadHalfword
- add r5, #0x80
- add r1, r0, #0x0
- ldr r0, [r5, #0x0]
- bl VarGet
- add r2, r0, #0x0
- ldr r0, [r6, #0x0]
- add r1, r4, #0x0
- bl BufferDecorationName
- mov r0, #0x0
- pop {r4-r6, pc}
- .balign 4
-
- thumb_func_start FUN_02040C34
-FUN_02040C34: ; 0x02040C34
- push {r4-r6, lr}
- add r5, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r6, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- add r0, r5, #0x0
- ldrb r4, [r1, #0x0]
- bl ScriptReadHalfword
- add r5, #0x80
- add r1, r0, #0x0
- ldr r0, [r5, #0x0]
- bl VarGet
- add r2, r0, #0x0
- ldr r0, [r6, #0x0]
- add r1, r4, #0x0
- bl BufferUndergroundTrapName
- mov r0, #0x0
- pop {r4-r6, pc}
- .balign 4
-
- thumb_func_start FUN_02040C6C
-FUN_02040C6C: ; 0x02040C6C
- push {r4-r6, lr}
- add r5, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r6, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- add r0, r5, #0x0
- ldrb r4, [r1, #0x0]
- bl ScriptReadHalfword
- add r5, #0x80
- add r1, r0, #0x0
- ldr r0, [r5, #0x0]
- bl VarGet
- add r2, r0, #0x0
- ldr r0, [r6, #0x0]
- add r1, r4, #0x0
- bl BufferUndergroundItemName
- mov r0, #0x0
- pop {r4-r6, pc}
- .balign 4
-
- thumb_func_start FUN_02040CA4
-FUN_02040CA4: ; 0x02040CA4
- push {r3-r7, lr}
- sub sp, #0x8
- add r5, r0, #0x0
- mov r0, #0x16
- mov r1, #0x4
- bl String_ctor
- add r4, r0, #0x0
- add r0, r5, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r7, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- add r0, r5, #0x0
- ldrb r6, [r1, #0x0]
- bl ScriptReadHalfword
- add r5, #0x80
- add r1, r0, #0x0
- ldr r0, [r5, #0x0]
- bl VarGet
- mov r1, #0x4
- add r2, r4, #0x0
- bl FUN_02064E60
- mov r0, #0x1
- str r0, [sp, #0x0]
- mov r0, #0x2
- str r0, [sp, #0x4]
- ldr r0, [r7, #0x0]
- add r1, r6, #0x0
- add r2, r4, #0x0
- mov r3, #0x0
- bl BufferString
- add r0, r4, #0x0
- bl String_dtor
- mov r0, #0x0
- add sp, #0x8
- pop {r3-r7, pc}
- .balign 4
-
- thumb_func_start FUN_02040D04
-FUN_02040D04: ; 0x02040D04
- push {r3-r7, lr}
- sub sp, #0x8
- add r4, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r4, #0x8]
- add r7, r0, #0x0
- add r0, r1, #0x1
- str r0, [r4, #0x8]
- add r0, r4, #0x0
- ldrb r6, [r1, #0x0]
- bl ScriptReadHalfword
- add r1, r0, #0x0
- add r0, r4, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- bl VarGet
- add r5, r0, #0x0
- add r0, r4, #0x0
- bl ScriptReadHalfword
- add r4, #0x80
- add r1, r0, #0x0
- ldr r0, [r4, #0x0]
- bl VarGet
- sub r5, #0x95
- add r4, r0, #0x0
- lsl r0, r5, #0x10
- lsr r0, r0, #0x10
- mov r1, #0x20
- bl GetNutName
- add r5, r0, #0x0
- cmp r4, #0x2
- bhs _02040D5A
- mov r0, #0x1
- b _02040D5C
-_02040D5A:
- mov r0, #0x0
-_02040D5C:
- str r0, [sp, #0x0]
- mov r0, #0x2
- str r0, [sp, #0x4]
- ldr r0, [r7, #0x0]
- add r1, r6, #0x0
- add r2, r5, #0x0
- mov r3, #0x0
- bl BufferString
- add r0, r5, #0x0
- bl String_dtor
- mov r0, #0x0
- add sp, #0x8
- pop {r3-r7, pc}
- .balign 4
-
- thumb_func_start FUN_02040D7C
-FUN_02040D7C: ; 0x02040D7C
- push {r4-r6, lr}
- add r5, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r6, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- add r0, r5, #0x0
- ldrb r4, [r1, #0x0]
- bl ScriptReadHalfword
- add r5, #0x80
- add r1, r0, #0x0
- ldr r0, [r5, #0x0]
- bl VarGet
- add r2, r0, #0x0
- ldr r0, [r6, #0x0]
- add r1, r4, #0x0
- bl BufferNatureName
- mov r0, #0x0
- pop {r4-r6, pc}
- .balign 4
-
- thumb_func_start FUN_02040DB4
-FUN_02040DB4: ; 0x02040DB4
- push {r4-r6, lr}
- add r5, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r6, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- add r0, r5, #0x0
- ldrb r4, [r1, #0x0]
- bl ScriptReadHalfword
- add r5, #0x80
- add r1, r0, #0x0
- ldr r0, [r5, #0x0]
- bl VarGet
- add r2, r0, #0x0
- ldr r0, [r6, #0x0]
- add r1, r4, #0x0
- bl BufferFashionName
- mov r0, #0x0
- pop {r4-r6, pc}
- .balign 4
-
- thumb_func_start FUN_02040DEC
-FUN_02040DEC: ; 0x02040DEC
- push {r3-r7, lr}
- sub sp, #0x8
- add r5, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r7, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- mov r0, #0xb
- ldrb r6, [r1, #0x0]
- add r1, r0, #0x0
- bl String_ctor
- add r5, #0x80
- add r4, r0, #0x0
- ldr r0, [r5, #0x0]
- ldr r0, [r0, #0xc]
- bl FUN_02024EB4
- bl FUN_02024F0C
- add r1, r0, #0x0
- add r0, r4, #0x0
- bl CopyU16ArrayToString
- ldr r0, _02040E48 ; =gGameLanguage
- mov r3, #0x0
- ldrb r0, [r0, #0x0]
- str r3, [sp, #0x0]
- add r1, r6, #0x0
- str r0, [sp, #0x4]
- ldr r0, [r7, #0x0]
- add r2, r4, #0x0
- bl BufferString
- add r0, r4, #0x0
- bl String_dtor
- mov r0, #0x0
- add sp, #0x8
- pop {r3-r7, pc}
- nop
-_02040E48: .word gGameLanguage
-
- thumb_func_start FUN_02040E4C
-FUN_02040E4C: ; 0x02040E4C
- push {r3-r7, lr}
- add r4, r0, #0x0
- add r0, #0x80
- ldr r6, [r0, #0x0]
- mov r1, #0xf
- add r0, r6, #0x0
- bl FUN_02039438
- ldr r1, [r4, #0x8]
- add r7, r0, #0x0
- add r0, r1, #0x1
- str r0, [r4, #0x8]
- add r0, r4, #0x0
- ldrb r5, [r1, #0x0]
- bl ScriptReadHalfword
- add r1, r0, #0x0
- add r0, r4, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- bl VarGet
- str r0, [sp, #0x0]
- add r0, r4, #0x0
- bl ScriptReadHalfword
- add r4, #0x80
- add r1, r0, #0x0
- ldr r0, [r4, #0x0]
- bl VarGet
- add r4, r0, #0x0
- ldr r0, [r6, #0xc]
- bl SavArray_PlayerParty_get
- ldr r1, [sp, #0x0]
- bl GetPartyMonByIndex
- add r4, #0x36
- add r1, r4, #0x0
- mov r2, #0x0
- bl GetMonData
- lsl r0, r0, #0x10
- lsr r2, r0, #0x10
- ldr r0, [r7, #0x0]
- add r1, r5, #0x0
- bl BufferMoveName
- mov r0, #0x0
- pop {r3-r7, pc}
- .balign 4
-
- thumb_func_start FUN_02040EB4
-FUN_02040EB4: ; 0x02040EB4
- push {r4-r6, lr}
- add r5, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r6, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- add r0, r5, #0x0
- ldrb r4, [r1, #0x0]
- bl ScriptReadHalfword
- add r5, #0x80
- add r1, r0, #0x0
- ldr r0, [r5, #0x0]
- bl VarGet
- lsl r0, r0, #0x18
- lsr r0, r0, #0x18
- mov r1, #0x3
- bl FUN_0207FC5C
- lsl r0, r0, #0x10
- lsr r2, r0, #0x10
- ldr r0, [r6, #0x0]
- add r1, r4, #0x0
- bl BufferRibbonNameOrDesc
- mov r0, #0x0
- pop {r4-r6, pc}
- .balign 4
-
- thumb_func_start FUN_02040EF8
-FUN_02040EF8: ; 0x02040EF8
- push {r4-r6, lr}
- add r5, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r6, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- add r0, r5, #0x0
- ldrb r4, [r1, #0x0]
- bl ScriptReadHalfword
- add r5, #0x80
- add r1, r0, #0x0
- ldr r0, [r5, #0x0]
- bl VarGet
- add r2, r0, #0x0
- sub r2, r2, #0x1
- lsl r2, r2, #0x10
- ldr r0, [r6, #0x0]
- add r1, r4, #0x0
- lsr r2, r2, #0x10
- bl BufferSealName
- mov r0, #0x0
- pop {r4-r6, pc}
-
- thumb_func_start FUN_02040F34
-FUN_02040F34: ; 0x02040F34
- push {r4-r6, lr}
- add r5, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r6, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- add r0, r5, #0x0
- ldrb r4, [r1, #0x0]
- bl ScriptReadHalfword
- add r5, #0x80
- add r1, r0, #0x0
- ldr r0, [r5, #0x0]
- bl VarGet
- add r2, r0, #0x0
- ldr r0, [r6, #0x0]
- add r1, r4, #0x0
- bl BufferItemNameWithIndefArticle
- mov r0, #0x0
- pop {r4-r6, pc}
- .balign 4
-
- thumb_func_start FUN_02040F6C
-FUN_02040F6C: ; 0x02040F6C
- push {r4-r6, lr}
- add r5, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r6, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- add r0, r5, #0x0
- ldrb r4, [r1, #0x0]
- bl ScriptReadHalfword
- add r5, #0x80
- add r1, r0, #0x0
- ldr r0, [r5, #0x0]
- bl VarGet
- add r2, r0, #0x0
- ldr r0, [r6, #0x0]
- add r1, r4, #0x0
- bl BufferItemNamePlural
- mov r0, #0x0
- pop {r4-r6, pc}
- .balign 4
-
- thumb_func_start FUN_02040FA4
-FUN_02040FA4: ; 0x02040FA4
- push {r4-r6, lr}
- add r5, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r6, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- add r0, r5, #0x0
- ldrb r4, [r1, #0x0]
- bl ScriptReadHalfword
- add r5, #0x80
- add r1, r0, #0x0
- ldr r0, [r5, #0x0]
- bl VarGet
- add r2, r0, #0x0
- ldr r0, [r6, #0x0]
- add r1, r4, #0x0
- bl BufferDecorationNameWithArticle
- mov r0, #0x0
- pop {r4-r6, pc}
- .balign 4
-
- thumb_func_start FUN_02040FDC
-FUN_02040FDC: ; 0x02040FDC
- push {r4-r6, lr}
- add r5, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r6, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- add r0, r5, #0x0
- ldrb r4, [r1, #0x0]
- bl ScriptReadHalfword
- add r5, #0x80
- add r1, r0, #0x0
- ldr r0, [r5, #0x0]
- bl VarGet
- add r2, r0, #0x0
- ldr r0, [r6, #0x0]
- add r1, r4, #0x0
- bl BufferUndergroundTrapNameWithArticle
- mov r0, #0x0
- pop {r4-r6, pc}
- .balign 4
-
- thumb_func_start FUN_02041014
-FUN_02041014: ; 0x02041014
- push {r4-r6, lr}
- add r5, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r6, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- add r0, r5, #0x0
- ldrb r4, [r1, #0x0]
- bl ScriptReadHalfword
- add r5, #0x80
- add r1, r0, #0x0
- ldr r0, [r5, #0x0]
- bl VarGet
- add r2, r0, #0x0
- ldr r0, [r6, #0x0]
- add r1, r4, #0x0
- bl BufferUndergroundItemNameWithArticle
- mov r0, #0x0
- pop {r4-r6, pc}
- .balign 4
-
- thumb_func_start FUN_0204104C
-FUN_0204104C: ; 0x0204104C
- push {r3-r7, lr}
- add r5, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r6, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- add r0, r5, #0x0
- ldrb r4, [r1, #0x0]
- bl ScriptReadHalfword
- add r1, r0, #0x0
- add r0, r5, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- bl VarGet
- add r7, r0, #0x0
- add r0, r5, #0x0
- bl ScriptReadHalfword
- ldr r0, [r5, #0x8]
- add r1, r4, #0x0
- add r0, r0, #0x1
- str r0, [r5, #0x8]
- ldr r0, [r6, #0x0]
- add r2, r7, #0x0
- bl BufferSpeciesNameWithArticle
- mov r0, #0x0
- pop {r3-r7, pc}
- .balign 4
-
- thumb_func_start FUN_02041094
-FUN_02041094: ; 0x02041094
- push {r4-r6, lr}
- add r5, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r6, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- add r5, #0x80
- ldr r0, [r5, #0x0]
- ldrb r4, [r1, #0x0]
- ldr r0, [r0, #0xc]
- bl SavArray_Flags_get
- bl FUN_0205F3C0
- add r2, r0, #0x0
- ldr r0, [r6, #0x0]
- add r1, r4, #0x0
- bl BufferSpeciesNameWithArticle
- mov r0, #0x0
- pop {r4-r6, pc}
-
- thumb_func_start FUN_020410C8
-FUN_020410C8: ; 0x020410C8
- push {r4-r6, lr}
- add r5, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r6, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- add r0, r5, #0x0
- ldrb r4, [r1, #0x0]
- bl ScriptReadHalfword
- add r5, #0x80
- add r1, r0, #0x0
- ldr r0, [r5, #0x0]
- bl VarGet
- add r2, r0, #0x0
- ldr r0, [r6, #0x0]
- add r1, r4, #0x0
- bl BufferFashionNameWithArticle
- mov r0, #0x0
- pop {r4-r6, pc}
- .balign 4
-
- thumb_func_start FUN_02041100
-FUN_02041100: ; 0x02041100
- push {r4-r6, lr}
- add r5, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r6, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- add r0, r5, #0x0
- ldrb r4, [r1, #0x0]
- bl ScriptReadHalfword
- add r5, #0x80
- add r1, r0, #0x0
- ldr r0, [r5, #0x0]
- bl VarGet
- add r2, r0, #0x0
- ldr r0, [r6, #0x0]
- add r1, r4, #0x0
- bl BufferTrainerClassNameWithArticle
- mov r0, #0x0
- pop {r4-r6, pc}
- .balign 4
-
- thumb_func_start FUN_02041138
-FUN_02041138: ; 0x02041138
- push {r4-r6, lr}
- add r5, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r1, [r5, #0x8]
- add r6, r0, #0x0
- add r0, r1, #0x1
- str r0, [r5, #0x8]
- add r0, r5, #0x0
- ldrb r4, [r1, #0x0]
- bl ScriptReadHalfword
- add r5, #0x80
- add r1, r0, #0x0
- ldr r0, [r5, #0x0]
- bl VarGet
- add r2, r0, #0x0
- sub r2, r2, #0x1
- lsl r2, r2, #0x10
- ldr r0, [r6, #0x0]
- add r1, r4, #0x0
- lsr r2, r2, #0x10
- bl BufferSealNamePlural
- mov r0, #0x0
- pop {r4-r6, pc}
-
- thumb_func_start FUN_02041174
-FUN_02041174: ; 0x02041174
- push {r4, lr}
- add r4, r0, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- mov r1, #0xf
- bl FUN_02039438
- ldr r2, [r4, #0x8]
- add r1, r2, #0x1
- str r1, [r4, #0x8]
- ldrb r1, [r2, #0x0]
- ldr r0, [r0, #0x0]
- bl ScrStrBufs_UpperFirstChar
- mov r0, #0x0
- pop {r4, pc}
diff --git a/arm9/asm/unk_02038C78.s b/arm9/asm/unk_02038C78.s
index b79288ca..a4b7aa12 100644
--- a/arm9/asm/unk_02038C78.s
+++ b/arm9/asm/unk_02038C78.s
@@ -354,28 +354,28 @@ gScriptCmdTable: ; 0x020F355C
.word FUN_0203CB20
.word FUN_0203CB48
.word FUN_0203CB60
- .word FUN_020406CC
- .word FUN_02040700
- .word FUN_02040724
- .word FUN_02040748
- .word FUN_02040790
- .word FUN_020407C8
- .word FUN_02040800
- .word FUN_0204083C
- .word FUN_02040874
- .word FUN_0204091C
- .word FUN_020409C0
- .word FUN_020409F8
- .word FUN_02040A30
- .word FUN_02040A7C
- .word FUN_02040B0C
- .word FUN_02040B5C
- .word FUN_02040BAC
+ .word ScrCmd_GetPlayerName
+ .word ScrCmd_GetRivalName
+ .word ScrCmd_GetFriendName
+ .word ScrCmd_Unk00D0
+ .word ScrCmd_GetItemName
+ .word ScrCmd_GetPocketName
+ .word ScrCmd_GetTMHMMoveName
+ .word ScrCmd_GetMoveName
+ .word ScrCmd_Unk00D5
+ .word ScrCmd_Unk00D6
+ .word ScrCmd_GetPoketchAppName
+ .word ScrCmd_GetTrainerClassName
+ .word ScrCmd_Unk00D9
+ .word ScrCmd_Unk00DA
+ .word ScrCmd_Unk00DB
+ .word ScrCmd_Unk00DC
+ .word ScrCmd_Unk00DD
.word FUN_0203CBBC
- .word FUN_02040BFC
- .word FUN_02040C34
- .word FUN_02040C6C
- .word FUN_02040CA4
+ .word ScrCmd_GetDecorationName
+ .word ScrCmd_GetUndergroundTrapName
+ .word ScrCmd_GetUndergroundItemName
+ .word ScrCmd_Unk00E2
.word FUN_0203CB70
.word FUN_0204185C
.word FUN_0204188C
@@ -528,8 +528,8 @@ gScriptCmdTable: ; 0x020F355C
.word FUN_0203C460
.word FUN_0203C4B0
.word FUN_0203D958
- .word FUN_02040D04
- .word FUN_02040D7C
+ .word ScrCmd_Unk017B
+ .word ScrCmd_GetNatureName
.word ScrCmd_Unk017D
.word ScrCmd_Unk017E
.word ScrCmd_Unk017F
@@ -608,7 +608,7 @@ gScriptCmdTable: ; 0x020F355C
.word FUN_02044D8C
.word FUN_02044E34
.word FUN_02044E78
- .word FUN_02040E4C
+ .word ScrCmd_GetPokemonMoveName
.word FUN_0203E138
.word FUN_0203E168
.word FUN_0203E254
@@ -711,7 +711,7 @@ gScriptCmdTable: ; 0x020F355C
.word FUN_0204505C
.word FUN_02045104
.word FUN_02045170
- .word FUN_02040EB4
+ .word ScrCmd_Unk0232
.word FUN_0203E9CC
.word FUN_0203EA68
.word FUN_02041E40
@@ -742,7 +742,7 @@ gScriptCmdTable: ; 0x020F355C
.word FUN_02041194
.word FUN_020411C4
.word FUN_02041340
- .word FUN_02040964
+ .word ScrCmd_Unk0251
.word ScrCmd_pcfreespace
.word ScrCmd_Unk0253
.word ScrCmd_Unk0254
@@ -758,7 +758,7 @@ gScriptCmdTable: ; 0x020F355C
.word FUN_0203EE58
.word FUN_0203EE68
.word FUN_0203EE78
- .word FUN_02040DB4
+ .word ScrCmd_GetFashionName
.word FUN_0203EE98
.word FUN_0203EED8
.word FUN_0203EF58
@@ -775,7 +775,7 @@ gScriptCmdTable: ; 0x020F355C
.word FUN_0203F254
.word FUN_0203F26C
.word FUN_0203C58C
- .word FUN_02040DEC
+ .word ScrCmd_Unk0272
.word FUN_0203F2AC
.word ScrCmd_HasEnoughCoinsImmediate
.word FUN_0203F2E4
@@ -789,7 +789,7 @@ gScriptCmdTable: ; 0x020F355C
.word FUN_0203F3AC
.word FUN_0203F44C
.word FUN_0203F418
- .word FUN_020408BC
+ .word ScrCmd_Unk0280
.word FUN_02044A0C
.word FUN_0203F484
.word FUN_02041674
@@ -840,7 +840,7 @@ gScriptCmdTable: ; 0x020F355C
.word FUN_0203FB94
.word FUN_0203FBA0
.word FUN_0203FBAC
- .word FUN_02040EF8
+ .word ScrCmd_GetSealName
.word FUN_0203B2E0
.word FUN_0203FBBC
.word FUN_0203FC1C
@@ -857,17 +857,17 @@ gScriptCmdTable: ; 0x020F355C
.word FUN_0203FC80
.word FUN_0203FCB0
.word FUN_0203FCDC
- .word FUN_02040F34
- .word FUN_02040F6C
- .word FUN_02040FA4
- .word FUN_02040FDC
- .word FUN_02041014
- .word FUN_0204104C
- .word FUN_02041094
- .word FUN_020410C8
- .word FUN_02041100
- .word FUN_02041138
- .word FUN_02041174
+ .word ScrCmd_GetItemNameWithIndefArticle
+ .word ScrCmd_GetItemNamePlural
+ .word ScrCmd_GetDecorationNameWithArticle
+ .word ScrCmd_GetUndergroundTrapNameWithArticle
+ .word ScrCmd_GetUndergroundItemNameWithArticle
+ .word ScrCmd_Unk02C9
+ .word ScrCmd_Unk02CA
+ .word ScrCmd_GetFashionNameWithArticle
+ .word ScrCmd_Unk02CC
+ .word ScrCmd_GetSealNamePlural
+ .word ScrCmd_CapitalizeFirstChar
.word ScrCmd_Unk02CF
.word ScrCmd_Unk02D0
diff --git a/arm9/global.inc b/arm9/global.inc
index 0da3fadd..bda86b74 100644
--- a/arm9/global.inc
+++ b/arm9/global.inc
@@ -3152,47 +3152,47 @@
.extern FUN_0204064C
.extern FUN_02040660
.extern FUN_020406C0
-.extern FUN_020406CC
-.extern FUN_02040700
-.extern FUN_02040724
-.extern FUN_02040748
-.extern FUN_02040790
-.extern FUN_020407C8
-.extern FUN_02040800
-.extern FUN_0204083C
-.extern FUN_02040874
-.extern FUN_020408BC
-.extern FUN_0204091C
-.extern FUN_02040964
-.extern FUN_020409C0
-.extern FUN_020409F8
-.extern FUN_02040A30
-.extern FUN_02040A7C
-.extern FUN_02040B0C
-.extern FUN_02040B5C
-.extern FUN_02040BAC
-.extern FUN_02040BFC
-.extern FUN_02040C34
-.extern FUN_02040C6C
-.extern FUN_02040CA4
-.extern FUN_02040D04
-.extern FUN_02040D7C
-.extern FUN_02040DB4
-.extern FUN_02040DEC
-.extern FUN_02040E4C
-.extern FUN_02040EB4
-.extern FUN_02040EF8
-.extern FUN_02040F34
-.extern FUN_02040F6C
-.extern FUN_02040FA4
-.extern FUN_02040FDC
-.extern FUN_02041014
-.extern FUN_0204104C
-.extern FUN_02041094
-.extern FUN_020410C8
-.extern FUN_02041100
-.extern FUN_02041138
-.extern FUN_02041174
+.extern ScrCmd_GetPlayerName
+.extern ScrCmd_GetRivalName
+.extern ScrCmd_GetFriendName
+.extern ScrCmd_Unk00D0
+.extern ScrCmd_GetItemName
+.extern ScrCmd_GetPocketName
+.extern ScrCmd_GetTMHMMoveName
+.extern ScrCmd_GetMoveName
+.extern ScrCmd_Unk00D5
+.extern ScrCmd_Unk0280
+.extern ScrCmd_Unk00D6
+.extern ScrCmd_Unk0251
+.extern ScrCmd_GetPoketchAppName
+.extern ScrCmd_GetTrainerClassName
+.extern ScrCmd_Unk00D9
+.extern ScrCmd_Unk00DA
+.extern ScrCmd_Unk00DB
+.extern ScrCmd_Unk00DC
+.extern ScrCmd_Unk00DD
+.extern ScrCmd_GetDecorationName
+.extern ScrCmd_GetUndergroundTrapName
+.extern ScrCmd_GetUndergroundItemName
+.extern ScrCmd_Unk00E2
+.extern ScrCmd_Unk017B
+.extern ScrCmd_GetNatureName
+.extern ScrCmd_GetFashionName
+.extern ScrCmd_Unk0272
+.extern ScrCmd_GetPokemonMoveName
+.extern ScrCmd_Unk0232
+.extern ScrCmd_GetSealName
+.extern ScrCmd_GetItemNameWithIndefArticle
+.extern ScrCmd_GetItemNamePlural
+.extern ScrCmd_GetDecorationNameWithArticle
+.extern ScrCmd_GetUndergroundTrapNameWithArticle
+.extern ScrCmd_GetUndergroundItemNameWithArticle
+.extern ScrCmd_Unk02C9
+.extern ScrCmd_Unk02CA
+.extern ScrCmd_GetFashionNameWithArticle
+.extern ScrCmd_Unk02CC
+.extern ScrCmd_GetSealNamePlural
+.extern ScrCmd_CapitalizeFirstChar
.extern FUN_02041194
.extern FUN_020411C4
.extern FUN_02041340
diff --git a/arm9/src/scrcmd_names.c b/arm9/src/scrcmd_names.c
new file mode 100644
index 00000000..cf721328
--- /dev/null
+++ b/arm9/src/scrcmd_names.c
@@ -0,0 +1,540 @@
+#include "scrcmd.h"
+#include "event_data.h"
+#include "itemtool.h"
+#include "nutdata.h"
+#include "party.h"
+#include "player_data.h"
+#include "script_buffers.h"
+#include "unk_02024E64.h"
+#include "unk_02064E4C.h"
+#include "unk_0207FC5C.h"
+
+extern void* FUN_02039438(struct UnkSavStruct80* sav_ptr, int idx);
+
+extern u32 FUN_020536D0(u32 gender, u32 avatar, u32 a2);
+extern u32 FUN_0205F388(struct ScriptState* state);
+extern u32 FUN_0205F398(struct ScriptState* state);
+extern struct PCStorage* GetStoragePCPointer(struct SaveBlock2* sav2);
+extern u32 FUN_0205F3C0(struct ScriptState* state);
+extern u32 FUN_02054C14(u32 number);
+
+THUMB_FUNC BOOL ScrCmd_GetPlayerName(struct ScriptContext* ctx)
+{
+ struct UnkSavStruct80* sav_ptr = ctx->unk80;
+ struct ScrStrBufs** mgr = FUN_02039438(sav_ptr, 15);
+ u8 idx = ScriptReadByte(ctx);
+ struct SaveBlock2* sav2 = ScriptEnvironment_GetSav2Ptr(sav_ptr);
+ struct PlayerData* player = Sav2_PlayerData_GetProfileAddr(sav2);
+
+ BufferPlayersName(*mgr, idx, player);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_GetRivalName(struct ScriptContext* ctx)
+{
+ struct UnkSavStruct80* sav_ptr = ctx->unk80;
+ struct ScrStrBufs** mgr = FUN_02039438(sav_ptr, 15);
+ u8 idx = ScriptReadByte(ctx);
+
+ BufferRivalsName(*mgr, idx, sav_ptr->saveBlock2);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_GetFriendName(struct ScriptContext* ctx)
+{
+ struct UnkSavStruct80* sav_ptr = ctx->unk80;
+ struct ScrStrBufs** mgr = FUN_02039438(sav_ptr, 15);
+ u8 idx = ScriptReadByte(ctx);
+
+ BufferFriendsName(*mgr, idx, sav_ptr->saveBlock2);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk00D0(struct ScriptContext* ctx)
+{
+ struct UnkSavStruct80* sav_ptr = ctx->unk80;
+ struct ScrStrBufs** mgr = FUN_02039438(sav_ptr, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u16 mon_idx = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+ struct PlayerParty* party = SavArray_PlayerParty_get(sav_ptr->saveBlock2);
+ struct Pokemon* mon = GetPartyMonByIndex(party, mon_idx);
+
+ BufferBoxMonSpeciesName(*mgr, idx, &mon->box);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_GetItemName(struct ScriptContext* ctx)
+{
+ struct UnkSavStruct80* sav_ptr = ctx->unk80;
+ struct ScrStrBufs** mgr = FUN_02039438(sav_ptr, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u16 item = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+
+ BufferItemName(*mgr, idx, item);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_GetPocketName(struct ScriptContext* ctx)
+{
+ struct UnkSavStruct80* sav_ptr = ctx->unk80;
+ struct ScrStrBufs** mgr = FUN_02039438(sav_ptr, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u16 pocket = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+
+ BufferPocketName(*mgr, idx, pocket);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_GetTMHMMoveName(struct ScriptContext* ctx)
+{
+ struct UnkSavStruct80* sav_ptr = ctx->unk80;
+ struct ScrStrBufs** mgr = FUN_02039438(sav_ptr, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u16 tmhm = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+ u16 move = TMHMGetMove(tmhm);
+
+ BufferMoveName(*mgr, idx, move);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_GetMoveName(struct ScriptContext* ctx)
+{
+ struct UnkSavStruct80* sav_ptr = ctx->unk80;
+ struct ScrStrBufs** mgr = FUN_02039438(sav_ptr, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u16 move = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+
+ BufferMoveName(*mgr, idx, move);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk00D5(struct ScriptContext* ctx)
+{
+ struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u16 unk = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+ u32 digits = FUN_02054C14(unk);
+
+ BufferIntegerAsString(*mgr, idx, unk, digits, 1, TRUE);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk0280(struct ScriptContext* ctx)
+{
+ struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u16 unk = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+ u8 unk2 = ScriptReadByte(ctx);
+ u8 digits = ScriptReadByte(ctx);
+ if (unk2 == 0)
+ {
+ digits = (u8)FUN_02054C14(unk);
+ }
+
+ BufferIntegerAsString(*mgr, idx, unk, digits, unk2, TRUE);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk00D6(struct ScriptContext* ctx)
+{
+ struct UnkSavStruct80* sav_ptr = ctx->unk80;
+ struct ScrStrBufs** mgr = FUN_02039438(sav_ptr, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u16 mon_idx = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+ struct PlayerParty* party = SavArray_PlayerParty_get(sav_ptr->saveBlock2);
+ struct Pokemon* pokemon = GetPartyMonByIndex(party, mon_idx);
+
+ BufferBoxMonNickname(*mgr, idx, &pokemon->box);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk0251(struct ScriptContext* ctx)
+{
+ struct UnkSavStruct80* sav_ptr = ctx->unk80;
+ struct PCStorage* pc = GetStoragePCPointer(sav_ptr->saveBlock2);
+ struct ScrStrBufs** mgr = FUN_02039438(sav_ptr, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u16 box_mon_idx = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+ s32 box_no = box_mon_idx / 30;
+ s32 slot_no = box_mon_idx % 30;
+ struct BoxPokemon* box_mon = PCStorage_GetMonByIndexPair(pc, box_no, slot_no);
+
+ BufferBoxMonNickname(*mgr, idx, box_mon);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_GetPoketchAppName(struct ScriptContext* ctx)
+{
+ struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u16 app = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+
+ BufferPoketchAppName(*mgr, idx, app);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_GetTrainerClassName(struct ScriptContext* ctx)
+{
+ struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u16 trainer_class = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+
+ BufferTrainerClassName(*mgr, idx, trainer_class);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk00D9(struct ScriptContext* ctx)
+{
+ struct UnkSavStruct80* sav_ptr = ctx->unk80;
+ struct SaveBlock2* sav2 = ScriptEnvironment_GetSav2Ptr(sav_ptr);
+ struct PlayerData* player = Sav2_PlayerData_GetProfileAddr(sav2);
+ struct ScrStrBufs** mgr = FUN_02039438(sav_ptr, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u32 gender = PlayerProfile_GetTrainerGender(player);
+ u32 avatar = PlayerProfile_GetAvatar(player);
+ u32 trainer_class = FUN_020536D0(gender, avatar, 2);
+
+ BufferTrainerClassNameWithArticle(*mgr, idx, trainer_class);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk00DA(struct ScriptContext* ctx)
+{
+ struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u16 msg_no = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+ u16 unk1 = ScriptReadHalfword(ctx);
+ u8 unk2 = ScriptReadByte(ctx);
+ struct String* str = FUN_02040AE4(msg_no, 4);
+
+ BufferString(*mgr, idx, str, unk1, unk2, 2);
+ String_dtor(str);
+
+ return FALSE;
+}
+
+THUMB_FUNC struct String* FUN_02040AE4(u32 msg_no, u32 heap_id)
+{
+ struct MsgData* msg_data = NewMsgDataFromNarc(1, NARC_MSGDATA_MSG, 362, heap_id);
+ struct String* ret = NewString_ReadMsgData(msg_data, msg_no);
+ DestroyMsgData(msg_data);
+
+ return ret;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk00DB(struct ScriptContext* ctx)
+{
+ struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
+ u8 idx = ScriptReadByte(ctx);
+ struct ScriptState* state = SavArray_Flags_get(ctx->unk80->saveBlock2);
+ u32 msg_no = FUN_0205F388(state);
+ struct String* str = FUN_02040AE4(msg_no, 4);
+
+ BufferString(*mgr, idx, str, 0, 1, 2);
+ String_dtor(str);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk00DC(struct ScriptContext* ctx)
+{
+ struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
+ u8 idx = ScriptReadByte(ctx);
+ struct ScriptState* state = SavArray_Flags_get(ctx->unk80->saveBlock2);
+ u32 msg_no = FUN_0205F398(state);
+ struct String* str = FUN_02040AE4(msg_no, 4);
+
+ BufferString(*mgr, idx, str, 0, 1, 2);
+ String_dtor(str);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk00DD(struct ScriptContext* ctx)
+{
+ struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
+ u8 idx = ScriptReadByte(ctx);
+ struct ScriptState* state = SavArray_Flags_get(ctx->unk80->saveBlock2);
+ u32 msg_no = FUN_0205F3C0(state);
+ struct String* str = FUN_02040AE4(msg_no, 4);
+
+ BufferString(*mgr, idx, str, 0, 1, 2);
+ String_dtor(str);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_GetDecorationName(struct ScriptContext* ctx)
+{
+ struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u16 decoration = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+
+ BufferDecorationName(*mgr, idx, decoration);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_GetUndergroundTrapName(struct ScriptContext* ctx)
+{
+ struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u16 underground_trap = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+
+ BufferUndergroundTrapName(*mgr, idx, underground_trap);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_GetUndergroundItemName(struct ScriptContext* ctx)
+{
+ struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u16 underground_item = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+
+ BufferUndergroundItemName(*mgr, idx, underground_item);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk00E2(struct ScriptContext* ctx)
+{
+ struct String* str = String_ctor(22, 4);
+ struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u16 map_no = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+
+ FUN_02064E60(map_no, 4, str);
+ BufferString(*mgr, idx, str, 0, 1, 2);
+ String_dtor(str);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk017B(struct ScriptContext* ctx)
+{
+ struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u16 berry = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+ u16 unk = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+ struct String* nut_name = GetNutName((u16)(berry - FIRST_BERRY_IDX), 32);
+
+ BufferString(*mgr, idx, nut_name, 0, unk < 2, 2);
+ String_dtor(nut_name);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_GetNatureName(struct ScriptContext* ctx)
+{
+ struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u16 nature = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+
+ BufferNatureName(*mgr, idx, nature);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_GetFashionName(struct ScriptContext* ctx)
+{
+ struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u16 fashion = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+
+ BufferFashionName(*mgr, idx, fashion);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk0272(struct ScriptContext* ctx)
+{
+ struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
+ u8 idx = ScriptReadByte(ctx);
+ struct String* str = String_ctor(11, 11);
+ struct UnkStruct_02024E64* unk = FUN_02024EB4(ctx->unk80->saveBlock2);
+ u16* unk_buffer = FUN_02024F0C(unk);
+
+ CopyU16ArrayToString(str, unk_buffer);
+ BufferString(*mgr, idx, str, 0, 0, gGameLanguage);
+ String_dtor(str);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_GetPokemonMoveName(struct ScriptContext* ctx)
+{
+ struct UnkSavStruct80* sav_ptr = ctx->unk80;
+ struct ScrStrBufs** mgr = FUN_02039438(sav_ptr, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u16 mon_idx = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+ u16 mon_move_idx = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+ struct PlayerParty* party = SavArray_PlayerParty_get(sav_ptr->saveBlock2);
+ struct Pokemon* pokemon = GetPartyMonByIndex(party, mon_idx);
+ u16 move = (u16)GetMonData(pokemon, MON_DATA_MOVE1 + mon_move_idx, NULL);
+
+ BufferMoveName(*mgr, idx, move);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk0232(struct ScriptContext* ctx)
+{
+ struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u8 unk = (u8)VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+ u16 ribbon = (u16)FUN_0207FC5C(unk, 3);
+
+ BufferRibbonNameOrDesc(*mgr, idx, ribbon);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_GetSealName(struct ScriptContext* ctx)
+{
+ struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u16 seal = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+
+ BufferSealName(*mgr, idx, (u16)(seal - 1));
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_GetItemNameWithIndefArticle(struct ScriptContext* ctx)
+{
+ struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u16 item = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+
+ BufferItemNameWithIndefArticle(*mgr, idx, item);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_GetItemNamePlural(struct ScriptContext* ctx)
+{
+ struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u16 item = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+
+ BufferItemNamePlural(*mgr, idx, item);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_GetDecorationNameWithArticle(struct ScriptContext* ctx)
+{
+ struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u16 decoration = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+
+ BufferDecorationNameWithArticle(*mgr, idx, decoration);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_GetUndergroundTrapNameWithArticle(struct ScriptContext* ctx)
+{
+ struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u16 underground_trap = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+
+ BufferUndergroundTrapNameWithArticle(*mgr, idx, underground_trap);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_GetUndergroundItemNameWithArticle(struct ScriptContext* ctx)
+{
+ struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u16 underground_item = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+
+ BufferUndergroundItemNameWithArticle(*mgr, idx, underground_item);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk02C9(struct ScriptContext* ctx)
+{
+ struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u16 species = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+ u16 unused1 = ScriptReadHalfword(ctx);
+ u8 unused2 = ScriptReadByte(ctx);
+
+ BufferSpeciesNameWithArticle(*mgr, idx, species);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk02CA(struct ScriptContext* ctx)
+{
+ struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
+ u8 idx = ScriptReadByte(ctx);
+ struct ScriptState* state = SavArray_Flags_get(ctx->unk80->saveBlock2);
+ u32 species = FUN_0205F3C0(state);
+
+ BufferSpeciesNameWithArticle(*mgr, idx, species);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_GetFashionNameWithArticle(struct ScriptContext* ctx)
+{
+ struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u16 fashion = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+
+ BufferFashionNameWithArticle(*mgr, idx, fashion);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk02CC(struct ScriptContext* ctx)
+{
+ struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u16 trainer_class = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+
+ BufferTrainerClassNameWithArticle(*mgr, idx, trainer_class);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_GetSealNamePlural(struct ScriptContext* ctx)
+{
+ struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
+ u8 idx = ScriptReadByte(ctx);
+ u16 seal = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+
+ BufferSealNamePlural(*mgr, idx, (u16)(seal - 1));
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_CapitalizeFirstChar(struct ScriptContext* ctx)
+{
+ struct ScrStrBufs** mgr = FUN_02039438(ctx->unk80, 15);
+ u8 idx = ScriptReadByte(ctx);
+
+ ScrStrBufs_UpperFirstChar(*mgr, idx);
+
+ return FALSE;
+}
diff --git a/include/scrcmd.h b/include/scrcmd.h
index fcae3549..dd55ce70 100644
--- a/include/scrcmd.h
+++ b/include/scrcmd.h
@@ -106,6 +106,50 @@ BOOL ScrCmd_Unk0048(struct ScriptContext *ctx);
BOOL ScrCmd_Unk02CF(struct ScriptContext *ctx);
BOOL ScrCmd_Unk02D0(struct ScriptContext *ctx);
+//scrcmd_4.c
+BOOL ScrCmd_GetPlayerName(struct ScriptContext* ctx);
+BOOL ScrCmd_GetRivalName(struct ScriptContext* ctx);
+BOOL ScrCmd_GetFriendName(struct ScriptContext* ctx);
+BOOL ScrCmd_Unk00D0(struct ScriptContext* ctx);
+BOOL ScrCmd_GetItemName(struct ScriptContext* ctx);
+BOOL ScrCmd_GetPocketName(struct ScriptContext* ctx);
+BOOL ScrCmd_GetTMHMMoveName(struct ScriptContext* ctx);
+BOOL ScrCmd_GetMoveName(struct ScriptContext* ctx);
+BOOL ScrCmd_Unk00D5(struct ScriptContext* ctx);
+BOOL ScrCmd_Unk0280(struct ScriptContext* ctx);
+BOOL ScrCmd_Unk00D6(struct ScriptContext* ctx);
+BOOL ScrCmd_Unk0251(struct ScriptContext* ctx);
+BOOL ScrCmd_GetPoketchAppName(struct ScriptContext* ctx);
+BOOL ScrCmd_GetTrainerClassName(struct ScriptContext* ctx);
+BOOL ScrCmd_Unk00D9(struct ScriptContext* ctx);
+BOOL ScrCmd_Unk00DA(struct ScriptContext* ctx);
+struct String* FUN_02040AE4(u32 msg_no, u32 heap_id);
+BOOL ScrCmd_Unk00DB(struct ScriptContext* ctx);
+BOOL ScrCmd_Unk00DC(struct ScriptContext* ctx);
+BOOL ScrCmd_Unk00DD(struct ScriptContext* ctx);
+BOOL ScrCmd_GetDecorationName(struct ScriptContext* ctx);
+BOOL ScrCmd_GetUndergroundTrapName(struct ScriptContext* ctx);
+BOOL ScrCmd_GetUndergroundItemName(struct ScriptContext* ctx);
+BOOL ScrCmd_Unk00E2(struct ScriptContext* ctx);
+BOOL ScrCmd_Unk017B(struct ScriptContext* ctx);
+BOOL ScrCmd_GetNatureName(struct ScriptContext* ctx);
+BOOL ScrCmd_GetFashionName(struct ScriptContext* ctx);
+BOOL ScrCmd_Unk0272(struct ScriptContext* ctx);
+BOOL ScrCmd_GetPokemonMoveName(struct ScriptContext* ctx);
+BOOL ScrCmd_Unk0232(struct ScriptContext* ctx);
+BOOL ScrCmd_GetSealName(struct ScriptContext* ctx);
+BOOL ScrCmd_GetItemNameWithIndefArticle(struct ScriptContext* ctx);
+BOOL ScrCmd_GetItemNamePlural(struct ScriptContext* ctx);
+BOOL ScrCmd_GetDecorationNameWithArticle(struct ScriptContext* ctx);
+BOOL ScrCmd_GetUndergroundTrapNameWithArticle(struct ScriptContext* ctx);
+BOOL ScrCmd_GetUndergroundItemNameWithArticle(struct ScriptContext* ctx);
+BOOL ScrCmd_Unk02C9(struct ScriptContext* ctx);
+BOOL ScrCmd_Unk02CA(struct ScriptContext* ctx);
+BOOL ScrCmd_GetFashionNameWithArticle(struct ScriptContext* ctx);
+BOOL ScrCmd_Unk02CC(struct ScriptContext* ctx);
+BOOL ScrCmd_GetSealNamePlural(struct ScriptContext* ctx);
+BOOL ScrCmd_CapitalizeFirstChar(struct ScriptContext* ctx);
+
//scrcmd_11.c
BOOL ScrCmd_Unk017D(struct ScriptContext* ctx);
BOOL ScrCmd_Unk017E(struct ScriptContext* ctx);