improved signature of StartPlayerScript

This commit is contained in:
Henny022p 2021-02-19 06:33:34 +01:00
parent aaea9b89f6
commit 126feb121f
3 changed files with 7 additions and 7 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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) {