matched sub_0807DDAC

This commit is contained in:
Henny022p 2021-02-15 14:42:07 +01:00
parent 6c2b1a89b8
commit 1d68e9db59
2 changed files with 25 additions and 30 deletions

View File

@ -1971,33 +1971,3 @@ sub_0807DD94: @ 0x0807DD94
bl sub_0807DE80
pop {r4, pc}
.align 2, 0
thumb_func_start sub_0807DDAC
sub_0807DDAC: @ 0x0807DDAC
push {r4, r5, r6, lr}
adds r5, r0, #0
adds r6, r1, #0
adds r4, r5, #0
adds r4, #0x84
ldr r1, [r4]
cmp r1, #0
beq _0807DDE0
bl ExecuteScriptCommandSet
cmp r6, #0
beq _0807DDCE
ldr r1, [r4]
adds r0, r5, #0
bl _call_via_r6
b _0807DDD6
_0807DDCE:
ldr r1, [r4]
adds r0, r5, #0
bl sub_0807DB98
_0807DDD6:
ldr r0, [r5, #4]
cmp r0, #0
bne _0807DDE0
bl DeleteThisEntity
_0807DDE0:
pop {r4, r5, r6, pc}
.align 2, 0

View File

@ -9,6 +9,31 @@ extern u8 gUnk_0811E510[];
void sub_0807DF38(void);
extern void sub_0801C4A0(u32);
extern void sub_0807DB98(Entity*, ScriptExecutionContext*);
extern void _call_via_r6(Entity*, ScriptExecutionContext*);
/**
*
* @param entity
* @param address this is the fuction called via r6
*/
void sub_0807DDAC(Entity* entity, u32 address)
{
ScriptExecutionContext **piVar1;
piVar1 = (ScriptExecutionContext **)&entity->cutsceneBeh;
if (*piVar1) {
ExecuteScriptCommandSet(entity, *piVar1);
if (address) {
_call_via_r6(entity, *piVar1);
} else {
sub_0807DB98(entity, *piVar1);
}
if (!entity->next) {
DeleteThisEntity();
}
}
}
void sub_0807DDE4(Entity* entity) {
u32 temp;