mirror of https://github.com/zeldaret/mm.git
parent
b567c4ee68
commit
f187471a33
3
spec
3
spec
|
@ -3500,8 +3500,7 @@ beginseg
|
|||
name "ovl_En_Fu_Mato"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Fu_Mato/z_en_fu_mato.o"
|
||||
include "build/data/ovl_En_Fu_Mato/ovl_En_Fu_Mato.data.o"
|
||||
include "build/data/ovl_En_Fu_Mato/ovl_En_Fu_Mato.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Fu_Mato/ovl_En_Fu_Mato_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
* Description: Honey & Darling
|
||||
*/
|
||||
|
||||
#include "z_en_fu.h"
|
||||
#include "overlays/actors/ovl_En_Fu_Mato/z_en_fu_mato.h"
|
||||
#include "overlays/actors/ovl_En_Fu_Kago/z_en_fu_kago.h"
|
||||
#include "overlays/actors/ovl_Bg_Fu_Mizu/z_bg_fu_mizu.h"
|
||||
#include "overlays/actors/ovl_Bg_Fu_Kaiten/z_bg_fu_kaiten.h"
|
||||
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
|
||||
#include "z_en_fu.h"
|
||||
#include "objects/object_mu/object_mu.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
*/
|
||||
|
||||
#include "z_en_fu_mato.h"
|
||||
#include "overlays/actors/ovl_En_Fu/z_en_fu.h"
|
||||
#include "objects/object_fu_mato/object_fu_mato.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20)
|
||||
|
||||
|
@ -15,7 +17,15 @@ void EnFuMato_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
|||
void EnFuMato_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnFuMato_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
#if 0
|
||||
void func_80ACE4B4(EnFuMato* this);
|
||||
void func_80ACE4C8(EnFuMato* this, GlobalContext* globalCtx);
|
||||
void func_80ACE508(EnFuMato* this);
|
||||
void func_80ACE51C(EnFuMato* this, GlobalContext* globalCtx);
|
||||
void func_80ACE718(EnFuMato* this, GlobalContext* globalCtx);
|
||||
void func_80ACECFC(EnFuMato* this, GlobalContext* globalCtx);
|
||||
void func_80ACEFC4(EnFuMato* this);
|
||||
void func_80ACEFD8(EnFuMato* this, GlobalContext* globalCtx);
|
||||
|
||||
const ActorInit En_Fu_Mato_InitVars = {
|
||||
ACTOR_EN_FU_MATO,
|
||||
ACTORCAT_BG,
|
||||
|
@ -28,52 +38,447 @@ const ActorInit En_Fu_Mato_InitVars = {
|
|||
(ActorFunc)EnFuMato_Draw,
|
||||
};
|
||||
|
||||
// static ColliderSphereInit sSphereInit = {
|
||||
static ColliderSphereInit D_80ACF610 = {
|
||||
{ COLTYPE_HIT3, AT_NONE, AC_ON | AC_TYPE_PLAYER, OC1_ON | OC1_TYPE_ALL, OC2_TYPE_1, COLSHAPE_SPHERE, },
|
||||
{ ELEMTYPE_UNK4, { 0xF7CFFFFF, 0x00, 0x00 }, { 0xF7CFFFFF, 0x00, 0x00 }, TOUCH_NONE | TOUCH_SFX_NORMAL, BUMP_ON, OCELEM_ON, },
|
||||
static ColliderSphereInit sSphereInit = {
|
||||
{
|
||||
COLTYPE_HIT3,
|
||||
AT_NONE,
|
||||
AC_ON | AC_TYPE_PLAYER,
|
||||
OC1_ON | OC1_TYPE_ALL,
|
||||
OC2_TYPE_1,
|
||||
COLSHAPE_SPHERE,
|
||||
},
|
||||
{
|
||||
ELEMTYPE_UNK4,
|
||||
{ 0xF7CFFFFF, 0x00, 0x00 },
|
||||
{ 0xF7CFFFFF, 0x00, 0x00 },
|
||||
TOUCH_NONE | TOUCH_SFX_NORMAL,
|
||||
BUMP_ON,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 0, { { 0, 0, 0 }, 200 }, 100 },
|
||||
};
|
||||
|
||||
#endif
|
||||
Gfx* D_80ACF63C[] = {
|
||||
object_fu_mato_DL_001C80, object_fu_mato_DL_001D68, object_fu_mato_DL_001E50,
|
||||
object_fu_mato_DL_001F38, object_fu_mato_DL_002020, object_fu_mato_DL_002108,
|
||||
};
|
||||
|
||||
extern ColliderSphereInit D_80ACF610;
|
||||
Vec2f D_80ACF654[] = {
|
||||
{ -1.0f, -1.73f }, { 1.0f, -1.73f }, { 2.0f, 0.0f }, { 1.0f, 1.73f }, { -1.0f, 1.73f }, { -2.0f, 0.0f },
|
||||
};
|
||||
|
||||
extern UNK_TYPE D_060023D4;
|
||||
extern UNK_TYPE D_06002720;
|
||||
void EnFuMato_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
EnFuMato* this = THIS;
|
||||
CollisionHeader* sp2C = NULL;
|
||||
Actor* actor = globalCtx->actorCtx.actorLists[ACTORCAT_NPC].first;
|
||||
EnFu* fu;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fu_Mato/EnFuMato_Init.s")
|
||||
DynaPolyActor_Init(&this->dyna, 3);
|
||||
CollisionHeader_GetVirtual(&object_fu_mato_Colheader_0023D4, &sp2C);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, sp2C);
|
||||
Actor_SetScale(&this->dyna.actor, 0.1f);
|
||||
Collider_InitSphere(globalCtx, &this->collider);
|
||||
Collider_SetSphere(globalCtx, &this->collider, &this->dyna.actor, &sSphereInit);
|
||||
this->collider.dim.worldSphere.radius = 20;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fu_Mato/EnFuMato_Destroy.s")
|
||||
while (actor != NULL) {
|
||||
if (actor->id == ACTOR_EN_FU) {
|
||||
this->dyna.actor.parent = actor;
|
||||
break;
|
||||
}
|
||||
actor = actor->next;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fu_Mato/func_80ACE4B4.s")
|
||||
if (actor == NULL) {
|
||||
Actor_MarkForDeath(&this->dyna.actor);
|
||||
return;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fu_Mato/func_80ACE4C8.s")
|
||||
fu = (EnFu*)this->dyna.actor.parent;
|
||||
if (fu->unk_542 == 2) {
|
||||
this->collider.info.elemType = ELEMTYPE_UNK0;
|
||||
this->collider.dim.worldSphere.radius = 30;
|
||||
} else {
|
||||
this->collider.dim.worldSphere.radius = 17;
|
||||
this->unk_2F8 = fu->unk_538;
|
||||
this->unk_2F4 = fu->unk_520;
|
||||
this->unk_2F0 = ENFUMATO_GET(&this->dyna.actor);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fu_Mato/func_80ACE508.s")
|
||||
this->unk_302 = 0;
|
||||
this->unk_304 = 0;
|
||||
func_80ACE4B4(this);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fu_Mato/func_80ACE51C.s")
|
||||
void EnFuMato_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnFuMato* this = THIS;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fu_Mato/func_80ACE680.s")
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
Collider_DestroySphere(globalCtx, &this->collider);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fu_Mato/func_80ACE718.s")
|
||||
void func_80ACE4B4(EnFuMato* this) {
|
||||
this->actionFunc = func_80ACE4C8;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fu_Mato/func_80ACE850.s")
|
||||
void func_80ACE4C8(EnFuMato* this, GlobalContext* globalCtx) {
|
||||
EnFu* fu = (EnFu*)this->dyna.actor.parent;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fu_Mato/func_80ACEB2C.s")
|
||||
if ((fu->unk_54A == 0) && (fu->unk_542 == 0)) {
|
||||
func_80ACE508(this);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fu_Mato/func_80ACECFC.s")
|
||||
void func_80ACE508(EnFuMato* this) {
|
||||
this->actionFunc = func_80ACE51C;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fu_Mato/func_80ACEFC4.s")
|
||||
void func_80ACE51C(EnFuMato* this, GlobalContext* globalCtx) {
|
||||
EnFu* fu = (EnFu*)this->dyna.actor.parent;
|
||||
Vec3f sp30;
|
||||
f32 sp2C;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fu_Mato/func_80ACEFD8.s")
|
||||
sp30.x = this->unk_2F8[this->unk_2F0].x;
|
||||
sp30.y = this->unk_2F8[this->unk_2F0].y;
|
||||
sp30.z = this->unk_2F8[this->unk_2F0].z;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fu_Mato/func_80ACF04C.s")
|
||||
sp2C = Math_Vec3f_DistXZ(&this->dyna.actor.world.pos, &sp30);
|
||||
this->dyna.actor.world.rot.y = Math_Vec3f_Yaw(&this->dyna.actor.world.pos, &sp30);
|
||||
this->dyna.actor.world.rot.x = Math_Vec3f_Pitch(&this->dyna.actor.world.pos, &sp30);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fu_Mato/EnFuMato_Update.s")
|
||||
if (sp2C < 10.0f) {
|
||||
if (this->unk_2F0 < (this->unk_2F4 - 1)) {
|
||||
this->unk_2F0++;
|
||||
} else {
|
||||
this->unk_2F0 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fu_Mato/func_80ACF1F4.s")
|
||||
this->dyna.actor.speedXZ = 2.0f;
|
||||
this->dyna.actor.shape.rot.y = Math_Vec3f_Yaw(&this->dyna.actor.world.pos, &this->dyna.actor.parent->world.pos);
|
||||
Actor_MoveWithGravity(&this->dyna.actor);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fu_Mato/func_80ACF3F4.s")
|
||||
if (fu->unk_54A != 0) {
|
||||
func_80ACE4B4(this);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fu_Mato/EnFuMato_Draw.s")
|
||||
void func_80ACE680(EnFuMato* this) {
|
||||
this->dyna.actor.gravity = -0.5f;
|
||||
this->dyna.actor.velocity.y = 1.0f;
|
||||
this->dyna.actor.velocity.x = 2.0f * Rand_Centered();
|
||||
this->dyna.actor.velocity.z = 2.0f * Rand_Centered();
|
||||
this->unk_2FC.x = Rand_Next() & 0xFFF;
|
||||
this->unk_2FC.y = Rand_Next() & 0xFFF;
|
||||
this->unk_2FC.z = Rand_Next() & 0xFFF;
|
||||
this->unk_302 = 3;
|
||||
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_WOODPLATE_BOUND);
|
||||
this->actionFunc = func_80ACE718;
|
||||
}
|
||||
|
||||
void func_80ACE718(EnFuMato* this, GlobalContext* globalCtx) {
|
||||
this->dyna.actor.shape.rot.x += this->unk_2FC.x;
|
||||
this->dyna.actor.shape.rot.y += this->unk_2FC.y;
|
||||
this->dyna.actor.shape.rot.z += this->unk_2FC.z;
|
||||
this->dyna.actor.velocity.y += this->dyna.actor.gravity;
|
||||
|
||||
Actor_UpdatePos(&this->dyna.actor);
|
||||
Actor_UpdateBgCheckInfo(globalCtx, &this->dyna.actor, 15.0f, 30.0f, 60.0f, 5);
|
||||
|
||||
if ((this->dyna.actor.bgCheckFlags & 1) || (this->dyna.actor.world.pos.y < -500.0f)) {
|
||||
Vec3f sp3C = { 0.0f, 0.0f, 0.0f };
|
||||
Vec3f sp30 = { 0.0f, 2.0f, 0.0f };
|
||||
|
||||
func_800B3030(globalCtx, &this->dyna.actor.world.pos, &sp3C, &sp30, 20, 40, 2);
|
||||
Actor_MarkForDeath(&this->dyna.actor);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80ACE850(EnFuMato* this, GlobalContext* globalCtx) {
|
||||
EnFuMatoStruct* ptr = this->unk_1B8;
|
||||
s16 temp_s4 = this->dyna.actor.shape.rot.y;
|
||||
s32 phi_s2;
|
||||
s32 i;
|
||||
|
||||
this->unk_308 = (u32)Rand_Next() % ARRAY_COUNT(this->unk_1B8);
|
||||
this->unk_302 = 1;
|
||||
this->dyna.actor.gravity = -1.0f;
|
||||
this->dyna.actor.velocity.y = Rand_ZeroOne();
|
||||
|
||||
phi_s2 = this->unk_308;
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
ptr->unk_00 = this->dyna.actor.world.pos;
|
||||
|
||||
ptr->unk_0C.x = Math_CosS(temp_s4) * D_80ACF654[phi_s2].x;
|
||||
ptr->unk_0C.y = D_80ACF654[phi_s2].z;
|
||||
ptr->unk_0C.z = -Math_SinS(temp_s4) * D_80ACF654[phi_s2].x;
|
||||
|
||||
ptr->unk_0C.x += Rand_Centered();
|
||||
ptr->unk_0C.y += Rand_ZeroOne() * 0.5f;
|
||||
ptr->unk_0C.z += Rand_Centered();
|
||||
|
||||
ptr->unk_18.x = 0.0f;
|
||||
ptr->unk_18.y = -1.0f;
|
||||
ptr->unk_18.z = 0.0f;
|
||||
|
||||
ptr->unk_00.x += 9.0f * ptr->unk_0C.x;
|
||||
ptr->unk_00.y += 9.0f * ptr->unk_0C.y;
|
||||
ptr->unk_00.z += 9.0f * ptr->unk_0C.z;
|
||||
|
||||
ptr->unk_24 = this->dyna.actor.shape.rot;
|
||||
|
||||
ptr->unk_2A.x = (s16)Rand_Next() >> 6;
|
||||
ptr->unk_2A.y = (s16)Rand_Next() >> 6;
|
||||
ptr->unk_2A.z = (s16)Rand_Next() >> 6;
|
||||
ptr->unk_30 = 1;
|
||||
|
||||
phi_s2 = (phi_s2 + 3) % ARRAY_COUNT(this->unk_1B8);
|
||||
ptr++;
|
||||
}
|
||||
|
||||
this->dyna.actor.freezeTimer = 2;
|
||||
EffectSsHahen_SpawnBurst(globalCtx, &this->dyna.actor.world.pos, 13.0f, 0, 7, 8, 20, -1, 10, NULL);
|
||||
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_WOODPLATE_BROKEN);
|
||||
this->actionFunc = func_80ACECFC;
|
||||
}
|
||||
|
||||
void func_80ACEB2C(EnFuMato* this) {
|
||||
EnFuMatoStruct sp18[2];
|
||||
s32 phi_v0 = this->unk_308;
|
||||
s32 i;
|
||||
s32 phi_v1;
|
||||
s32 phi_a1;
|
||||
|
||||
sp18[0] = this->unk_1B8[0];
|
||||
sp18[1] = this->unk_1B8[1];
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sp18); i++) {
|
||||
if (phi_v0 == 0) {
|
||||
phi_v1 = 5;
|
||||
} else {
|
||||
phi_v1 = phi_v0 - 1;
|
||||
}
|
||||
|
||||
if (phi_v0 == 5) {
|
||||
phi_a1 = 0;
|
||||
} else {
|
||||
phi_a1 = phi_v0 + 1;
|
||||
}
|
||||
|
||||
this->unk_1B8[phi_v0] = sp18[i];
|
||||
this->unk_1B8[phi_v1] = sp18[i];
|
||||
this->unk_1B8[phi_a1] = sp18[i];
|
||||
|
||||
phi_v0 = (phi_v0 + 3) % ARRAY_COUNT(this->unk_1B8);
|
||||
}
|
||||
|
||||
this->unk_302 = 2;
|
||||
this->actionFunc = func_80ACECFC;
|
||||
}
|
||||
|
||||
void func_80ACECFC(EnFuMato* this, GlobalContext* globalCtx) {
|
||||
EnFuMatoStruct* ptr = this->unk_1B8;
|
||||
s32 phi_s3;
|
||||
s32 i;
|
||||
|
||||
this->dyna.actor.velocity.y += this->dyna.actor.gravity;
|
||||
Actor_UpdatePos(&this->dyna.actor);
|
||||
|
||||
if (this->dyna.actor.world.pos.y < -500.0f) {
|
||||
this->dyna.actor.world.pos.y = -500.0f;
|
||||
}
|
||||
|
||||
if (this->unk_302 == 1) {
|
||||
phi_s3 = 2;
|
||||
} else {
|
||||
phi_s3 = ARRAY_COUNT(this->unk_1B8);
|
||||
}
|
||||
|
||||
for (i = 0; i < phi_s3; i++, ptr++) {
|
||||
ptr->unk_00.x += ptr->unk_0C.x;
|
||||
ptr->unk_00.y += ptr->unk_0C.y;
|
||||
ptr->unk_00.z += ptr->unk_0C.z;
|
||||
|
||||
ptr->unk_0C.x += ptr->unk_18.x;
|
||||
ptr->unk_0C.y += ptr->unk_18.y;
|
||||
ptr->unk_0C.z += ptr->unk_18.z;
|
||||
|
||||
ptr->unk_24.x += ptr->unk_2A.x;
|
||||
ptr->unk_24.y += ptr->unk_2A.y;
|
||||
ptr->unk_24.z += ptr->unk_2A.z;
|
||||
|
||||
if ((this->unk_302 == 2) && (ptr->unk_30 == 1) && (ptr->unk_00.y < (this->dyna.actor.floorHeight + 10.0f))) {
|
||||
if (ptr->unk_0C.y < 0.0f) {
|
||||
ptr->unk_0C.y = -ptr->unk_0C.y;
|
||||
} else {
|
||||
ptr->unk_0C.y = ptr->unk_0C.y;
|
||||
}
|
||||
ptr->unk_0C.y *= 0.5f;
|
||||
ptr->unk_0C.x *= (Rand_Centered() * 1.5f) + 2.0f;
|
||||
ptr->unk_0C.z *= (Rand_Centered() * 1.5f) + 2.0f;
|
||||
|
||||
ptr->unk_2A.x = (s16)Rand_Next() >> 5;
|
||||
ptr->unk_2A.y = (s16)Rand_Next() >> 5;
|
||||
ptr->unk_2A.z = (s16)Rand_Next() >> 5;
|
||||
|
||||
ptr->unk_30 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->unk_302 == 1) {
|
||||
Actor_UpdateBgCheckInfo(globalCtx, &this->dyna.actor, 15.0f, 30.0f, 60.0f, 5);
|
||||
if (this->dyna.actor.bgCheckFlags & 1) {
|
||||
func_80ACEB2C(this);
|
||||
}
|
||||
}
|
||||
|
||||
if (this->unk_304 < 60) {
|
||||
this->unk_304++;
|
||||
} else {
|
||||
func_80ACEFC4(this);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80ACEFC4(EnFuMato* this) {
|
||||
this->actionFunc = func_80ACEFD8;
|
||||
}
|
||||
|
||||
void func_80ACEFD8(EnFuMato* this, GlobalContext* globalCtx) {
|
||||
Vec3f* scale = &this->dyna.actor.scale;
|
||||
|
||||
Math_SmoothStepToF(&scale->x, 0.0f, 0.1f, 0.005f, 0.005f);
|
||||
scale->y = scale->z = scale->x;
|
||||
if (scale->x == 0.0f) {
|
||||
Actor_MarkForDeath(&this->dyna.actor);
|
||||
}
|
||||
}
|
||||
|
||||
s32 func_80ACF04C(EnFuMato* this, GlobalContext* globalCtx) {
|
||||
EnFu* fu = (EnFu*)this->dyna.actor.parent;
|
||||
|
||||
this->collider.dim.worldSphere.center.x = this->dyna.actor.world.pos.x;
|
||||
this->collider.dim.worldSphere.center.y = this->dyna.actor.world.pos.y;
|
||||
this->collider.dim.worldSphere.center.z = this->dyna.actor.world.pos.z;
|
||||
|
||||
if ((this->unk_302 == 0) && (((fu->unk_542 == 0) && (this->collider.base.acFlags & AC_HIT)) ||
|
||||
((fu->unk_542 == 2) && (this->collider.base.ocFlags1 & OC1_HIT)))) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
this->collider.base.ocFlags1 &= ~OC1_HIT;
|
||||
|
||||
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_SY_TRE_BOX_APPEAR);
|
||||
|
||||
fu->unk_548++;
|
||||
if ((fu->unk_542 == 2) || (gSaveContext.save.playerForm == PLAYER_FORM_DEKU)) {
|
||||
fu->unk_546 = 1;
|
||||
func_80ACE680(this);
|
||||
} else {
|
||||
func_80ACE850(this, globalCtx);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
|
||||
return false;
|
||||
}
|
||||
|
||||
void EnFuMato_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnFuMato* this = THIS;
|
||||
|
||||
this->actionFunc(this, globalCtx);
|
||||
|
||||
func_80ACF04C(this, globalCtx);
|
||||
|
||||
if (this->unk_30A == 1) {
|
||||
func_80ACEFC4(this);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80ACF1F4(EnFuMato* this, GlobalContext* globalCtx) {
|
||||
EnFuMatoStruct* ptr = this->unk_1B8;
|
||||
s32 temp_s4 = this->unk_308;
|
||||
s32 i;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
Matrix_StatePush();
|
||||
Matrix_SetStateRotationAndTranslation(ptr->unk_00.x, ptr->unk_00.y, ptr->unk_00.z, &ptr->unk_24);
|
||||
Matrix_Scale(0.1f, 0.1f, 0.1f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, D_80ACF63C[temp_s4]);
|
||||
|
||||
switch (temp_s4) {
|
||||
case 0:
|
||||
gSPDisplayList(POLY_OPA_DISP++, D_80ACF63C[5]);
|
||||
gSPDisplayList(POLY_OPA_DISP++, D_80ACF63C[temp_s4 + 1]);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
gSPDisplayList(POLY_OPA_DISP++, D_80ACF63C[temp_s4 - 1]);
|
||||
gSPDisplayList(POLY_OPA_DISP++, D_80ACF63C[0]);
|
||||
break;
|
||||
|
||||
default:
|
||||
gSPDisplayList(POLY_OPA_DISP++, D_80ACF63C[temp_s4 - 1]);
|
||||
gSPDisplayList(POLY_OPA_DISP++, D_80ACF63C[temp_s4 + 1]);
|
||||
break;
|
||||
}
|
||||
|
||||
Matrix_StatePop();
|
||||
|
||||
temp_s4 = (temp_s4 + 3) % ARRAY_COUNT(this->unk_1B8);
|
||||
ptr++;
|
||||
}
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
|
||||
void func_80ACF3F4(EnFuMato* this, GlobalContext* globalCtx) {
|
||||
EnFuMatoStruct* ptr = this->unk_1B8;
|
||||
Vec3f* scale = &this->dyna.actor.scale;
|
||||
s32 i;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(D_80ACF63C); i++, ptr++) {
|
||||
Matrix_StatePush();
|
||||
Matrix_SetStateRotationAndTranslation(ptr->unk_00.x, ptr->unk_00.y, ptr->unk_00.z, &ptr->unk_24);
|
||||
Matrix_Scale(scale->x, scale->y, scale->z, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, D_80ACF63C[i]);
|
||||
|
||||
Matrix_StatePop();
|
||||
}
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
|
||||
void EnFuMato_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
EnFuMato* this = THIS;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
if ((this->unk_302 == 0) || (this->unk_302 == 3)) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_fu_mato_DL_002720);
|
||||
} else if (this->unk_302 == 1) {
|
||||
func_80ACF1F4(this, globalCtx);
|
||||
} else {
|
||||
func_80ACF3F4(this, globalCtx);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
|
|
|
@ -7,11 +7,30 @@ struct EnFuMato;
|
|||
|
||||
typedef void (*EnFuMatoActionFunc)(struct EnFuMato*, GlobalContext*);
|
||||
|
||||
#define ENFUMATO_GET(thisx) ((thisx)->params)
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f unk_00;
|
||||
/* 0x0C */ Vec3f unk_0C;
|
||||
/* 0x18 */ Vec3f unk_18;
|
||||
/* 0x24 */ Vec3s unk_24;
|
||||
/* 0x2A */ Vec3s unk_2A;
|
||||
/* 0x30 */ s16 unk_30;
|
||||
} EnFuMatoStruct; // size = 0x34
|
||||
|
||||
typedef struct EnFuMato {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x0144 */ char unk_144[0x18];
|
||||
/* 0x0000 */ DynaPolyActor dyna;
|
||||
/* 0x015C */ EnFuMatoActionFunc actionFunc;
|
||||
/* 0x0160 */ char unk_160[0x1AA];
|
||||
/* 0x0160 */ ColliderSphere collider;
|
||||
/* 0x01B8 */ EnFuMatoStruct unk_1B8[6];
|
||||
/* 0x02F0 */ s32 unk_2F0;
|
||||
/* 0x02F4 */ s32 unk_2F4;
|
||||
/* 0x02F8 */ Vec3s* unk_2F8;
|
||||
/* 0x02FC */ Vec3s unk_2FC;
|
||||
/* 0x0302 */ s16 unk_302;
|
||||
/* 0x0304 */ s16 unk_304;
|
||||
/* 0x0306 */ UNK_TYPE1 unk306[2];
|
||||
/* 0x0308 */ s16 unk_308;
|
||||
/* 0x030A */ s16 unk_30A;
|
||||
} EnFuMato; // size = 0x30C
|
||||
|
||||
|
|
|
@ -1236,11 +1236,6 @@ D_0600007C = 0x0600007C;
|
|||
D_0600CFE0 = 0x0600CFE0;
|
||||
D_06011058 = 0x06011058;
|
||||
|
||||
// ovl_En_Fu_Mato
|
||||
|
||||
D_060023D4 = 0x060023D4;
|
||||
D_06002720 = 0x06002720;
|
||||
|
||||
// ovl_En_Ge1
|
||||
|
||||
D_06002B98 = 0x06002B98;
|
||||
|
|
Loading…
Reference in New Issue