diff --git a/include/script.h b/include/script.h index 73d860e1..a3f29c84 100644 --- a/include/script.h +++ b/include/script.h @@ -4,17 +4,17 @@ #include "global.h" typedef struct { - u16 * unk_00; + u16* unk_00; u32 unk_04; u32 unk_08; - u8 unk_0C[0x4];//unused + u8 unk_0C[0x4]; // unused u16 unk_10; u16 unk_12; u32 unk_14; u8 unk_18; u8 unk_19; u8 unk_1A; - u8 unk_1B;//unused + u8 unk_1B; // unused union SplitWord unk_1C; union SplitWord unk_20; } ScriptExecutionContext; @@ -26,7 +26,7 @@ extern u32 GetNextScriptCommandWord(u16*); extern u32 GetNextScriptCommandWordAfterCommandMetadata(u16*); extern u32 GetNextScriptCommandHalfwordAfterCommandMetadata(u16*); -extern void StartPlayerScript(u32); +extern void StartPlayerScript(u16*); extern void sub_0807DEDC(Entity*, ScriptExecutionContext*, u32, u32); diff --git a/src/code_0807CC3C.c b/src/code_0807CC3C.c index 2e56b920..068f3e8d 100644 --- a/src/code_0807CC3C.c +++ b/src/code_0807CC3C.c @@ -295,11 +295,11 @@ void UnloadCutsceneData(Entity* entity) { } } -void StartPlayerScript(u32 unk1) { +void StartPlayerScript(u16* unk1) { Entity* player; _DmaZero(&gPlayerScriptExecutionContext, sizeof(gPlayerScriptExecutionContext)); - gPlayerScriptExecutionContext.unk_00 = (u16*)unk1; + gPlayerScriptExecutionContext.unk_00 = unk1; player = &gPlayerEntity; *(ScriptExecutionContext**)&player->cutsceneBeh = &gPlayerScriptExecutionContext; gPlayerState.playerAction = 0x1c; diff --git a/src/executeScriptCommandSet.c b/src/executeScriptCommandSet.c index 7895c28f..3a3edc53 100644 --- a/src/executeScriptCommandSet.c +++ b/src/executeScriptCommandSet.c @@ -752,7 +752,7 @@ void sub_0807E898(Entity* unk1, ScriptExecutionContext* unk2) { } void sub_0807E8C4(Entity* unk1, ScriptExecutionContext* unk2) { - StartPlayerScript(GetNextScriptCommandWordAfterCommandMetadata(unk2->unk_00)); + StartPlayerScript((u16*)GetNextScriptCommandWordAfterCommandMetadata(unk2->unk_00)); } void sub_0807E8D4(Entity* unk1, ScriptExecutionContext* unk2) {