summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arm9/arm9.lsf2
-rw-r--r--arm9/asm/scrcmd_6.s399
-rw-r--r--arm9/asm/unk_02038C78.s46
-rw-r--r--arm9/global.inc47
-rw-r--r--arm9/src/scrcmd_sound.c266
-rw-r--r--include/scrcmd.h28
6 files changed, 342 insertions, 446 deletions
diff --git a/arm9/arm9.lsf b/arm9/arm9.lsf
index 1abf5a52..898904d3 100644
--- a/arm9/arm9.lsf
+++ b/arm9/arm9.lsf
@@ -157,7 +157,7 @@ Static arm9
Object scrcmd_3.o
Object scrcmd_names.o
Object scrcmd_5.o
- Object scrcmd_6.o
+ Object scrcmd_sound.o
Object scrcmd_7.o
Object scrcmd_8.o
Object scrcmd_9.o
diff --git a/arm9/asm/scrcmd_6.s b/arm9/asm/scrcmd_6.s
deleted file mode 100644
index 10b41ff7..00000000
--- a/arm9/asm/scrcmd_6.s
+++ /dev/null
@@ -1,399 +0,0 @@
- .include "asm/macros.inc"
- .include "global.inc"
-
- .text
-
- thumb_func_start FUN_020413C0
-FUN_020413C0: ; 0x020413C0
- push {r3-r5, lr}
- add r4, r0, #0x0
- bl ScriptReadHalfword
- add r5, r0, #0x0
- add r0, r4, #0x0
- bl ScriptReadHalfword
- add r4, #0x80
- add r1, r0, #0x0
- ldr r0, [r4, #0x0]
- bl GetVarPointer
- add r4, r0, #0x0
- add r0, r5, #0x0
- bl FUN_02005410
- strh r0, [r4, #0x0]
- mov r0, #0x0
- pop {r3-r5, pc}
-
- thumb_func_start FUN_020413E8
-FUN_020413E8: ; 0x020413E8
- push {r3, lr}
- bl ScriptReadHalfword
- bl FUN_0200521C
- mov r0, #0x0
- pop {r3, pc}
- .balign 4
-
- thumb_func_start FUN_020413F8
-FUN_020413F8: ; 0x020413F8
- push {r3, lr}
- bl ScriptReadHalfword
- bl FUN_02004124
- mov r1, #0x0
- bl FUN_02005350
- mov r0, #0x0
- pop {r3, pc}
-
- thumb_func_start FUN_0204140C
-FUN_0204140C: ; 0x0204140C
- push {r3, lr}
- add r0, #0x80
- ldr r0, [r0, #0x0]
- ldr r1, [r0, #0x1c]
- ldr r1, [r1, #0x0]
- bl FUN_0204ABA8
- bl FUN_0200521C
- mov r0, #0x0
- pop {r3, pc}
- .balign 4
-
- thumb_func_start FUN_02041424
-FUN_02041424: ; 0x02041424
- push {r4, lr}
- add r4, r0, #0x0
- bl ScriptReadHalfword
- add r4, #0x80
- add r1, r0, #0x0
- ldr r0, [r4, #0x0]
- bl FUN_0204AB20
- mov r0, #0x0
- pop {r4, pc}
- .balign 4
-
- thumb_func_start FUN_0204143C
-FUN_0204143C: ; 0x0204143C
- push {r3-r5, lr}
- add r5, r0, #0x0
- bl ScriptReadHalfword
- add r4, r0, #0x0
- add r0, r5, #0x0
- bl ScriptReadHalfword
- add r1, r0, #0x0
- add r0, r4, #0x0
- bl FUN_020053CC
- ldr r1, _02041460 ; =FUN_02041464
- add r0, r5, #0x0
- bl SetupNativeScript
- mov r0, #0x1
- pop {r3-r5, pc}
- .balign 4
-_02041460: .word FUN_02041464
-
- thumb_func_start FUN_02041464
-FUN_02041464: ; 0x02041464
- push {r3, lr}
- bl FUN_02005404
- cmp r0, #0x0
- bne _02041472
- mov r0, #0x1
- pop {r3, pc}
-_02041472:
- mov r0, #0x0
- pop {r3, pc}
- .balign 4
-
- thumb_func_start FUN_02041478
-FUN_02041478: ; 0x02041478
- push {r4, lr}
- add r4, r0, #0x0
- bl ScriptReadHalfword
- add r1, r0, #0x0
- mov r0, #0x7f
- mov r2, #0x0
- bl FUN_0200538C
- ldr r1, _02041498 ; =FUN_02041464
- add r0, r4, #0x0
- bl SetupNativeScript
- mov r0, #0x1
- pop {r4, pc}
- nop
-_02041498: .word FUN_02041464
-
- thumb_func_start FUN_0204149C
-FUN_0204149C: ; 0x0204149C
- push {r3, lr}
- ldr r1, [r0, #0x8]
- add r3, r1, #0x1
- str r3, [r0, #0x8]
- ldrb r2, [r1, #0x0]
- add r1, r3, #0x1
- str r1, [r0, #0x8]
- ldrb r1, [r3, #0x0]
- add r0, r2, #0x0
- bl FUN_020047C8
- mov r0, #0x0
- pop {r3, pc}
- .balign 4
-
- thumb_func_start FUN_020414B8
-FUN_020414B8: ; 0x020414B8
- push {r3, lr}
- bl ScriptReadHalfword
- add r1, r0, #0x0
- mov r0, #0x4
- bl FUN_02005308
- mov r0, #0x0
- pop {r3, pc}
- .balign 4
-
- thumb_func_start FUN_020414CC
-FUN_020414CC: ; 0x020414CC
- push {r3, lr}
- ldr r2, [r0, #0x8]
- add r1, r2, #0x1
- str r1, [r0, #0x8]
- ldrb r0, [r2, #0x0]
- bl FUN_020040F4
- mov r0, #0x0
- pop {r3, pc}
- .balign 4
-
- thumb_func_start FUN_020414E0
-FUN_020414E0: ; 0x020414E0
- push {r4, lr}
- add r4, r0, #0x0
- bl ScriptReadHalfword
- add r4, #0x80
- add r1, r0, #0x0
- ldr r0, [r4, #0x0]
- bl VarGet
- bl FUN_020054C8
- mov r0, #0x0
- pop {r4, pc}
- .balign 4
-
- thumb_func_start FUN_020414FC
-FUN_020414FC: ; 0x020414FC
- push {r4, lr}
- add r4, r0, #0x0
- bl ScriptReadHalfword
- add r4, #0x80
- add r1, r0, #0x0
- ldr r0, [r4, #0x0]
- bl VarGet
- mov r1, #0x0
- bl FUN_020054F0
- mov r0, #0x0
- pop {r4, pc}
-
- thumb_func_start FUN_02041518
-FUN_02041518: ; 0x02041518
- push {r4, lr}
- add r4, r0, #0x0
- bl ScriptReadHalfword
- add r1, r0, #0x0
- add r0, r4, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- bl VarGet
- str r0, [r4, #0x64]
- ldr r1, _0204153C ; =FUN_02041540
- add r0, r4, #0x0
- bl SetupNativeScript
- mov r0, #0x1
- pop {r4, pc}
- nop
-_0204153C: .word FUN_02041540
-
- thumb_func_start FUN_02041540
-FUN_02041540: ; 0x02041540
- push {r3, lr}
- ldr r0, [r0, #0x64]
- lsl r0, r0, #0x10
- lsr r0, r0, #0x10
- bl FUN_02005508
- cmp r0, #0x0
- bne _02041554
- mov r0, #0x1
- pop {r3, pc}
-_02041554:
- mov r0, #0x0
- pop {r3, pc}
-
- thumb_func_start FUN_02041558
-FUN_02041558: ; 0x02041558
- push {r3-r5, lr}
- add r4, r0, #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
- add r0, r5, #0x0
- bl FUN_02005578
- mov r0, #0x0
- pop {r3-r5, pc}
-
- thumb_func_start ScrCmd_waitcry
-ScrCmd_waitcry: ; 0x02041588
- push {r3, lr}
- ldr r1, _02041594 ; =FUN_02041598
- bl SetupNativeScript
- mov r0, #0x1
- pop {r3, pc}
- .balign 4
-_02041594: .word FUN_02041598
-
- thumb_func_start FUN_02041598
-FUN_02041598: ; 0x02041598
- push {r3, lr}
- bl FUN_02005670
- cmp r0, #0x0
- bne _020415A6
- mov r0, #0x1
- pop {r3, pc}
-_020415A6:
- mov r0, #0x0
- pop {r3, pc}
- .balign 4
-
- thumb_func_start ScrCmd_playbgm
-ScrCmd_playbgm: ; 0x020415AC
- push {r3, lr}
- bl ScriptReadHalfword
- bl PlayBGM
- mov r0, #0x0
- pop {r3, pc}
- .balign 4
-
- thumb_func_start FUN_020415BC
-FUN_020415BC: ; 0x020415BC
- push {r3, lr}
- ldr r1, _020415C8 ; =FUN_020415CC
- bl SetupNativeScript
- mov r0, #0x1
- pop {r3, pc}
- .balign 4
-_020415C8: .word FUN_020415CC
-
- thumb_func_start FUN_020415CC
-FUN_020415CC: ; 0x020415CC
- push {r3, lr}
- bl FUN_02005CBC
- cmp r0, #0x0
- bne _020415DA
- mov r0, #0x1
- pop {r3, pc}
-_020415DA:
- mov r0, #0x0
- pop {r3, pc}
- .balign 4
-
- thumb_func_start FUN_020415E0
-FUN_020415E0: ; 0x020415E0
- push {r3-r5, lr}
- add r5, r0, #0x0
- bl ScriptReadHalfword
- add r1, r0, #0x0
- add r0, r5, #0x0
- add r0, #0x80
- ldr r0, [r0, #0x0]
- bl GetVarPointer
- add r5, #0x80
- add r4, r0, #0x0
- ldr r0, [r5, #0x0]
- ldr r0, [r0, #0xc]
- bl FUN_02029EF8
- bl FUN_02005D20
- cmp r0, #0x1
- bne _02041610
- mov r0, #0x1
- strh r0, [r4, #0x0]
- mov r0, #0x0
- pop {r3-r5, pc}
-_02041610:
- mov r0, #0x0
- strh r0, [r4, #0x0]
- pop {r3-r5, pc}
- .balign 4
-
- thumb_func_start FUN_02041618
-FUN_02041618: ; 0x02041618
- push {r4, lr}
- add r4, r0, #0x0
- bl ScriptReadHalfword
- add r4, #0x80
- add r1, r0, #0x0
- ldr r0, [r4, #0x0]
- bl GetVarPointer
- add r4, r0, #0x0
- bl FUN_02005E28
- cmp r0, #0x0
- bne _0204163C
- mov r0, #0x1
- strh r0, [r4, #0x0]
- mov r0, #0x0
- pop {r4, pc}
-_0204163C:
- mov r0, #0x0
- strh r0, [r4, #0x0]
- pop {r4, pc}
- .balign 4
-
- thumb_func_start FUN_02041644
-FUN_02041644: ; 0x02041644
- push {r3, lr}
- bl FUN_02005E64
- mov r0, #0x1
- pop {r3, pc}
- .balign 4
-
- thumb_func_start FUN_02041650
-FUN_02041650: ; 0x02041650
- push {r3, lr}
- add r0, #0x80
- ldr r0, [r0, #0x0]
- ldr r0, [r0, #0xc]
- bl FUN_02029EF8
- bl FUN_02005E6C
- mov r0, #0x1
- pop {r3, pc}
-
- thumb_func_start FUN_02041664
-FUN_02041664: ; 0x02041664
- push {r3, lr}
- mov r1, #0x0
- mov r0, #0x3f
- add r2, r1, #0x0
- bl FUN_0200433C
- mov r0, #0x1
- pop {r3, pc}
-
- thumb_func_start FUN_02041674
-FUN_02041674: ; 0x02041674
- push {r3-r5, lr}
- add r4, r0, #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
- add r1, r0, #0x0
- add r0, r5, #0x0
- bl FUN_0200488C
- mov r0, #0x0
- pop {r3-r5, pc}
- .balign 4
diff --git a/arm9/asm/unk_02038C78.s b/arm9/asm/unk_02038C78.s
index a43768aa..38588cd5 100644
--- a/arm9/asm/unk_02038C78.s
+++ b/arm9/asm/unk_02038C78.s
@@ -222,27 +222,27 @@ gScriptCmdTable: ; 0x020F355C
.word ScrCmd_Unk0046
.word ScrCmd_Unk0047
.word ScrCmd_Unk0048
- .word FUN_020414E0
- .word FUN_020414FC
- .word FUN_02041518
- .word FUN_02041558
- .word ScrCmd_waitcry
- .word ScrCmd_playbgm
- .word FUN_020415BC
- .word FUN_020413E8
- .word FUN_020413F8
- .word FUN_0204140C
- .word FUN_02041424
- .word FUN_0204143C
- .word FUN_02041478
- .word FUN_0204149C
- .word FUN_020414B8
- .word FUN_020414CC
- .word FUN_020415E0
- .word FUN_02041618
- .word FUN_02041644
- .word FUN_02041650
- .word FUN_02041664
+ .word ScrCmd_Unk0049
+ .word ScrCmd_Unk004A
+ .word ScrCmd_Unk004B
+ .word ScrCmd_Unk004C
+ .word ScrCmd_PlayCryWait
+ .word ScrCmd_PlayBgm
+ .word ScrCmd_Unk004F
+ .word ScrCmd_Unk0050
+ .word ScrCmd_Unk0051
+ .word ScrCmd_Unk0052
+ .word ScrCmd_Unk0053
+ .word ScrCmd_Unk0054
+ .word ScrCmd_Unk0055
+ .word ScrCmd_Unk0056
+ .word ScrCmd_Unk0057
+ .word ScrCmd_Unk0058
+ .word ScrCmd_Unk0059
+ .word ScrCmd_Unk005A
+ .word ScrCmd_Unk005B
+ .word ScrCmd_Unk005C
+ .word ScrCmd_Unk005D
.word FUN_0203AFC4
.word FUN_0203B148
.word FUN_0203B1F0
@@ -792,7 +792,7 @@ gScriptCmdTable: ; 0x020F355C
.word ScrCmd_Unk0280
.word FUN_02044A0C
.word FUN_0203F484
- .word FUN_02041674
+ .word ScrCmd_Unk0283
.word FUN_0203F4D8
.word FUN_0203F508
.word FUN_0203F5D4
@@ -835,7 +835,7 @@ gScriptCmdTable: ; 0x020F355C
.word FUN_0203B7F0
.word FUN_0203FB4C
.word FUN_0203B790
- .word FUN_020413C0
+ .word ScrCmd_Unk02AE
.word FUN_0203FB64
.word FUN_0203FB94
.word FUN_0203FBA0
diff --git a/arm9/global.inc b/arm9/global.inc
index 05ba01a7..38ec47f4 100644
--- a/arm9/global.inc
+++ b/arm9/global.inc
@@ -3196,29 +3196,29 @@
.extern FUN_02041194
.extern FUN_020411C4
.extern FUN_02041340
-.extern FUN_020413C0
-.extern FUN_020413E8
-.extern FUN_020413F8
-.extern FUN_0204140C
-.extern FUN_02041424
-.extern FUN_0204143C
-.extern FUN_02041478
-.extern FUN_0204149C
-.extern FUN_020414B8
-.extern FUN_020414CC
-.extern FUN_020414E0
-.extern FUN_020414FC
-.extern FUN_02041518
-.extern FUN_02041558
-.extern ScrCmd_waitcry
-.extern ScrCmd_playbgm
-.extern FUN_020415BC
-.extern FUN_020415E0
-.extern FUN_02041618
-.extern FUN_02041644
-.extern FUN_02041650
-.extern FUN_02041664
-.extern FUN_02041674
+.extern ScrCmd_Unk02AE
+.extern ScrCmd_Unk0050
+.extern ScrCmd_Unk0051
+.extern ScrCmd_Unk0052
+.extern ScrCmd_Unk0053
+.extern ScrCmd_Unk0054
+.extern ScrCmd_Unk0055
+.extern ScrCmd_Unk0056
+.extern ScrCmd_Unk0057
+.extern ScrCmd_Unk0058
+.extern ScrCmd_Unk0049
+.extern ScrCmd_Unk004A
+.extern ScrCmd_Unk004B
+.extern ScrCmd_Unk004C
+.extern ScrCmd_PlayCryWait
+.extern ScrCmd_PlayBgm
+.extern ScrCmd_Unk004F
+.extern ScrCmd_Unk0059
+.extern ScrCmd_Unk005A
+.extern ScrCmd_Unk005B
+.extern ScrCmd_Unk005C
+.extern ScrCmd_Unk005D
+.extern ScrCmd_Unk0283
.extern FUN_020416A8
.extern FUN_02041770
.extern FUN_020417E0
@@ -8518,3 +8518,4 @@
.extern FUN_02025490
.extern FUN_020254A0
.extern FUN_020254B4
+.extern FUN_02041464
diff --git a/arm9/src/scrcmd_sound.c b/arm9/src/scrcmd_sound.c
new file mode 100644
index 00000000..5acaae1e
--- /dev/null
+++ b/arm9/src/scrcmd_sound.c
@@ -0,0 +1,266 @@
+#include "scrcmd.h"
+
+extern void* FUN_02029EF8(struct SaveBlock2* sav2);
+extern u32 FUN_02005D20(void *);
+extern void FUN_02005E6C(void *);
+extern void FUN_0200433C(u32, u32, u32);
+extern u32 FUN_02005E28(void);
+extern void FUN_02005E64(void);
+extern BOOL FUN_02005CBC(void);
+extern void PlayBGM(u16);
+extern u32 FUN_02004124(u16);
+extern void FUN_0204AB20(struct UnkSavStruct80 *ctx, u16);
+extern u16 FUN_0204ABA8(struct UnkSavStruct80 *ctx, u32);
+extern void FUN_0200521C(u16);
+extern void FUN_02005308(u32, u16);
+extern void FUN_02005350(u32, u32);
+extern void FUN_0200538C(u32, u16, u32);
+extern void FUN_020053CC(u16, u16);
+extern BOOL FUN_02005404(void);
+extern u16 FUN_02005410(u16);
+extern void FUN_020054C8(u16);
+extern void FUN_020054F0(u16, u32);
+extern void FUN_020047C8(u8, u8);
+extern void FUN_020040F4(u8);
+extern BOOL FUN_02005508(u16);
+extern void FUN_02005578(u16);
+extern BOOL FUN_02005670(void);
+extern void FUN_0200488C(u16, u16);
+
+
+THUMB_FUNC BOOL ScrCmd_Unk02AE(struct ScriptContext *ctx)
+{
+ u16 unk0 = ScriptReadHalfword(ctx);
+ u16 *unk1 = GetVarPointer(ctx->unk80, ScriptReadHalfword(ctx));
+
+ *unk1 = FUN_02005410(unk0);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk0050(struct ScriptContext *ctx)
+{
+ FUN_0200521C(ScriptReadHalfword(ctx));
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk0051(struct ScriptContext *ctx)
+{
+ u32 unk0 = FUN_02004124(ScriptReadHalfword(ctx));
+ FUN_02005350(unk0, 0);
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk0052(struct ScriptContext *ctx)
+{
+ u16 unk0 = FUN_0204ABA8(ctx->unk80, *ctx->unk80->mapId);
+ FUN_0200521C(unk0);
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk0053(struct ScriptContext *ctx)
+{
+ FUN_0204AB20(ctx->unk80, ScriptReadHalfword(ctx));
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk0054(struct ScriptContext *ctx)
+{
+ u16 unk1 = ScriptReadHalfword(ctx);
+ u16 unk2 = ScriptReadHalfword(ctx);
+
+ FUN_020053CC(unk1, unk2);
+ SetupNativeScript(ctx, FUN_02041464);
+
+ return TRUE;
+}
+
+THUMB_FUNC BOOL FUN_02041464(struct ScriptContext* ctx)
+{
+#pragma unused(ctx)
+
+ if(!FUN_02005404())
+ return TRUE;
+ else
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk0055(struct ScriptContext* ctx)
+{
+ u16 unk = ScriptReadHalfword(ctx);
+
+ FUN_0200538C(0x7F, unk, 0);
+ SetupNativeScript(ctx, FUN_02041464);
+
+ return TRUE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk0056(struct ScriptContext* ctx)
+{
+
+ u8 PtrIndx0 = ScriptReadByte(ctx);
+
+ u8 PtrIndx1 = ScriptReadByte(ctx);
+
+ FUN_020047C8(PtrIndx0, PtrIndx1);
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk0057(struct ScriptContext* ctx)
+{
+ FUN_02005308(4, ScriptReadHalfword(ctx));
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk0058(struct ScriptContext* ctx)
+{
+ u8 PtrIndx0 = ScriptReadByte(ctx);
+ FUN_020040F4(PtrIndx0);
+ return FALSE;
+}
+
+
+THUMB_FUNC BOOL ScrCmd_Unk0049(struct ScriptContext* ctx)
+{
+ u16 unk = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+ FUN_020054C8(unk);
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk004A(struct ScriptContext* ctx)
+{
+ u16 unk = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+ FUN_020054F0(unk, 0);
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk004B(struct ScriptContext* ctx)
+{
+ u16 unk = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+
+ ctx->data[0] = unk;
+ SetupNativeScript(ctx, FUN_02041540);
+
+ return TRUE;
+}
+
+THUMB_FUNC BOOL FUN_02041540(struct ScriptContext* ctx)
+{
+ if(!FUN_02005508((u16)ctx->data[0]))
+ return TRUE;
+ else
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk004C(struct ScriptContext* ctx)
+{
+ u16 unk0 = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+ u16 unused = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+ FUN_02005578(unk0);
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_PlayCryWait(struct ScriptContext* ctx)
+{
+ SetupNativeScript(ctx, FUN_02041598);
+ return TRUE;
+}
+
+THUMB_FUNC BOOL FUN_02041598(struct ScriptContext* ctx)
+{
+#pragma unused(ctx)
+
+ if(!FUN_02005670())
+ return TRUE;
+ else
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_PlayBgm(struct ScriptContext* ctx)
+{
+ u16 bgm_id = ScriptReadHalfword(ctx);
+ PlayBGM(bgm_id);
+
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk004F(struct ScriptContext* ctx)
+{
+ SetupNativeScript(ctx, FUN_020415CC);
+ return TRUE;
+}
+
+THUMB_FUNC BOOL FUN_020415CC(struct ScriptContext* ctx)
+{
+#pragma unused(ctx)
+ if (!FUN_02005CBC())
+ return TRUE;
+ else
+ return FALSE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk0059(struct ScriptContext* ctx)
+{
+ u16* ret_ptr = GetVarPointer(ctx->unk80, ScriptReadHalfword(ctx));
+
+ void* unk = FUN_02029EF8(ctx->unk80->saveBlock2);
+ if (FUN_02005D20(unk) == 1)
+ {
+ *ret_ptr = 1;
+ return FALSE;
+ }
+ else
+ {
+ *ret_ptr = 0;
+ return FALSE;
+ }
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk005A(struct ScriptContext* ctx)
+{
+ u16* ret_ptr = GetVarPointer(ctx->unk80, ScriptReadHalfword(ctx));
+
+ if (FUN_02005E28() == 0)
+ {
+ *ret_ptr = 1;
+ return FALSE;
+ }
+ else
+ {
+ *ret_ptr = 0;
+ return FALSE;
+ }
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk005B(struct ScriptContext* ctx)
+{
+#pragma unused(ctx)
+ FUN_02005E64();
+ return TRUE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk005C(struct ScriptContext* ctx)
+{
+ void* unk = FUN_02029EF8(ctx->unk80->saveBlock2);
+ FUN_02005E6C(unk);
+
+ return TRUE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk005D(struct ScriptContext* ctx)
+{
+#pragma unused(ctx)
+ FUN_0200433C(0x3F, 0, 0);
+ return TRUE;
+}
+
+THUMB_FUNC BOOL ScrCmd_Unk0283(struct ScriptContext* ctx)
+{
+ u16 unk1 = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+ u16 unk2 = VarGet(ctx->unk80, ScriptReadHalfword(ctx));
+
+ FUN_0200488C(unk1, unk2);
+
+ return FALSE;
+}
+
diff --git a/include/scrcmd.h b/include/scrcmd.h
index 86bb4f51..c246279d 100644
--- a/include/scrcmd.h
+++ b/include/scrcmd.h
@@ -150,6 +150,34 @@ BOOL ScrCmd_Unk02CC(struct ScriptContext* ctx);
BOOL ScrCmd_GetSealNamePlural(struct ScriptContext* ctx);
BOOL ScrCmd_CapitalizeFirstChar(struct ScriptContext* ctx);
+//scrcmd_sound.c
+BOOL ScrCmd_Unk02AE(struct ScriptContext *ctx);
+BOOL ScrCmd_Unk0050(struct ScriptContext *ctx);
+BOOL ScrCmd_Unk0051(struct ScriptContext *ctx);
+BOOL ScrCmd_Unk0052(struct ScriptContext *ctx);
+BOOL ScrCmd_Unk0053(struct ScriptContext *ctx);
+BOOL ScrCmd_Unk0054(struct ScriptContext *ctx);
+BOOL FUN_02041464(struct ScriptContext *ctx);
+BOOL ScrCmd_Unk0055(struct ScriptContext* ctx);
+BOOL ScrCmd_Unk0056(struct ScriptContext* ctx);
+BOOL ScrCmd_Unk0058(struct ScriptContext* ctx);
+BOOL ScrCmd_Unk0049(struct ScriptContext* ctx);
+BOOL ScrCmd_Unk004A(struct ScriptContext* ctx);
+BOOL ScrCmd_Unk004B(struct ScriptContext* ctx);
+BOOL FUN_02041540(struct ScriptContext* ctx);
+BOOL ScrCmd_Unk004C(struct ScriptContext* ctx);
+BOOL ScrCmd_PlayCryWait(struct ScriptContext* ctx);
+BOOL FUN_02041598(struct ScriptContext* ctx);
+BOOL ScrCmd_Unk004F(struct ScriptContext* ctx);
+BOOL FUN_020415CC(struct ScriptContext* ctx);
+BOOL ScrCmd_PlayBgm(struct ScriptContext* ctx);
+BOOL ScrCmd_Unk0059(struct ScriptContext* ctx);
+BOOL ScrCmd_Unk005A(struct ScriptContext* ctx);
+BOOL ScrCmd_Unk005B(struct ScriptContext* ctx);
+BOOL ScrCmd_Unk005C(struct ScriptContext* ctx);
+BOOL ScrCmd_Unk005D(struct ScriptContext* ctx);
+BOOL ScrCmd_Unk0283(struct ScriptContext *ctx);
+
//scrcmd_8.c
BOOL ScrCmd_Unk021D(struct ScriptContext* ctx);