From 6fba9aa3885e19ca051585786e92fe20090a31b4 Mon Sep 17 00:00:00 2001 From: Maide <34639600+Kelebek1@users.noreply.github.com> Date: Mon, 27 Dec 2021 02:42:56 +0000 Subject: [PATCH] En_Fz (#528) * En_Fz * UNK_TYPE1 * AC WHY * gameplay_keep * a --- include/functions.h | 2 +- spec | 3 +- src/overlays/actors/ovl_En_Fz/z_en_fz.c | 968 ++++++++++++++++++++-- src/overlays/actors/ovl_En_Fz/z_en_fz.h | 64 +- src/overlays/actors/ovl_En_Wiz/z_en_wiz.h | 4 +- 5 files changed, 973 insertions(+), 68 deletions(-) diff --git a/include/functions.h b/include/functions.h index 9be97247f0..d9d7972279 100644 --- a/include/functions.h +++ b/include/functions.h @@ -870,7 +870,7 @@ void func_800BC154(GlobalContext* globalCtx, ActorContext* actorCtx, Actor* acto // void func_800BC1B4(void); Actor* func_800BC270(GlobalContext* globalCtx, Actor* actor, f32 arg2, UNK_TYPE4 arg3); Actor* func_800BC444(GlobalContext* globalCtx, Actor* actor, f32 arg2); -// void func_800BC4EC(void); +s16 func_800BC4EC(Actor* actor, GlobalContext* globalCtx, f32 distance, s16 angle); s32 func_800BC5B8(GlobalContext* globalCtx, Actor* actor); s32 func_800BC5EC(GlobalContext* globalCtx, Actor* actor); void func_800BC620(Vec3f* arg0, Vec3f* arg1, u8 arg2, GlobalContext* globalCtx); diff --git a/spec b/spec index c26550595b..c34bbe73b5 100644 --- a/spec +++ b/spec @@ -1491,8 +1491,7 @@ beginseg name "ovl_En_Fz" compress include "build/src/overlays/actors/ovl_En_Fz/z_en_fz.o" - include "build/data/ovl_En_Fz/ovl_En_Fz.data.o" - include "build/data/ovl_En_Fz/ovl_En_Fz.reloc.o" + include "build/src/overlays/actors/ovl_En_Fz/ovl_En_Fz_reloc.o" endseg beginseg diff --git a/src/overlays/actors/ovl_En_Fz/z_en_fz.c b/src/overlays/actors/ovl_En_Fz/z_en_fz.c index e48b3d1696..e07abfbe9b 100644 --- a/src/overlays/actors/ovl_En_Fz/z_en_fz.c +++ b/src/overlays/actors/ovl_En_Fz/z_en_fz.c @@ -5,6 +5,9 @@ */ #include "z_en_fz.h" +#include "overlays/actors/ovl_En_Wiz/z_en_wiz.h" +#include "objects/object_fz/object_fz.h" +#include "objects/gameplay_keep/gameplay_keep.h" #define FLAGS 0x00000015 @@ -15,7 +18,37 @@ void EnFz_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnFz_Update(Actor* thisx, GlobalContext* globalCtx); void EnFz_Draw(Actor* thisx, GlobalContext* globalCtx); -#if 0 +void func_80932784(EnFz* this, GlobalContext* globalCtx); +void func_80932AE8(EnFz* this); +void func_80932AF4(EnFz* this); +void func_80932BD4(EnFz* this); +void func_809330D4(EnFz* this); +void func_80933104(EnFz* this, GlobalContext* globalCtx); +void func_80933184(EnFz* this); +void func_809331F8(EnFz* this, GlobalContext* globalCtx); +void func_80933248(EnFz* this); +void func_80933274(EnFz* this, GlobalContext* globalCtx); +void func_80933324(EnFz* this); +void func_80933368(EnFz* this, GlobalContext* globalCtx); +void func_809333A4(EnFz* this); +void func_809333D8(EnFz* this, GlobalContext* globalCtx); +void func_80933414(EnFz* this); +void func_80933444(EnFz* this, GlobalContext* globalCtx); +void func_80933480(EnFz* this, GlobalContext* globalCtx); +void func_809334B8(EnFz* this, GlobalContext* globalCtx); +void func_809336C0(EnFz* this, GlobalContext* globalCtx); +void func_80933760(EnFz* this, GlobalContext* globalCtx); +void func_80933790(EnFz* this); +void func_809337D4(EnFz* this, GlobalContext* globalCtx); +void func_8093389C(EnFz* this); +void func_809338E0(EnFz* this, GlobalContext* globalCtx); +void func_80933AF4(EnFz* this); +void func_80933B38(EnFz* this, GlobalContext* globalCtx); +void func_80934018(EnFz* this, Vec3f* a, Vec3f* b, Vec3f* c, f32 arg4); +void func_809340BC(EnFz* this, Vec3f* a, Vec3f* b, Vec3f* c, f32 arg4, f32 arg5, s16 arg6, u8 arg7); +void func_80934178(EnFz* this, GlobalContext* globalCtx); +void func_80934464(EnFz* this, GlobalContext* globalCtx); + const ActorInit En_Fz_InitVars = { ACTOR_EN_FZ, ACTORCAT_ENEMY, @@ -28,29 +61,66 @@ const ActorInit En_Fz_InitVars = { (ActorFunc)EnFz_Draw, }; -// static ColliderCylinderInitType1 sCylinderInit = { -static ColliderCylinderInitType1 D_809346F8 = { - { COLTYPE_NONE, AT_ON | AT_TYPE_ENEMY, AC_ON | AC_TYPE_PLAYER, OC1_ON | OC1_TYPE_ALL, COLSHAPE_CYLINDER, }, - { ELEMTYPE_UNK0, { 0xF7CFFFFF, 0x00, 0x00 }, { 0xF7CFEFDD, 0x00, 0x00 }, TOUCH_ON | TOUCH_SFX_NORMAL, BUMP_ON | BUMP_HOOKABLE, OCELEM_ON, }, +static s16 D_809346F0[] = { 0, 0x2000, 0x4000, 0 }; + +static ColliderCylinderInitType1 sCylinderInit1 = { + { + COLTYPE_NONE, + AT_ON | AT_TYPE_ENEMY, + AC_ON | AC_TYPE_PLAYER, + OC1_ON | OC1_TYPE_ALL, + COLSHAPE_CYLINDER, + }, + { + ELEMTYPE_UNK0, + { 0xF7CFFFFF, 0x00, 0x00 }, + { 0xF7CFEFDD, 0x00, 0x00 }, + TOUCH_ON | TOUCH_SFX_NORMAL, + BUMP_ON | BUMP_HOOKABLE, + OCELEM_ON, + }, { 30, 80, 0, { 0, 0, 0 } }, }; -// static ColliderCylinderInitType1 sCylinderInit = { -static ColliderCylinderInitType1 D_80934724 = { - { COLTYPE_METAL, AT_NONE, AC_ON | AC_HARD | AC_TYPE_PLAYER, OC1_NONE, COLSHAPE_CYLINDER, }, - { ELEMTYPE_UNK0, { 0xF7CFFFFF, 0x00, 0x00 }, { 0x00001022, 0x00, 0x00 }, TOUCH_NONE | TOUCH_SFX_NORMAL, BUMP_ON, OCELEM_NONE, }, +static ColliderCylinderInitType1 sCylinderInit2 = { + { + COLTYPE_METAL, + AT_NONE, + AC_ON | AC_HARD | AC_TYPE_PLAYER, + OC1_NONE, + COLSHAPE_CYLINDER, + }, + { + ELEMTYPE_UNK0, + { 0xF7CFFFFF, 0x00, 0x00 }, + { 0x00001022, 0x00, 0x00 }, + TOUCH_NONE | TOUCH_SFX_NORMAL, + BUMP_ON, + OCELEM_NONE, + }, { 35, 80, 0, { 0, 0, 0 } }, }; -// static ColliderCylinderInitType1 sCylinderInit = { -static ColliderCylinderInitType1 D_80934750 = { - { COLTYPE_NONE, AT_ON | AT_TYPE_ENEMY, AC_NONE, OC1_NONE, COLSHAPE_CYLINDER, }, - { ELEMTYPE_UNK0, { 0x20000000, 0x02, 0x04 }, { 0x00000000, 0x00, 0x00 }, TOUCH_ON | TOUCH_SFX_NORMAL, BUMP_NONE, OCELEM_NONE, }, +static ColliderCylinderInitType1 sCylinderInit3 = { + { + COLTYPE_NONE, + AT_ON | AT_TYPE_ENEMY, + AC_NONE, + OC1_NONE, + COLSHAPE_CYLINDER, + }, + { + ELEMTYPE_UNK0, + { 0x20000000, 0x02, 0x04 }, + { 0x00000000, 0x00, 0x00 }, + TOUCH_ON | TOUCH_SFX_NORMAL, + BUMP_NONE, + OCELEM_NONE, + }, { 20, 30, -15, { 0, 0, 0 } }, }; -// static DamageTable sDamageTable = { -static DamageTable D_8093477C = { +static DamageTable sDamageTable = { /* Deku Nut */ DMG_ENTRY(0, 0x0), /* Deku Stick */ DMG_ENTRY(0, 0xD), /* Horse trample */ DMG_ENTRY(0, 0x0), @@ -85,96 +155,870 @@ static DamageTable D_8093477C = { /* Powder Keg */ DMG_ENTRY(1, 0xF), }; -// static InitChainEntry sInitChain[] = { -static InitChainEntry D_8093479C[] = { +static InitChainEntry sInitChain[] = { ICHAIN_S8(hintId, 59, ICHAIN_CONTINUE), ICHAIN_U8(targetMode, 2, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneForward, 1400, ICHAIN_CONTINUE), ICHAIN_F32(targetArrowOffset, 30, ICHAIN_STOP), }; -#endif +void EnFz_Init(Actor* thisx, GlobalContext* globalCtx) { + EnFz* this = THIS; -extern ColliderCylinderInit D_809346F8; -extern ColliderCylinderInit D_80934724; -extern ColliderCylinderInit D_80934750; -extern DamageTable D_8093477C; -extern InitChainEntry D_8093479C[]; + Actor_ProcessInitChain(&this->actor, sInitChain); + this->actor.colChkInfo.damageTable = &sDamageTable; + this->actor.colChkInfo.health = 3; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/EnFz_Init.s") + Collider_InitCylinder(globalCtx, &this->collider1); + Collider_SetCylinderType1(globalCtx, &this->collider1, &this->actor, &sCylinderInit1); + Collider_InitCylinder(globalCtx, &this->collider2); + Collider_SetCylinderType1(globalCtx, &this->collider2, &this->actor, &sCylinderInit2); + Collider_InitCylinder(globalCtx, &this->collider3); + Collider_SetCylinderType1(globalCtx, &this->collider3, &this->actor, &sCylinderInit3); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/EnFz_Destroy.s") + Actor_SetScale(&this->actor, 0.008f); + this->actor.gravity = 0.0f; + this->actor.velocity.y = 0.0f; + this->actor.colChkInfo.mass = MASS_IMMOVABLE; + this->actor.flags &= ~1; + this->unk_BC8 = 0; + this->unk_BCF = 0; + this->unk_BCC = 1; + this->unk_BCD = 0; + this->unk_BCE = 0; + this->unk_BD7 = 1; + this->unk_BD8 = 0; + this->actor.speedXZ = 0.0f; + this->actor.uncullZoneScale = 400.0f; + this->unk_BAC = this->actor.world.pos.y; + this->unk_BB4 = this->actor.world.pos.y; + this->unk_BA8 = this->actor.world.pos.x; + this->unk_BB0 = this->actor.world.pos.z; + this->actor.velocity.y = this->actor.gravity; + this->unk_BB8 = 135.0f; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_80932784.s") + if (ENFZ_GET_8000(&this->actor)) { + this->unk_BC0 = 0; + this->actor.scale.y = 0.0f; + func_80933184(this); + } else { + this->unk_BC0 = 255; + if (this->actor.shape.rot.z == 0) { + this->unk_BC6 = (s32)Rand_ZeroFloat(64.0f) + 192; + } else { + if (this->actor.shape.rot.z < 0) { + this->actor.shape.rot.z = 1; + } else if (this->actor.shape.rot.z > 0x10) { + this->actor.shape.rot.z = 0x10; + } + this->actor.shape.rot.z += -1; + this->unk_BC6 = this->actor.shape.rot.z * 0x10; + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_809328A4.s") + this->actor.shape.rot.z = 0; + if (ENFZ_GET_4000(&this->actor)) { + this->unk_BC0 = 0; + this->actor.scale.y = 0.0f; + func_80933184(this); + } else if (ENFZ_GET_F(&this->actor) == ENFZ_F_3) { + func_80933AF4(this); + } else { + func_8093389C(this); + } + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_809328F4.s") + this->unk_BA4 = 0; + this->unk_BA0 = 0.0f; + this->unk_B9C = 0.0f; + func_80932784(this, globalCtx); +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_80932AE8.s") +void EnFz_Destroy(Actor* thisx, GlobalContext* globalCtx) { + EnFz* this = THIS; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_80932AF4.s") + Collider_DestroyCylinder(globalCtx, &this->collider1); + Collider_DestroyCylinder(globalCtx, &this->collider2); + Collider_DestroyCylinder(globalCtx, &this->collider3); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_80932BD4.s") + if ((this->actor.parent != NULL) && (this->unk_BC4 == 0) && (this->actor.parent->id == ACTOR_EN_WIZ) && + (this->actor.parent->update != NULL) && (((EnWiz*)this->actor.parent)->unk_448 != 0)) { + EnWiz* wiz = (EnWiz*)this->actor.parent; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_80932C98.s") + wiz->unk_448 = 0; + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_80933014.s") +void func_80932784(EnFz* this, GlobalContext* globalCtx) { + Vec3f sp5C; + Vec3f sp50; + Vec3f sp44; + s32 sp40; + CollisionPoly* sp3C; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_809330D4.s") + sp5C.x = this->actor.world.pos.x; + sp5C.y = this->actor.world.pos.y + 20.0f; + sp5C.z = this->actor.world.pos.z; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_80933104.s") + Matrix_InsertTranslation(sp5C.x, sp5C.y, sp5C.z, MTXMODE_NEW); + Matrix_InsertRotation(this->actor.shape.rot.x, this->actor.shape.rot.y, this->actor.shape.rot.z, MTXMODE_APPLY); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_80933184.s") + sp44.x = sp44.y = 0.0f; + sp44.z = 440.0f; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_809331F8.s") + Matrix_MultiplyVector3fByState(&sp44, &this->unk_22C); + if (BgCheck_EntityLineTest1(&globalCtx->colCtx, &sp5C, &this->unk_22C, &sp50, &sp3C, 1, 0, 0, 1, &sp40)) { + Math_Vec3f_Copy(&this->unk_22C, &sp50); + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_80933248.s") + sp5C.x = this->actor.world.pos.x - this->unk_22C.x; + sp5C.z = this->actor.world.pos.z - this->unk_22C.z; + this->unk_238 = SQ(sp5C.x) + SQ(sp5C.z); +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_80933274.s") +s32 func_809328A4(EnFz* this, Vec3f* arg1) { + f32 temp_f0 = this->actor.world.pos.x - arg1->x; + f32 temp_f2 = this->actor.world.pos.z - arg1->z; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_80933324.s") + if (this->unk_238 <= (SQ(temp_f0) + SQ(temp_f2))) { + return true; + } + return false; +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_80933368.s") +void func_809328F4(EnFz* this, GlobalContext* globalCtx, Vec3f* arg2, s32 arg3, f32 arg4) { + s32 i; + Vec3f spA8; + Vec3f sp9C; + Vec3f sp90; + Color_RGBA8 sp8C; + Color_RGBA8 sp88; + f32 temp_f24; + s32 temp_s1; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_809333A4.s") + sp90.x = sp90.z = 0.0f; + sp90.y = -1.0f; + sp8C.r = 155; + sp8C.g = 255; + sp8C.b = 255; + sp8C.a = 255; + sp88.r = 200; + sp88.g = 200; + sp88.b = 200; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_809333D8.s") + for (i = 0; i < arg3; i++) { + temp_f24 = randPlusMinusPoint5Scaled(0.3f) + 0.6f; + temp_s1 = (s32)randPlusMinusPoint5Scaled(5.0f) + 12; + spA8.x = randPlusMinusPoint5Scaled(arg4) + arg2->x; + spA8.y = Rand_ZeroFloat(arg4) + arg2->y; + spA8.z = randPlusMinusPoint5Scaled(arg4) + arg2->z; + sp9C.x = randPlusMinusPoint5Scaled(10.0f); + sp9C.y = Rand_ZeroFloat(10.0f) + 2.0f; + sp9C.z = randPlusMinusPoint5Scaled(10.0f); + EffectSsEnIce_Spawn(globalCtx, &spA8, temp_f24, &sp9C, &sp90, &sp8C, &sp88, temp_s1); + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_80933414.s") + CollisionCheck_SpawnShieldParticles(globalCtx, arg2); +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_80933444.s") +void func_80932AE8(EnFz* this) { +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_80933480.s") +void func_80932AF4(EnFz* this) { + Vec3f sp44; + Vec3f sp38; + Vec3f sp2C; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_809334B8.s") + if (!(this->unk_BC6 & 0xF)) { + sp44.x = randPlusMinusPoint5Scaled(40.0f) + this->actor.world.pos.x; + sp44.y = randPlusMinusPoint5Scaled(40.0f) + this->actor.world.pos.y + 30.0f; + sp44.z = randPlusMinusPoint5Scaled(40.0f) + this->actor.world.pos.z; + sp2C.x = sp2C.z = 0.0f; + sp2C.y = 0.1f; + sp38.x = sp38.y = sp38.z = 0.0f; + func_80934018(this, &sp44, &sp38, &sp2C, Rand_ZeroFloat(7.5f) + 15.0f); + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_809336C0.s") +void func_80932BD4(EnFz* this) { + Vec3f sp44; + Vec3f sp38; + Vec3f sp2C; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_80933760.s") + if (!(this->unk_BC6 & 3)) { + sp44.x = randPlusMinusPoint5Scaled(40.0f) + this->actor.world.pos.x; + sp44.y = this->unk_BB4; + sp44.z = randPlusMinusPoint5Scaled(40.0f) + this->actor.world.pos.z; + sp2C.x = sp2C.z = 0.0f; + sp2C.y = 0.1f; + sp38.x = sp38.y = sp38.z = 0.0f; + func_80934018(this, &sp44, &sp38, &sp2C, Rand_ZeroFloat(7.5f) + 15.0f); + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_80933790.s") +void func_80932C98(EnFz* this, GlobalContext* globalCtx) { + Vec3f sp3C; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_809337D4.s") + if (this->unk_BCD != 0) { + if ((this->actor.bgCheckFlags & 8) || !func_800BC4EC(&this->actor, globalCtx, 60.0f, this->actor.world.rot.y)) { + this->actor.bgCheckFlags &= ~0x8; + this->unk_BCD = 0; + this->unk_BBC = 0.0f; + this->actor.speedXZ = 0.0f; + } + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_8093389C.s") + if (this->actor.parent != NULL) { + if ((this->unk_BC4 != 5) && (this->actor.parent->id == ACTOR_EN_WIZ)) { + Actor* parent = this->actor.parent; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_809338E0.s") + if ((parent->update == NULL) || (parent->colChkInfo.health <= 0)) { + this->actor.colChkInfo.health = 0; + this->unk_BC4 = 5; + Audio_PlayActorSound2(&this->actor, NA_SE_EN_FREEZAD_DEAD); + Audio_PlayActorSound2(&this->actor, NA_SE_EV_ICE_BROKEN); + sp3C.x = this->actor.world.pos.x; + sp3C.y = this->actor.world.pos.y; + sp3C.z = this->actor.world.pos.z; + func_809328F4(this, globalCtx, &sp3C, 30, 10.0f); + func_809336C0(this, globalCtx); + return; + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_80933AF4.s") + if ((this->actor.colChkInfo.health != 0) && (this->unk_BC4 == 1)) { + this->actor.colChkInfo.health = 0; + this->unk_BC4 = 5; + Audio_PlayActorSound2(&this->actor, NA_SE_EN_FREEZAD_DEAD); + Audio_PlayActorSound2(&this->actor, NA_SE_EV_ICE_BROKEN); + sp3C.x = this->actor.world.pos.x; + sp3C.y = this->actor.world.pos.y; + sp3C.z = this->actor.world.pos.z; + func_809328F4(this, globalCtx, &sp3C, 30, 10.0f); + func_809336C0(this, globalCtx); + return; + } + } + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_80933B38.s") + if (this->unk_BCE != 0) { + if (ENFZ_GET_8000(&this->actor) && (this->collider1.base.atFlags & AC_HIT)) { + this->unk_BCD = 0; + this->unk_BBC = 0.0f; + this->collider1.base.acFlags &= ~AC_HIT; + this->actor.speedXZ = 0.0f; + this->unk_BCA = 10; + func_809330D4(this); + } else if (this->collider2.base.acFlags & AC_BOUNCED) { + this->collider2.base.acFlags &= ~AC_BOUNCED; + this->collider1.base.acFlags &= ~AC_HIT; + } else if (this->collider1.base.acFlags & AC_HIT) { + this->collider1.base.acFlags &= ~AC_HIT; + switch (this->actor.colChkInfo.damageEffect) { + case 4: + this->unk_BA4 = 0x28; + this->unk_B9C = 1.0f; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_80933B48.s") + case 15: + Actor_ApplyDamage(&this->actor); + func_800BCB70(&this->actor, 0x4000, 0xFF, 0x2000, 8); + if (this->actor.colChkInfo.health != 0) { + Audio_PlayActorSound2(&this->actor, NA_SE_EN_FREEZAD_DAMAGE); + sp3C.x = this->actor.world.pos.x; + sp3C.y = this->actor.world.pos.y; + sp3C.z = this->actor.world.pos.z; + func_809328F4(this, globalCtx, &sp3C, 10, 0.0f); + this->unk_BCF++; + break; + } + Audio_PlayActorSound2(&this->actor, NA_SE_EN_FREEZAD_DEAD); + Audio_PlayActorSound2(&this->actor, NA_SE_EV_ICE_BROKEN); + sp3C.x = this->actor.world.pos.x; + sp3C.y = this->actor.world.pos.y; + sp3C.z = this->actor.world.pos.z; + func_809328F4(this, globalCtx, &sp3C, 30, 10.0f); + func_809336C0(this, globalCtx); + break; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/EnFz_Update.s") + case 2: + Audio_PlayActorSound2(&this->actor, NA_SE_EN_FREEZAD_DEAD); + func_80933790(this); + break; + } + } + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/EnFz_Draw.s") +void func_80933014(EnFz* this) { + s16 temp_a1 = this->actor.yawTowardsPlayer; + s32 temp_a2 = ENFZ_GET_3000(&this->actor); + s16 temp; + s16 temp2; + s32 temp_v1; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_80934018.s") + if (!ENFZ_GET_8000(&this->actor)) { + temp_v1 = this->actor.home.rot.y; + if (temp_a2 != 3) { + temp2 = temp_a1 - temp_v1; + if (D_809346F0[temp_a2] < ABS_ALT(temp2)) { + temp = (temp2 > 0) ? D_809346F0[temp_a2] : -D_809346F0[temp_a2]; + temp_a1 = this->actor.home.rot.y + temp; + } + } + } + Math_SmoothStepToS(&this->actor.shape.rot.y, temp_a1, 10, 2000, 0); + this->actor.world.rot.y = this->actor.shape.rot.y; +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_809340BC.s") +void func_809330D4(EnFz* this) { + this->unk_BD6 = 2; + this->unk_BCE = 0; + this->actor.flags &= ~1; + this->actionFunc = func_80933104; +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_80934178.s") +void func_80933104(EnFz* this, GlobalContext* globalCtx) { + this->unk_BC0 -= 16; + if (this->unk_BC0 > 255) { + this->unk_BC0 = 0; + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fz/func_80934464.s") + if (Math_SmoothStepToF(&this->actor.scale.y, 0, 1.0f, 0.0005f, 0.0f) == 0.0f) { + func_80933184(this); + } +} + +void func_80933184(EnFz* this) { + this->unk_BD6 = 0; + this->unk_BD2 = 0; + this->unk_BD0 = 0; + this->unk_BCA = 100; + + this->actor.world.pos.x = this->unk_BA8; + this->actor.world.pos.y = this->unk_BAC; + this->actor.world.pos.z = this->unk_BB0; + + if (ENFZ_GET_4000(&this->actor)) { + this->unk_BD6 = 2; + this->unk_BCA = 10; + this->unk_BD2 = 4000; + this->actionFunc = func_80933274; + } else { + this->actionFunc = func_809331F8; + } +} + +void func_809331F8(EnFz* this, GlobalContext* globalCtx) { + if ((this->unk_BCA == 0) && (this->actor.xzDistToPlayer < 400.0f)) { + func_80933248(this); + } +} + +void func_80933248(EnFz* this) { + this->unk_BD6 = 2; + this->unk_BCA = 20; + this->unk_BD2 = 4000; + this->actionFunc = func_80933274; +} + +void func_80933274(EnFz* this, GlobalContext* globalCtx) { + if (this->unk_BCA == 0) { + + this->unk_BC0 += 8; + if (this->unk_BC0 > 255) { + this->unk_BC0 = 255; + } + + if (Math_SmoothStepToF(&this->actor.scale.y, 0.008f, 1.0f, 0.0005f, 0.0f) == 0.0f) { + if (ENFZ_GET_4000(&this->actor)) { + func_8093389C(this); + } else { + func_80933324(this); + } + } + } +} + +void func_80933324(EnFz* this) { + this->unk_BD6 = 1; + this->unk_BCA = 40; + this->unk_BCC = 1; + this->unk_BCE = 1; + this->actor.flags |= 1; + this->actor.gravity = -1.0f; + this->actionFunc = func_80933368; +} + +void func_80933368(EnFz* this, GlobalContext* globalCtx) { + func_80933014(this); + if (this->unk_BCA == 0) { + func_809333A4(this); + } +} + +void func_809333A4(EnFz* this) { + this->unk_BD6 = 1; + this->unk_BCD = 1; + this->unk_BCA = 100; + this->unk_BBC = 4.0f; + this->actionFunc = func_809333D8; +} + +void func_809333D8(EnFz* this, GlobalContext* globalCtx) { + if ((this->unk_BCA == 0) || (this->unk_BCD == 0)) { + func_80933414(this); + } +} + +void func_80933414(EnFz* this) { + this->unk_BD6 = 1; + this->unk_BBC = 0.0f; + this->actor.speedXZ = 0.0f; + this->unk_BCA = 40; + this->actionFunc = func_80933444; +} + +void func_80933444(EnFz* this, GlobalContext* globalCtx) { + func_80933014(this); + if (this->unk_BCA == 0) { + func_80933480(this, globalCtx); + } +} + +void func_80933480(EnFz* this, GlobalContext* globalCtx) { + this->unk_BD6 = 1; + this->unk_BCA = 80; + this->actionFunc = func_809334B8; + func_80932784(this, globalCtx); +} + +void func_809334B8(EnFz* this, GlobalContext* globalCtx) { + Vec3f sp64; + Vec3f sp58; + Vec3f sp4C; + Vec3f sp40; + u8 sp3F; + s16 sp3C; + + if (this->unk_BCA == 0) { + func_809330D4(this); + return; + } + + if (this->unk_BCA > 10) { + sp3F = 0; + sp3C = 150; + func_800B9010(&this->actor, NA_SE_EN_FREEZAD_BREATH - SFX_FLAG); + if ((this->unk_BCA - 10) < 16) { + sp3C = (this->unk_BCA * 10) - 100; + } + + sp40.x = sp40.z = 0.0f; + sp40.y = 0.6f; + + sp58.x = this->actor.world.pos.x; + sp58.y = this->actor.world.pos.y + 20.0f; + sp58.z = this->actor.world.pos.z; + + Matrix_RotateY(this->actor.shape.rot.y, 0); + + sp64.x = 0.0f; + sp64.y = -2.0f; + sp64.z = ((ENFZ_GET_F(&this->actor) == ENFZ_F_1) ? 10.0f + : (ENFZ_GET_F(&this->actor) == ENFZ_F_2) ? 20.0f + : 0.0f) + + 20; + + Matrix_MultiplyVector3fByState(&sp64, &sp4C); + + if ((this->unk_BCA & 7) == 0) { + sp3F = 1; + } + + func_809340BC(this, &sp58, &sp4C, &sp40, 2.0f, 25.0f, sp3C, sp3F); + + sp58.x += sp4C.x * 0.5f; + sp58.y += sp4C.y * 0.5f; + sp58.z += sp4C.z * 0.5f; + + func_809340BC(this, &sp58, &sp4C, &sp40, 2.0f, 25.0f, sp3C, 0); + } +} + +void func_809336C0(EnFz* this, GlobalContext* globalCtx) { + this->unk_BD6 = 0; + this->unk_BBC = 0.0f; + this->actor.gravity = 0.0f; + this->actor.velocity.y = 0.0f; + this->actor.speedXZ = 0.0f; + this->unk_BCC = 1; + this->unk_BCE = 0; + this->unk_BD8 = 1; + this->actor.flags &= ~1; + this->unk_BD7 = 0; + this->unk_BCA = 60; + func_800BC154(globalCtx, &globalCtx->actorCtx, &this->actor, ACTORCAT_PROP); + Item_DropCollectibleRandom(globalCtx, &this->actor, &this->actor.world.pos, 0xA0); + this->actionFunc = func_80933760; +} + +void func_80933760(EnFz* this, GlobalContext* globalCtx) { + if (this->unk_BCA == 0) { + Actor_MarkForDeath(&this->actor); + } +} + +void func_80933790(EnFz* this) { + this->unk_BD6 = 3; + this->unk_BCE = 0; + this->unk_BD8 = 1; + this->actor.flags &= ~1; + this->actor.speedXZ = 0.0f; + this->unk_BBC = 0.0f; + this->actionFunc = func_809337D4; +} + +void func_809337D4(EnFz* this, GlobalContext* globalCtx) { + Math_StepToF(&this->actor.scale.y, 0.0006f, 0.0006f); + + if (this->actor.scale.y < 0.006f) { + this->actor.scale.x += 0.001f; + this->actor.scale.z += 0.001f; + } + + if (this->actor.scale.y < 0.004f) { + this->unk_BC0 -= 20; + if (this->unk_BC0 > 255) { + this->unk_BC0 = 0; + } + } + + if (this->unk_BC0 == 0) { + func_809336C0(this, globalCtx); + } +} + +void func_8093389C(EnFz* this) { + this->unk_BD6 = 1; + this->unk_BCA = 40; + this->unk_BCC = 1; + this->unk_BCE = 1; + this->actor.flags |= 1; + this->actor.gravity = -1.0f; + this->actionFunc = func_809338E0; +} + +void func_809338E0(EnFz* this, GlobalContext* globalCtx) { + Vec3f sp64; + Vec3f sp58; + Vec3f sp4C; + Vec3f sp40; + u8 sp3F; + s16 sp3C; + + if (this->unk_BC6 & (0x80 | 0x40)) { + func_80933014(this); + func_80932784(this, globalCtx); + return; + } + + sp3F = 0; + sp3C = 150; + func_800B9010(&this->actor, NA_SE_EN_FREEZAD_BREATH - SFX_FLAG); + + if ((this->unk_BC6 & 0x3F) >= 0x30) { + sp3C = 630 - ((this->unk_BC6 & 0x3F) * 10); + } + + sp40.x = sp40.z = 0.0f; + sp40.y = 0.6f; + + sp58.x = this->actor.world.pos.x; + sp58.y = this->actor.world.pos.y + 20.0f; + sp58.z = this->actor.world.pos.z; + + Matrix_RotateY(this->actor.shape.rot.y, 0); + + sp64.x = 0.0f; + sp64.y = -2.0f; + sp64.z = ((ENFZ_GET_F(&this->actor) == ENFZ_F_1) ? 10.0f + : (ENFZ_GET_F(&this->actor) == ENFZ_F_2) ? 20.0f + : 0.0f) + + 20; + + Matrix_MultiplyVector3fByState(&sp64, &sp4C); + + if (!(this->unk_BC6 & 7)) { + sp3F = 1; + } + + func_809340BC(this, &sp58, &sp4C, &sp40, 2.0f, 25.0f, sp3C, sp3F); + sp58.x += sp4C.x * 0.5f; + sp58.y += sp4C.y * 0.5f; + sp58.z += sp4C.z * 0.5f; + func_809340BC(this, &sp58, &sp4C, &sp40, 2.0f, 25.0f, sp3C, 0); +} + +void func_80933AF4(EnFz* this) { + this->unk_BD6 = 1; + this->unk_BCA = 40; + this->unk_BCC = 1; + this->unk_BCE = 1; + this->actor.flags |= 1; + this->actor.gravity = -1.0f; + this->actionFunc = func_80933B38; +} + +void func_80933B38(EnFz* this, GlobalContext* globalCtx) { +} + +void func_80933B48(EnFz* this, GlobalContext* globalCtx) { + if (this->unk_BA4 != 0) { + if (this->unk_BA4 > 0) { + this->unk_BA4--; + } + + if (this->unk_BA4 < 20) { + Math_SmoothStepToF(&this->unk_BA0, 0.0f, 0.5f, 0.03f, 0.0f); + this->unk_B9C = this->unk_BA4 * 0.05f; + } else { + Math_SmoothStepToF(&this->unk_BA0, 0.5f, 0.1f, 0.02f, 0.0f); + } + } +} + +void EnFz_Update(Actor* thisx, GlobalContext* globalCtx) { + static EnFzUnkFunc D_809347AC[] = { func_80932AE8, func_80932AF4, func_80932BD4, func_80932BD4 }; + s32 pad; + EnFz* this = THIS; + + this->unk_BC6++; + if (this->unk_BC8 != 0) { + this->unk_BC8--; + } + + if (this->unk_BCA != 0) { + this->unk_BCA--; + } + + if (this->unk_BD9 != 0) { + this->unk_BD9--; + } + + Actor_SetHeight(&this->actor, 50.0f); + func_80932C98(this, globalCtx); + + this->actionFunc(this, globalCtx); + + if (this->unk_BD8 == 0) { + Collider_UpdateCylinder(&this->actor, &this->collider1); + Collider_UpdateCylinder(&this->actor, &this->collider2); + if (this->unk_BCE != 0) { + if (this->actor.colorFilterTimer == 0) { + CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider1.base); + CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider2.base); + } + CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider1.base); + } + } + + Math_StepToF(&this->actor.speedXZ, this->unk_BBC, 0.2f); + Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor); + if (this->unk_BCC != 0) { + Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 20.0f, 20.0f, 20.0f, 5); + } + + D_809347AC[this->unk_BD6](this); + func_80933B48(this, globalCtx); + func_80934178(this, globalCtx); +} + +void EnFz_Draw(Actor* thisx, GlobalContext* globalCtx) { + static Gfx* D_809347BC[] = { object_fz_DL_001130, object_fz_DL_0021A0, object_fz_DL_002CA0 }; + s32 pad; + EnFz* this = THIS; + s32 sp9C = 3 - this->actor.colChkInfo.health; + + OPEN_DISPS(globalCtx->state.gfxCtx); + + if (this->actor.colChkInfo.health == 0) { + sp9C = 2; + } + + if (this->unk_BD7 != 0) { + func_800B8118(&this->actor, globalCtx, 0); + func_8012C2DC(globalCtx->state.gfxCtx); + + gSPSegment(POLY_XLU_DISP++, 0x08, + Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, globalCtx->state.frames % 128, 0x20, 0x20, 1, 0, + (globalCtx->state.frames * 2) % 128, 0x20, 0x20)); + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gDPSetCombineLERP(POLY_XLU_DISP++, TEXEL1, PRIMITIVE, PRIM_LOD_FRAC, TEXEL0, TEXEL1, TEXEL0, PRIMITIVE, TEXEL0, + PRIMITIVE, ENVIRONMENT, COMBINED, ENVIRONMENT, COMBINED, 0, ENVIRONMENT, 0); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, 155, 255, 255, 255); + gDPSetEnvColor(POLY_XLU_DISP++, 200, 200, 200, this->unk_BC0); + gSPDisplayList(POLY_XLU_DISP++, D_809347BC[sp9C]); + } + + func_80934464(this, globalCtx); + + if (this->unk_BA4 > 0) { + s32 pad2[6]; + Vec3f sp58; + Vec3f sp4C; + s32 pad3; + + sp4C = this->actor.world.pos; + sp58 = this->actor.world.pos; + sp4C.y += 20.0f; + sp58.y += 40.0f; + func_800BE680(globalCtx, NULL, &sp4C, 2, this->unk_BA0 * 4.0f, 0.5f, this->unk_B9C, 20); + } + + CLOSE_DISPS(globalCtx->state.gfxCtx); +} + +void func_80934018(EnFz* this, Vec3f* a, Vec3f* b, Vec3f* c, f32 arg4) { + s16 i; + EnFzStruct* ptr = &this->unk_23C[0]; + + for (i = 0; i < ARRAY_COUNT(this->unk_23C); i++, ptr++) { + if (ptr->unk_00 == 0) { + ptr->unk_00 = 1; + ptr->unk_04 = *a; + ptr->unk_10 = *b; + ptr->unk_1C = *c; + ptr->unk_2E = 0; + ptr->unk_30 = arg4 / 1000.0f; + ptr->unk_2C = 0; + ptr->unk_01 = 0; + break; + } + } +} + +void func_809340BC(EnFz* this, Vec3f* a, Vec3f* b, Vec3f* c, f32 arg4, f32 arg5, s16 arg6, u8 arg7) { + s16 i; + EnFzStruct* ptr = &this->unk_23C[0]; + + for (i = 0; i < ARRAY_COUNT(this->unk_23C); i++, ptr++) { + if (ptr->unk_00 == 0) { + ptr->unk_00 = 2; + ptr->unk_04 = *a; + ptr->unk_10 = *b; + ptr->unk_1C = *c; + ptr->unk_2E = 0; + ptr->unk_30 = arg4 / 1000.0f; + ptr->unk_34 = arg5 / 1000.0f; + ptr->unk_2C = arg6; + ptr->unk_01 = 0; + ptr->unk_38 = arg7; + break; + } + } +} + +void func_80934178(EnFz* this, GlobalContext* globalCtx) { + s16 i; + EnFzStruct* ptr = this->unk_23C; + Vec3f sp64; + + for (i = 0; i < ARRAY_COUNT(this->unk_23C); i++, ptr++) { + if (ptr->unk_00 != 0) { + ptr->unk_04.x += ptr->unk_10.x; + ptr->unk_04.y += ptr->unk_10.y; + ptr->unk_04.z += ptr->unk_10.z; + + ptr->unk_01++; + + ptr->unk_10.x += ptr->unk_1C.x; + ptr->unk_10.y += ptr->unk_1C.y; + ptr->unk_10.z += ptr->unk_1C.z; + + if (ptr->unk_00 == 1) { + if (ptr->unk_2E == 0) { + ptr->unk_2C += 10; + if (ptr->unk_2C >= 100) { + ptr->unk_2E++; + } + } else { + ptr->unk_2C -= 3; + if (ptr->unk_2C <= 0) { + ptr->unk_2C = 0; + ptr->unk_00 = 0; + } + } + } else if (ptr->unk_00 == 2) { + Math_ApproachF(&ptr->unk_30, ptr->unk_34, 0.1f, ptr->unk_34 / 10.0f); + if (ptr->unk_2E == 0) { + if (ptr->unk_01 >= 7) { + ptr->unk_2E++; + } + } else { + ptr->unk_10.x *= 0.75f; + ptr->unk_1C.y = 2.0f; + ptr->unk_10.z *= 0.75f; + ptr->unk_2C -= 17; + if (ptr->unk_2C <= 0) { + ptr->unk_2C = 0; + ptr->unk_00 = 0; + } + } + + if ((this->unk_BD9 == 0) && (ptr->unk_2C > 100) && (ptr->unk_38 != 0)) { + this->collider3.dim.pos.x = ptr->unk_04.x; + this->collider3.dim.pos.y = ptr->unk_04.y; + this->collider3.dim.pos.z = ptr->unk_04.z; + CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider3.base); + } + + sp64.x = ptr->unk_04.x; + sp64.y = ptr->unk_04.y + 10.0f; + sp64.z = ptr->unk_04.z; + + if ((ptr->unk_2E != 2) && func_809328A4(this, &sp64)) { + ptr->unk_2E = 2; + ptr->unk_10.x = 0.0f; + ptr->unk_10.z = 0.0f; + } + } + } + } +} + +void func_80934464(EnFz* this, GlobalContext* globalCtx) { + GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; + s16 i; + u8 flag = 0; + EnFzStruct* ptr = this->unk_23C; + + OPEN_DISPS(gfxCtx); + + func_8012C2DC(globalCtx->state.gfxCtx); + + gDPSetColorDither(POLY_XLU_DISP++, G_CD_BAYER); + gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_PATTERN); + + for (i = 0; i < ARRAY_COUNT(this->unk_23C); i++, ptr++) { + if (ptr->unk_00 > 0) { + gDPPipeSync(POLY_XLU_DISP++); + + if (flag == 0) { + gSPDisplayList(POLY_XLU_DISP++, gameplay_keep_DL_051180); + flag++; + } + + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 195, 225, 235, ptr->unk_2C); + gSPSegment(POLY_XLU_DISP++, 0x08, + Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (ptr->unk_01 + (i * 3)) * 3, + (ptr->unk_01 + (i * 3)) * 15, 0x20, 0x40, 1, 0, 0, 0x20, 0x20)); + + Matrix_InsertTranslation(ptr->unk_04.x, ptr->unk_04.y, ptr->unk_04.z, MTXMODE_NEW); + Matrix_NormalizeXYZ(&globalCtx->billboardMtxF); + Matrix_Scale(ptr->unk_30, ptr->unk_30, 1.0f, MTXMODE_APPLY); + + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPDisplayList(POLY_XLU_DISP++, gameplay_keep_DL_051238); + } + } + + CLOSE_DISPS(globalCtx->state.gfxCtx); +} diff --git a/src/overlays/actors/ovl_En_Fz/z_en_fz.h b/src/overlays/actors/ovl_En_Fz/z_en_fz.h index 7eb989cf36..5e76eadf9f 100644 --- a/src/overlays/actors/ovl_En_Fz/z_en_fz.h +++ b/src/overlays/actors/ovl_En_Fz/z_en_fz.h @@ -5,10 +5,70 @@ struct EnFz; +typedef void (*EnFzActionFunc)(struct EnFz*, GlobalContext*); +typedef void (*EnFzUnkFunc)(struct EnFz*); + +#define ENFZ_GET_F(thisx) ((thisx)->params & 0xF) +#define ENFZ_GET_3000(thisx) (((thisx)->params & 0x3000) >> 0xC) +#define ENFZ_GET_4000(thisx) ((thisx)->params & 0x4000) +#define ENFZ_GET_8000(thisx) ((thisx)->params & 0x8000) + +enum { + /* 0 */ ENFZ_F_0, + /* 1 */ ENFZ_F_1, + /* 2 */ ENFZ_F_2, + /* 3 */ ENFZ_F_3, +}; + +typedef struct { + /* 0x00 */ u8 unk_00; + /* 0x01 */ u8 unk_01; + /* 0x04 */ Vec3f unk_04; + /* 0x10 */ Vec3f unk_10; + /* 0x1C */ Vec3f unk_1C; + /* 0x28 */ UNK_TYPE1 unk_28[0x4]; + /* 0x2C */ s16 unk_2C; + /* 0x2E */ s16 unk_2E; + /* 0x30 */ f32 unk_30; + /* 0x34 */ f32 unk_34; + /* 0x38 */ u8 unk_38; +} EnFzStruct; // size = 0x3C + typedef struct EnFz { /* 0x000 */ Actor actor; - /* 0x144 */ char unk_144[0xA98]; -} EnFz; // size = 0xBDC + /* 0x144 */ EnFzActionFunc actionFunc; + /* 0x148 */ ColliderCylinder collider1; + /* 0x194 */ ColliderCylinder collider2; + /* 0x1E0 */ ColliderCylinder collider3; + /* 0x22C */ Vec3f unk_22C; + /* 0x238 */ f32 unk_238; + /* 0x23C */ EnFzStruct unk_23C[40]; + /* 0xB9C */ f32 unk_B9C; + /* 0xBA0 */ f32 unk_BA0; + /* 0xBA4 */ s16 unk_BA4; + /* 0xBA8 */ f32 unk_BA8; + /* 0xBAC */ f32 unk_BAC; + /* 0xBB0 */ f32 unk_BB0; + /* 0xBB4 */ f32 unk_BB4; + /* 0xBB8 */ f32 unk_BB8; + /* 0xBBC */ f32 unk_BBC; + /* 0xBC0 */ u32 unk_BC0; + /* 0xBC4 */ s16 unk_BC4; + /* 0xBC6 */ s16 unk_BC6; + /* 0xBC8 */ s16 unk_BC8; + /* 0xBCA */ s16 unk_BCA; + /* 0xBCC */ u8 unk_BCC; + /* 0xBCD */ u8 unk_BCD; + /* 0xBCE */ u8 unk_BCE; + /* 0xBCF */ u8 unk_BCF; + /* 0xBD0 */ s16 unk_BD0; + /* 0xBD2 */ s16 unk_BD2; + /* 0xBD4 */ UNK_TYPE1 unkBD4[2]; + /* 0xBD6 */ u8 unk_BD6; + /* 0xBD7 */ u8 unk_BD7; + /* 0xBD8 */ u8 unk_BD8; + /* 0xBD9 */ u8 unk_BD9; +} EnFz; /* size = 0xBDC */ extern const ActorInit En_Fz_InitVars; diff --git a/src/overlays/actors/ovl_En_Wiz/z_en_wiz.h b/src/overlays/actors/ovl_En_Wiz/z_en_wiz.h index 822ceadd9a..5bbf270296 100644 --- a/src/overlays/actors/ovl_En_Wiz/z_en_wiz.h +++ b/src/overlays/actors/ovl_En_Wiz/z_en_wiz.h @@ -11,7 +11,9 @@ typedef struct EnWiz { /* 0x0000 */ Actor actor; /* 0x0144 */ char unk_144[0x268]; /* 0x03AC */ EnWizActionFunc actionFunc; - /* 0x03B0 */ char unk_3B0[0x9D0]; + /* 0x03B0 */ char unk_3B0[0x98]; + /* 0x0448 */ s32 unk_448; + /* 0x044C */ char unk_44C[0x934]; } EnWiz; // size = 0xD80 extern const ActorInit En_Wiz_InitVars;