mirror of
https://github.com/Xeeynamo/sotn-decomp.git
synced 2024-11-26 22:40:33 +00:00
Decompile NO3 func_801CC820 (#937)
Surrounding code also seems to use the same entity struct
This commit is contained in:
parent
8af8569e75
commit
1c0debf74d
@ -655,6 +655,15 @@ typedef struct {
|
||||
s32 unk88;
|
||||
} ET_8016E9E4;
|
||||
|
||||
typedef struct {
|
||||
u8 unk7C;
|
||||
u8 unk7D[3];
|
||||
s16 unk80;
|
||||
s16 unk82;
|
||||
s16 unk84;
|
||||
s16 unk86;
|
||||
} ET_801CC820;
|
||||
|
||||
typedef union {
|
||||
/* 0x7C */ struct Primitive* prim;
|
||||
/* 0x7C */ ET_EntFactory factory;
|
||||
@ -717,5 +726,6 @@ typedef union {
|
||||
/* 0x7C */ ET_Death death;
|
||||
/* 0x7C */ ET_SpittleBone spittleBone;
|
||||
/* 0x7C */ ET_Player player;
|
||||
/* 0x7C */ ET_801CC820 et_801CC820;
|
||||
/* 0x7C */ char stub[0x40];
|
||||
} Ext;
|
||||
|
@ -607,7 +607,35 @@ INCLUDE_ASM("asm/us/st/no3/nonmatchings/48A84", func_801CC5A4);
|
||||
|
||||
INCLUDE_ASM("asm/us/st/no3/nonmatchings/48A84", func_801CC6F8);
|
||||
|
||||
INCLUDE_ASM("asm/us/st/no3/nonmatchings/48A84", func_801CC820);
|
||||
void func_801CC820(Entity* entity) {
|
||||
u16 distance;
|
||||
|
||||
if (entity->facingLeft == GetSideToPlayer()) {
|
||||
if (entity->params == 0) {
|
||||
SetStep(5);
|
||||
} else {
|
||||
SetStep(4);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (entity->ext.et_801CC820.unk86 == 0) {
|
||||
func_801CC6F8(entity);
|
||||
return;
|
||||
}
|
||||
distance = GetDistanceToPlayerX();
|
||||
if ((distance < 0x48) && (entity->step != 4)) {
|
||||
SetStep(4);
|
||||
return;
|
||||
}
|
||||
SetStep(3);
|
||||
if (distance < 0x60) {
|
||||
entity->ext.et_801CC820.unk7C = 1;
|
||||
} else {
|
||||
entity->ext.et_801CC820.unk7C = 0;
|
||||
}
|
||||
entity->ext.et_801CC820.unk80 = 0;
|
||||
entity->ext.et_801CC820.unk82 = 0x20;
|
||||
}
|
||||
|
||||
void func_801CC90C(Entity* arg0) {
|
||||
s16 temp_v0_2;
|
||||
|
Loading…
Reference in New Issue
Block a user