matched StartPlayerScript

This commit is contained in:
Henny022p 2021-02-16 02:24:26 +01:00
parent a41cedf985
commit 945a3fe944
2 changed files with 15 additions and 29 deletions

View File

@ -1610,32 +1610,3 @@ _0807DB28:
pop {r4, r5, pc}
.align 2, 0
thumb_func_start StartPlayerScript
StartPlayerScript: @ 0x0807DB2C
push {r4, r5, lr}
adds r5, r0, #0
ldr r4, _0807DB5C @ =gUnk_02022750
adds r0, r4, #0
movs r1, #0x24
bl _DmaZero
str r5, [r4]
ldr r0, _0807DB60 @ =gPlayerEntity
adds r0, #0x84
str r4, [r0]
ldr r2, _0807DB64 @ =gPlayerState
movs r1, #0
movs r0, #0x1c
strb r0, [r2, #0xc]
adds r0, r2, #0
adds r0, #0x3a
strb r1, [r0]
subs r0, #1
strb r1, [r0]
subs r0, #1
strb r1, [r0]
pop {r4, r5, pc}
.align 2, 0
_0807DB5C: .4byte gUnk_02022750
_0807DB60: .4byte gPlayerEntity
_0807DB64: .4byte gPlayerState

View File

@ -6,6 +6,8 @@
extern u8 gUnk_0811E514[];
extern u8 gUnk_0811E510[];
// the type is just a guess based on size and teh fact that these are around a lot in this file
extern ScriptExecutionContext gUnk_02022750;
extern void CreateSpeechBubbleExclamationMark(Entity*, u32, u32);
extern void CreateSpeechBubbleQuestionMark(Entity*, u32, u32);
@ -17,6 +19,19 @@ extern void _call_via_r6(Entity*, ScriptExecutionContext*);
extern u32* sub_0807DAA0();
void StartPlayerScript(u32 unk1) {
Entity* player;
_DmaZero(&gUnk_02022750, 0x24);
gUnk_02022750.unk_00 = (u16*)unk1;
player = &gPlayerEntity;
*(ScriptExecutionContext**)&player->cutsceneBeh = &gUnk_02022750;
gPlayerState.playerAction = 0x1c;
gPlayerState.field_0x3a = 0;
gPlayerState.field_0x39 = 0;
gPlayerState.field_0x38 = 0;
}
u32* sub_0807DB68(Entity* entity, u32 unk1) {
u32* puVar1;