mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-06 06:10:21 +00:00
En_Ba OK (#700)
* init done * Everything done except for draw * matching * Tidied for pr * merge master into en_ba * run format.sh * fixing merge mistakes * how many different ways can I screw up a merge challenge * some pr comments
This commit is contained in:
parent
2c56a6e99a
commit
56e94e1e34
26 changed files with 516 additions and 2145 deletions
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* File: z_bg_jya_ironobj.c
|
||||
* Overlay: ovl_Bg_Jya_Ironobj
|
||||
* Description: Destructable Iron Knuckle objects
|
||||
* Description: Destructable Iron Knuckle objects
|
||||
*/
|
||||
|
||||
#include "z_bg_jya_ironobj.h"
|
||||
|
@ -118,8 +118,8 @@ void BgJyaIronobj_SpawnPillarParticles(BgJyaIronobj* this, GlobalContext* global
|
|||
for (i = 0; i < 8; i++) {
|
||||
Actor* actor =
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_BG_JYA_HAHENIRON, this->dyna.actor.world.pos.x,
|
||||
Rand_ZeroOne() * 80.0f + this->dyna.actor.world.pos.y + 20.0f, this->dyna.actor.world.pos.z,
|
||||
0, (s16)(Rand_ZeroOne() * 0x4000) + rotY - 0x2000, 0, 0);
|
||||
Rand_ZeroOne() * 80.0f + this->dyna.actor.world.pos.y + 20.0f, this->dyna.actor.world.pos.z, 0,
|
||||
(s16)(Rand_ZeroOne() * 0x4000) + rotY - 0x2000, 0, 0);
|
||||
if (actor != NULL) {
|
||||
actor->speedXZ = Rand_ZeroOne() * 8.0f + 9.0f;
|
||||
actor->velocity.y = Rand_ZeroOne() * 10.0f + 6.0f;
|
||||
|
@ -147,8 +147,8 @@ void BgJyaIronobj_SpawnPillarParticles(BgJyaIronobj* this, GlobalContext* global
|
|||
vel.x = 2.0f * ((Rand_ZeroOne() * 6.0f) - 3.0f) + (Rand_ZeroOne() * sins * 8.0f * temp_f22);
|
||||
vel.y = (Rand_ZeroOne() * 8.0f) - 3.0f;
|
||||
vel.z = 2.0f * ((Rand_ZeroOne() * 6.0f) - 3.0f) + (Rand_ZeroOne() * coss * 8.0f * temp_f22);
|
||||
EffectSsKakera_Spawn(globalCtx, &pos, &vel, &pos, -350, unkArg5, D_80899500[j & 7], 4, 0,
|
||||
D_808994E0[j & 7], 0, 5, D_808994F0[j & 7], -1, OBJECT_JYA_IRON, gObjectJyaIronDL_000880);
|
||||
EffectSsKakera_Spawn(globalCtx, &pos, &vel, &pos, -350, unkArg5, D_80899500[j & 7], 4, 0, D_808994E0[j & 7], 0,
|
||||
5, D_808994F0[j & 7], -1, OBJECT_JYA_IRON, gObjectJyaIronDL_000880);
|
||||
if (Rand_ZeroOne() < 0.26f) {
|
||||
func_80033480(globalCtx, &pos, 200.0f, 1, D_808994E0[j & 7] * 4 + 60, D_808994E0[j & 7] * 4 + 80, 1);
|
||||
}
|
||||
|
@ -205,8 +205,8 @@ void BgJyaIronobj_SpawnThoneParticles(BgJyaIronobj* this, GlobalContext* arg1, E
|
|||
vel.x = 2.0f * (Rand_ZeroOne() * 6.0f - 3.0f) + (Rand_ZeroOne() * sins * 8.0f * temp_f22);
|
||||
vel.y = Rand_ZeroOne() * 8.0f - 3.0f;
|
||||
vel.z = 2.0f * (Rand_ZeroOne() * 6.0f - 3.0f) + (Rand_ZeroOne() * coss * 8.0f * temp_f22);
|
||||
EffectSsKakera_Spawn(arg1, &pos, &vel, &pos, -350, unkArg5, D_80899530[j & 7], 4, 0, D_80899510[j & 7], 0,
|
||||
5, D_80899520[j & 7], -1, OBJECT_JYA_IRON, gObjectJyaIronDL_000880);
|
||||
EffectSsKakera_Spawn(arg1, &pos, &vel, &pos, -350, unkArg5, D_80899530[j & 7], 4, 0, D_80899510[j & 7], 0, 5,
|
||||
D_80899520[j & 7], -1, OBJECT_JYA_IRON, gObjectJyaIronDL_000880);
|
||||
if (Rand_ZeroOne() < 0.26f) {
|
||||
func_80033480(arg1, &pos, 200.0f, 1, D_80899510[j & 7] * 4 + 60, D_80899510[j & 7] * 4 + 80, 1);
|
||||
}
|
||||
|
|
|
@ -15,10 +15,18 @@ void EnBa_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
|||
void EnBa_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnBa_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
extern UNK_TYPE D_06000890;
|
||||
extern UNK_TYPE D_06001D80;
|
||||
void EnBa_SetupIdle(EnBa* this);
|
||||
void EnBa_SetupFallAsBlob(EnBa* this);
|
||||
void EnBa_Idle(EnBa* this, GlobalContext* globalCtx);
|
||||
void EnBa_FallAsBlob(EnBa* this, GlobalContext* globalCtx);
|
||||
void EnBa_SwingAtPlayer(EnBa* this, GlobalContext* globalCtx);
|
||||
void EnBa_RecoilFromDamage(EnBa* this, GlobalContext* globalCtx);
|
||||
void EnBa_Die(EnBa* this, GlobalContext* globalCtx);
|
||||
void EnBa_SetupSwingAtPlayer(EnBa* this);
|
||||
|
||||
extern Gfx D_06000890[];
|
||||
extern Gfx D_06001D80[];
|
||||
|
||||
/*
|
||||
const ActorInit En_Ba_InitVars = {
|
||||
ACTOR_EN_BA,
|
||||
ACTORCAT_ENEMY,
|
||||
|
@ -31,7 +39,9 @@ const ActorInit En_Ba_InitVars = {
|
|||
(ActorFunc)EnBa_Draw,
|
||||
};
|
||||
|
||||
static ColliderJntSphElementInit D_809B808C[2] = {
|
||||
static Vec3f D_809B8080 = { 0.0f, 0.0f, 32.0f };
|
||||
|
||||
static ColliderJntSphElementInit sJntSphElementInit[2] = {
|
||||
{
|
||||
{
|
||||
ELEMTYPE_UNK0,
|
||||
|
@ -56,7 +66,7 @@ static ColliderJntSphElementInit D_809B808C[2] = {
|
|||
},
|
||||
};
|
||||
|
||||
static ColliderJntSphInit D_809B80D4 = {
|
||||
static ColliderJntSphInit sJntSphInit = {
|
||||
{
|
||||
COLTYPE_HIT0,
|
||||
AT_ON | AT_TYPE_ENEMY,
|
||||
|
@ -66,35 +76,448 @@ static ColliderJntSphInit D_809B80D4 = {
|
|||
COLSHAPE_JNTSPH,
|
||||
},
|
||||
2,
|
||||
D_809B808C,
|
||||
sJntSphElementInit,
|
||||
};
|
||||
*/
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ba/func_809B6350.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ba/EnBa_Init.s")
|
||||
void EnBa_SetupAction(EnBa* this, EnBaActionFunc actionFunc) {
|
||||
this->actionFunc = actionFunc;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ba/EnBa_Destroy.s")
|
||||
static Vec3f D_809B80E4 = { 0.01f, 0.01f, 0.01f };
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ba/func_809B6568.s")
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_S8(naviEnemyId, 21, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(uncullZoneScale, 1500, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(uncullZoneDownward, 2500, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(targetArrowOffset, 0, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ba/func_809B65A8.s")
|
||||
void EnBa_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnBa* this = THIS;
|
||||
Vec3f sp38 = D_809B80E4;
|
||||
s32 pad;
|
||||
s16 i;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ba/func_809B69D4.s")
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
this->actor.world.pos.y = this->actor.home.pos.y + 100.0f;
|
||||
for (i = 13; i >= 0; i--) {
|
||||
this->unk200[i] = sp38;
|
||||
this->unk2A8[i].x = -0x4000;
|
||||
this->unk158[i] = this->actor.world.pos;
|
||||
this->unk158[i].y = this->actor.world.pos.y - (i + 1) * 32.0f;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ba/func_809B6A44.s")
|
||||
this->actor.targetMode = 4;
|
||||
this->upperParams = (thisx->params >> 8) & 0xFF;
|
||||
thisx->params &= 0xFF;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ba/func_809B6B04.s")
|
||||
if (this->actor.params < EN_BA_DEAD_BLOB) {
|
||||
if (Flags_GetSwitch(globalCtx, this->upperParams)) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 48.0f);
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
EnBa_SetupIdle(this);
|
||||
this->actor.colChkInfo.health = 4;
|
||||
this->actor.colChkInfo.mass = MASS_HEAVY;
|
||||
Collider_InitJntSph(globalCtx, &this->collider);
|
||||
Collider_SetJntSph(globalCtx, &this->collider, &this->actor, &sJntSphInit, this->colliderItems);
|
||||
} else {
|
||||
Actor_SetScale(&this->actor, 0.021f);
|
||||
EnBa_SetupFallAsBlob(this);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ba/func_809B6B58.s")
|
||||
void EnBa_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnBa* this = THIS;
|
||||
Collider_DestroyJntSph(globalCtx, &this->collider);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ba/func_809B7174.s")
|
||||
void EnBa_SetupIdle(EnBa* this) {
|
||||
this->unk14C = 2;
|
||||
this->unk31C = 1500;
|
||||
this->actor.speedXZ = 10.0f;
|
||||
EnBa_SetupAction(this, EnBa_Idle);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ba/func_809B71F0.s")
|
||||
void EnBa_Idle(EnBa* this, GlobalContext* globalCtx) {
|
||||
Player* player = PLAYER;
|
||||
s32 i;
|
||||
s32 pad;
|
||||
Vec3s sp5C;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ba/func_809B75A0.s")
|
||||
if ((this->actor.colChkInfo.mass == MASS_IMMOVABLE) && (this->actor.xzDistToPlayer > 175.0f)) {
|
||||
Math_SmoothStepToF(&this->actor.world.pos.y, this->actor.home.pos.y + 330.0f, 1.0f, 7.0f, 0.0f);
|
||||
} else {
|
||||
this->actor.flags |= 1;
|
||||
Math_SmoothStepToF(&this->actor.world.pos.y, this->actor.home.pos.y + 100.0f, 1.0f, 10.0f, 0.0f);
|
||||
}
|
||||
this->unk2FC = this->actor.world.pos;
|
||||
if (globalCtx->gameplayFrames % 16 == 0) {
|
||||
this->unk308.z += Rand_CenteredFloat(180.0f);
|
||||
this->unk314 += Rand_CenteredFloat(180.0f);
|
||||
this->unk308.x = Math_SinF(this->unk308.z) * 80.0f;
|
||||
this->unk308.y = Math_CosF(this->unk314) * 80.0f;
|
||||
}
|
||||
this->unk2FC.y -= 448.0f;
|
||||
this->unk2FC.x += this->unk308.x;
|
||||
this->unk2FC.z += this->unk308.y;
|
||||
func_80033AEC(&this->unk2FC, &this->unk158[13], 1.0f, this->actor.speedXZ, 0.0f, 0.0f);
|
||||
for (i = 12; i >= 0; i--) {
|
||||
func_80035844(&this->unk158[i + 1], &this->unk158[i], &sp5C, 0);
|
||||
Matrix_Translate(this->unk158[i + 1].x, this->unk158[i + 1].y, this->unk158[i + 1].z, MTXMODE_NEW);
|
||||
Matrix_RotateRPY(sp5C.x, sp5C.y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_809B8080, &this->unk158[i]);
|
||||
}
|
||||
func_80035844(&this->unk158[0], &this->unk2FC, &sp5C, 0);
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->unk2A8[0].y, 3, this->unk31C, 182);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.x, this->unk2A8[0].x, 3, this->unk31C, 182);
|
||||
Matrix_RotateRPY(this->actor.shape.rot.x - 0x8000, this->actor.shape.rot.y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_809B8080, &this->unk158[0]);
|
||||
this->unk2A8[13].y = sp5C.y;
|
||||
this->unk2A8[13].x = sp5C.x + 0x8000;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ba/func_809B781C.s")
|
||||
for (i = 0; i < 13; i++) {
|
||||
Matrix_Translate(this->unk158[i].x, this->unk158[i].y, this->unk158[i].z, MTXMODE_NEW);
|
||||
Math_SmoothStepToS(&this->unk2A8[i].y, this->unk2A8[i + 1].y, 3, this->unk31C, 182);
|
||||
Math_SmoothStepToS(&this->unk2A8[i].x, this->unk2A8[i + 1].x, 3, this->unk31C, 182);
|
||||
Matrix_RotateRPY(this->unk2A8[i].x - 0x8000, this->unk2A8[i].y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_809B8080, &this->unk158[i + 1]);
|
||||
}
|
||||
this->unk2A8[13].x = this->unk2A8[12].x;
|
||||
this->unk2A8[13].y = this->unk2A8[12].y;
|
||||
if (!(player->stateFlags1 & 0x4000000) && (this->actor.xzDistToPlayer <= 175.0f) &&
|
||||
(this->actor.world.pos.y == this->actor.home.pos.y + 100.0f)) {
|
||||
EnBa_SetupSwingAtPlayer(this);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ba/EnBa_Update.s")
|
||||
void EnBa_SetupFallAsBlob(EnBa* this) {
|
||||
this->unk14C = 0;
|
||||
this->actor.speedXZ = Rand_CenteredFloat(8.0f);
|
||||
this->actor.world.rot.y = Rand_CenteredFloat(65535.0f);
|
||||
this->unk318 = 20;
|
||||
this->actor.gravity = -2.0f;
|
||||
EnBa_SetupAction(this, EnBa_FallAsBlob);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ba/EnBa_Draw.s")
|
||||
/**
|
||||
* Action function of the pink fleshy blobs that spawn and fall to the floor when a tentacle dies
|
||||
*/
|
||||
void EnBa_FallAsBlob(EnBa* this, GlobalContext* globalCtx) {
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
this->actor.scale.y -= 0.001f;
|
||||
this->actor.scale.x += 0.0005f;
|
||||
this->actor.scale.z += 0.0005f;
|
||||
this->unk318--;
|
||||
if (this->unk318 == 0) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
} else {
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 30.0f, 28.0f, 80.0f, 5);
|
||||
}
|
||||
}
|
||||
|
||||
void EnBa_SetupSwingAtPlayer(EnBa* this) {
|
||||
this->unk14C = 3;
|
||||
this->unk318 = 20;
|
||||
this->unk31A = 0;
|
||||
this->unk31C = 1500;
|
||||
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
|
||||
this->actor.speedXZ = 20.0f;
|
||||
EnBa_SetupAction(this, EnBa_SwingAtPlayer);
|
||||
}
|
||||
|
||||
void EnBa_SwingAtPlayer(EnBa* this, GlobalContext* globalCtx) {
|
||||
Player* player = PLAYER;
|
||||
s16 temp;
|
||||
s16 i;
|
||||
Vec3s sp58;
|
||||
s16 phi_fp;
|
||||
|
||||
Math_SmoothStepToF(&this->actor.world.pos.y, this->actor.home.pos.y + 60.0f, 1.0f, 10.0f, 0.0f);
|
||||
if ((this->actor.xzDistToPlayer <= 175.0f) || (this->unk31A != 0)) {
|
||||
if (this->unk318 == 20) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_BALINADE_HAND_UP);
|
||||
this->unk31C = 1500;
|
||||
}
|
||||
if (this->unk318 != 0) {
|
||||
this->unk31A = 10;
|
||||
this->unk318--;
|
||||
if (this->unk318 >= 11) {
|
||||
this->unk2FC = player->actor.world.pos;
|
||||
this->unk2FC.y += 30.0f;
|
||||
phi_fp = this->actor.yawTowardsPlayer;
|
||||
} else {
|
||||
phi_fp = Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk2FC);
|
||||
}
|
||||
Math_SmoothStepToS(&this->unk31C, 1500, 1, 30, 0);
|
||||
func_80035844(&this->actor.world.pos, &this->unk158[0], &sp58, 0);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, sp58.y, 1, this->unk31C, 0);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.x, (sp58.x + 0x8000), 1, this->unk31C, 0);
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateRPY((this->actor.shape.rot.x - 0x8000), this->actor.shape.rot.y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_809B8080, &this->unk158[0]);
|
||||
|
||||
for (i = 0; i < 13; i++) {
|
||||
Math_SmoothStepToS(&this->unk2A8[i].x, (i * 1200) - 0x4000, 1, this->unk31C, 0);
|
||||
Math_SmoothStepToS(&this->unk2A8[i].y, phi_fp, 1, this->unk31C, 0);
|
||||
Matrix_Translate(this->unk158[i].x, this->unk158[i].y, this->unk158[i].z, MTXMODE_NEW);
|
||||
Matrix_RotateRPY((this->unk2A8[i].x - 0x8000), this->unk2A8[i].y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_809B8080, &this->unk158[i + 1]);
|
||||
}
|
||||
} else {
|
||||
if (this->unk31A == 10) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_BALINADE_HAND_DOWN);
|
||||
}
|
||||
if (this->unk31A != 0) {
|
||||
this->unk31C = 8000;
|
||||
this->actor.speedXZ = 30.0f;
|
||||
phi_fp = Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk2FC);
|
||||
temp = Math_Vec3f_Pitch(&this->actor.world.pos, &this->unk158[0]) + 0x8000;
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, phi_fp, 1, this->unk31C, 0);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.x, temp, 1, this->unk31C, 0);
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_RotateRPY(this->actor.shape.rot.x - 0x8000, this->actor.shape.rot.y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_809B8080, this->unk158);
|
||||
|
||||
for (i = 0; i < 13; i++) {
|
||||
temp = -Math_CosS(this->unk31A * 0xCCC) * (i * 1200);
|
||||
Math_SmoothStepToS(&this->unk2A8[i].x, temp - 0x4000, 1, this->unk31C, 0);
|
||||
Math_SmoothStepToS(&this->unk2A8[i].y, phi_fp, 1, this->unk31C, 0);
|
||||
Matrix_Translate(this->unk158[i].x, this->unk158[i].y, this->unk158[i].z, MTXMODE_NEW);
|
||||
Matrix_RotateRPY(this->unk2A8[i].x - 0x8000, this->unk2A8[i].y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_809B8080, &this->unk158[i + 1]);
|
||||
}
|
||||
this->unk31A--;
|
||||
} else if ((this->actor.xzDistToPlayer > 175.0f) || (player->stateFlags1 & 0x4000000)) {
|
||||
EnBa_SetupIdle(this);
|
||||
} else {
|
||||
EnBa_SetupSwingAtPlayer(this);
|
||||
this->unk318 = 27;
|
||||
this->unk31C = 750;
|
||||
}
|
||||
}
|
||||
this->unk2A8[13].x = this->unk2A8[12].x;
|
||||
this->unk2A8[13].y = this->unk2A8[12].y;
|
||||
if (this->collider.base.atFlags & 2) {
|
||||
this->collider.base.atFlags &= ~2;
|
||||
if (this->collider.base.at == &player->actor) {
|
||||
func_8002F71C(globalCtx, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f);
|
||||
}
|
||||
}
|
||||
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
|
||||
return;
|
||||
}
|
||||
if ((this->actor.xzDistToPlayer > 175.0f) || (player->stateFlags1 & 0x4000000)) {
|
||||
EnBa_SetupIdle(this);
|
||||
} else {
|
||||
EnBa_SetupSwingAtPlayer(this);
|
||||
this->unk318 = 27;
|
||||
this->unk31C = 750;
|
||||
}
|
||||
}
|
||||
|
||||
void func_809B7174(EnBa* this) {
|
||||
this->unk14C = 1;
|
||||
this->unk31C = 1500;
|
||||
this->unk318 = 20;
|
||||
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
|
||||
this->actor.speedXZ = 10.0f;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_BALINADE_HAND_DAMAGE);
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 12);
|
||||
EnBa_SetupAction(this, EnBa_RecoilFromDamage);
|
||||
}
|
||||
|
||||
void EnBa_RecoilFromDamage(EnBa* this, GlobalContext* globalCtx) {
|
||||
s32 i;
|
||||
Vec3s sp6C;
|
||||
|
||||
Math_SmoothStepToF(&this->actor.world.pos.y, this->actor.home.pos.y + 330.0f, 1.0f, 30.0f, 0.0f);
|
||||
this->unk2FC = this->actor.world.pos;
|
||||
if (globalCtx->gameplayFrames % 16 == 0) {
|
||||
this->unk308.z += Rand_CenteredFloat(180.0f);
|
||||
this->unk314 += Rand_CenteredFloat(180.0f);
|
||||
this->unk308.x = Math_SinF(this->unk308.z) * 80.0f;
|
||||
this->unk308.y = Math_CosF(this->unk314) * 80.0f;
|
||||
}
|
||||
this->unk2FC.y -= 448.0f;
|
||||
this->unk2FC.x += this->unk308.x;
|
||||
this->unk2FC.z += this->unk308.y;
|
||||
func_80033AEC(&this->unk2FC, &this->unk158[13], 1.0f, this->actor.speedXZ, 0.0f, 0.0f);
|
||||
for (i = 12; i >= 0; i--) {
|
||||
func_80035844(&this->unk158[i + 1], &this->unk158[i], &sp6C, 0);
|
||||
Matrix_Translate(this->unk158[i + 1].x, this->unk158[i + 1].y, this->unk158[i + 1].z, MTXMODE_NEW);
|
||||
Matrix_RotateRPY(sp6C.x, sp6C.y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_809B8080, &this->unk158[i]);
|
||||
}
|
||||
func_80035844(&this->actor.world.pos, &this->unk158[0], &sp6C, 0);
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, sp6C.y, 3, this->unk31C, 182);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.x, sp6C.x + 0x8000, 3, this->unk31C, 182);
|
||||
Matrix_RotateRPY(this->actor.shape.rot.x - 0x8000, this->actor.shape.rot.y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_809B8080, &this->unk158[0]);
|
||||
|
||||
for (i = 0; i < 13; i++) {
|
||||
func_80035844(&this->unk158[i], &this->unk158[i + 1], &sp6C, 0);
|
||||
Matrix_Translate(this->unk158[i].x, this->unk158[i].y, this->unk158[i].z, MTXMODE_NEW);
|
||||
Math_SmoothStepToS(&this->unk2A8[i].y, sp6C.y, 3, this->unk31C, 182);
|
||||
Math_SmoothStepToS(&this->unk2A8[i].x, sp6C.x + 0x8000, 3, this->unk31C, 182);
|
||||
Matrix_RotateRPY(this->unk2A8[i].x - 0x8000, this->unk2A8[i].y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_809B8080, &this->unk158[i + 1]);
|
||||
}
|
||||
|
||||
this->unk2A8[13].x = this->unk2A8[12].x;
|
||||
this->unk2A8[13].y = this->unk2A8[12].y;
|
||||
this->unk318--;
|
||||
if (this->unk318 == 0) {
|
||||
EnBa_SetupIdle(this);
|
||||
}
|
||||
}
|
||||
|
||||
void func_809B75A0(EnBa* this, GlobalContext* globalCtx2) {
|
||||
s16 unk_temp;
|
||||
s32 i;
|
||||
Vec3f sp74 = { 0.0f, 0.0f, 0.0f };
|
||||
GlobalContext* globalCtx = globalCtx2;
|
||||
|
||||
this->unk31C = 2500;
|
||||
EffectSsDeadSound_SpawnStationary(globalCtx, &this->actor.projectedPos, NA_SE_EN_BALINADE_HAND_DEAD, 1, 1, 40);
|
||||
this->unk14C = 0;
|
||||
|
||||
for (i = 7; i < 14; i++) {
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_BA, this->unk158[i].x, this->unk158[i].y,
|
||||
this->unk158[i].z, 0, 0, 0, EN_BA_DEAD_BLOB);
|
||||
}
|
||||
unk_temp = Math_Vec3f_Pitch(&this->actor.world.pos, &this->unk158[0]) + 0x8000;
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, this->unk31C, 0);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.x, unk_temp, 1, this->unk31C, 0);
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateRPY(this->actor.shape.rot.x - 0x8000, this->actor.shape.rot.y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_809B8080, &this->unk158[0]);
|
||||
this->actor.flags &= ~1;
|
||||
for (i = 5; i < 13; i++) {
|
||||
Math_SmoothStepToS(&this->unk2A8[i].x, this->unk2A8[5].x, 1, this->unk31C, 0);
|
||||
Math_SmoothStepToS(&this->unk2A8[i].y, this->unk2A8[5].y, 1, this->unk31C, 0);
|
||||
Matrix_Translate(this->unk158[i].x, this->unk158[i].y, this->unk158[i].z, MTXMODE_NEW);
|
||||
Matrix_RotateRPY(this->unk2A8[i].x - 0x8000, this->unk2A8[i].y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&sp74, &this->unk158[i + 1]);
|
||||
}
|
||||
this->unk31A = 15;
|
||||
EnBa_SetupAction(this, EnBa_Die);
|
||||
}
|
||||
|
||||
void EnBa_Die(EnBa* this, GlobalContext* globalCtx) {
|
||||
Vec3f sp6C = { 0.0f, 0.0f, 0.0f };
|
||||
s16 temp;
|
||||
s32 i;
|
||||
|
||||
if (this->unk31A != 0) {
|
||||
this->actor.speedXZ = 30.0f;
|
||||
this->unk31C = 8000;
|
||||
this->actor.world.pos.y += 8.0f;
|
||||
temp = Math_Vec3f_Pitch(&this->actor.world.pos, &this->unk158[0]) + 0x8000;
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, this->unk31C, 0);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.x, temp, 1, this->unk31C, 0);
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateRPY(this->actor.shape.rot.x - 0x8000, this->actor.shape.rot.y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_809B8080, &this->unk158[0]);
|
||||
for (i = 0; i < 5; i++) {
|
||||
temp = -Math_CosS(this->unk31A * 0x444) * (i * 400);
|
||||
Math_SmoothStepToS(&this->unk2A8[i].x, temp - 0x4000, 1, this->unk31C, 0);
|
||||
Math_SmoothStepToS(&this->unk2A8[i].y, this->actor.yawTowardsPlayer, 1, this->unk31C, 0);
|
||||
Matrix_Translate(this->unk158[i].x, this->unk158[i].y, this->unk158[i].z, MTXMODE_NEW);
|
||||
Matrix_RotateRPY(this->unk2A8[i].x - 0x8000, this->unk2A8[i].y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_809B8080, &this->unk158[i + 1]);
|
||||
}
|
||||
for (i = 5; i < 13; i++) {
|
||||
Math_SmoothStepToS(&this->unk2A8[i].x, this->unk2A8[5].x, 1, this->unk31C, 0);
|
||||
Math_SmoothStepToS(&this->unk2A8[i].y, this->unk2A8[5].y, 1, this->unk31C, 0);
|
||||
Matrix_Translate(this->unk158[i].x, this->unk158[i].y, this->unk158[i].z, MTXMODE_NEW);
|
||||
Matrix_RotateRPY(this->unk2A8[i].x - 0x8000, this->unk2A8[i].y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&sp6C, &this->unk158[i + 1]);
|
||||
}
|
||||
this->unk31A--;
|
||||
} else {
|
||||
Flags_SetSwitch(globalCtx, this->upperParams);
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
}
|
||||
|
||||
void EnBa_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnBa* this = THIS;
|
||||
|
||||
if ((this->actor.params < EN_BA_DEAD_BLOB) && (this->collider.base.acFlags & 2)) {
|
||||
this->collider.base.acFlags &= ~2;
|
||||
this->actor.colChkInfo.health--;
|
||||
if (this->actor.colChkInfo.health == 0) {
|
||||
func_809B75A0(this, globalCtx);
|
||||
} else {
|
||||
func_809B7174(this);
|
||||
}
|
||||
}
|
||||
this->actionFunc(this, globalCtx);
|
||||
if (this->actor.params < EN_BA_DEAD_BLOB) {
|
||||
this->actor.focus.pos = this->unk158[6];
|
||||
}
|
||||
if (this->unk14C >= 2) {
|
||||
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
|
||||
}
|
||||
}
|
||||
|
||||
static Gfx* D_809B8118[] = { 0x060024F0, 0x060027F0, 0x060029F0 };
|
||||
|
||||
void EnBa_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnBa* this = THIS;
|
||||
s32 pad;
|
||||
s16 i;
|
||||
Mtx* mtx = Graph_Alloc(globalCtx->state.gfxCtx, sizeof(Mtx) * 14);
|
||||
Vec3f unused = { 0.0f, 0.0f, 448.0f };
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ba.c", 933);
|
||||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
if (this->actor.params < EN_BA_DEAD_BLOB) {
|
||||
Matrix_Push();
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0C, mtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_809B8118[this->actor.params]));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09,
|
||||
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 16, 16, 1, 0,
|
||||
(globalCtx->gameplayFrames * -10) % 128, 32, 32));
|
||||
for (i = 0; i < 14; i++, mtx++) {
|
||||
Matrix_Translate(this->unk158[i].x, this->unk158[i].y, this->unk158[i].z, MTXMODE_NEW);
|
||||
Matrix_RotateRPY(this->unk2A8[i].x, this->unk2A8[i].y, this->unk2A8[i].z, MTXMODE_APPLY);
|
||||
Matrix_Scale(this->unk200[i].x, this->unk200[i].y, this->unk200[i].z, MTXMODE_APPLY);
|
||||
if ((i == 6) || (i == 13)) {
|
||||
switch (i) {
|
||||
case 13:
|
||||
Collider_UpdateSpheres(i, &this->collider);
|
||||
break;
|
||||
default:
|
||||
Matrix_Scale(0.5f, 0.5f, 1.0f, MTXMODE_APPLY);
|
||||
Collider_UpdateSpheres(8, &this->collider);
|
||||
break;
|
||||
}
|
||||
}
|
||||
Matrix_ToMtx(mtx, "../z_en_ba.c", 970);
|
||||
}
|
||||
Matrix_Pull();
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_ba.c", 973),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, D_06000890);
|
||||
} else {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (globalCtx->gameplayFrames * 2) % 128,
|
||||
(globalCtx->gameplayFrames * 2) % 128, 32, 32, 1,
|
||||
(globalCtx->gameplayFrames * -5) % 128, (globalCtx->gameplayFrames * -5) % 128, 32,
|
||||
32));
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 125, 100, 255);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_ba.c", 991),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, D_06001D80);
|
||||
}
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ba.c", 995);
|
||||
}
|
||||
|
|
|
@ -6,9 +6,32 @@
|
|||
|
||||
struct EnBa;
|
||||
|
||||
typedef void (*EnBaActionFunc)(struct EnBa*, GlobalContext*);
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ EN_BA_TENTACLE_RED,
|
||||
/* 0x01 */ EN_BA_TENTACLE_GREEN,
|
||||
/* 0x02 */ EN_BA_TENTACLE_GRAY,
|
||||
/* 0x03 */ EN_BA_DEAD_BLOB
|
||||
} EnBaType;
|
||||
|
||||
typedef struct EnBa {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ char unk_14C[0x274];
|
||||
/* 0x014C */ s32 unk14C;
|
||||
/* 0x0150 */ EnBaActionFunc actionFunc;
|
||||
/* 0x0154 */ s16 upperParams;
|
||||
/* 0x0156 */ s16 unk156;
|
||||
/* 0x0158 */ Vec3f unk158[14];
|
||||
/* 0x0200 */ Vec3f unk200[14];
|
||||
/* 0x02A8 */ Vec3s unk2A8[14];
|
||||
/* 0x02FC */ Vec3f unk2FC;
|
||||
/* 0x0308 */ Vec3f unk308;
|
||||
/* 0x0314 */ f32 unk314;
|
||||
/* 0x0318 */ s16 unk318;
|
||||
/* 0x031A */ s16 unk31A;
|
||||
/* 0x031C */ s16 unk31C;
|
||||
/* 0x0320 */ ColliderJntSph collider;
|
||||
/* 0x0340 */ ColliderJntSphElement colliderItems[2];
|
||||
} EnBa; // size = 0x03C0
|
||||
|
||||
extern const ActorInit En_Ba_InitVars;
|
||||
|
|
|
@ -166,7 +166,7 @@ void EnDha_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actor.focus.pos.y += 50.0f;
|
||||
this->actor.colChkInfo.mass = MASS_HEAVY;
|
||||
this->actor.colChkInfo.health = 8;
|
||||
this->unk_1CE = -0x4000;
|
||||
this->unk_1CE.x = -0x4000;
|
||||
Collider_InitJntSph(globalCtx, &this->collider);
|
||||
Collider_SetJntSph(globalCtx, &this->collider, &this->actor, &sJntSphInit, this->colliderItem);
|
||||
this->actor.flags &= ~1;
|
||||
|
@ -198,7 +198,7 @@ void func_809ECA50(EnDha* this, GlobalContext* globalCtx) {
|
|||
s32 pad;
|
||||
s32 pad2;
|
||||
Vec3f playerPos = player->actor.world.pos;
|
||||
Vec3s test;
|
||||
Vec3s unkRot;
|
||||
s16 result;
|
||||
s32 resultAbs;
|
||||
|
||||
|
@ -210,7 +210,7 @@ void func_809ECA50(EnDha* this, GlobalContext* globalCtx) {
|
|||
playerPos.y += 56.0f;
|
||||
}
|
||||
if (this->actor.xzDistToPlayer <= 100.0f) {
|
||||
this->unk_1D6.x = this->unk_1D0.z = this->unk_1D0.y = 0;
|
||||
this->unk_1D4.y = this->unk_1D4.x = this->unk_1CE.z = 0;
|
||||
if (Math_Vec3f_DistXYZ(&playerPos, &this->unk_1DC) <= 12.0f) {
|
||||
if (this->unk_1CC == 0) {
|
||||
if (globalCtx->grabPlayer(globalCtx, player)) {
|
||||
|
@ -223,7 +223,7 @@ void func_809ECA50(EnDha* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
} else {
|
||||
this->unk_1CA += 0x1194;
|
||||
this->unk_1D0.y = Math_SinS(this->unk_1CA) * 1820.0f;
|
||||
this->unk_1CE.z = Math_SinS(this->unk_1CA) * 1820.0f;
|
||||
if (!(player->stateFlags2 & 0x80)) {
|
||||
this->unk_1CC = 0;
|
||||
func_809ECF60(this);
|
||||
|
@ -233,9 +233,9 @@ void func_809ECA50(EnDha* this, GlobalContext* globalCtx) {
|
|||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DEADHAND_GRIP);
|
||||
}
|
||||
}
|
||||
func_80035844(&this->unk_1E8, &playerPos, &this->unk_1D0.z, 0);
|
||||
this->unk_1D6.x -= this->actor.shape.rot.y + this->unk_1D0.y;
|
||||
this->unk_1D0.z -= this->actor.shape.rot.x + this->unk_1CE + this->unk_1D0.x;
|
||||
func_80035844(&this->unk_1E8, &playerPos, &this->unk_1D4, 0);
|
||||
this->unk_1D4.y -= this->actor.shape.rot.y + this->unk_1CE.z;
|
||||
this->unk_1D4.x -= this->actor.shape.rot.x + this->unk_1CE.x + this->unk_1CE.y;
|
||||
} else {
|
||||
if ((player->stateFlags2 & 0x80) && (&this->actor == player->actor.parent)) {
|
||||
player->stateFlags2 &= ~0x80;
|
||||
|
@ -251,24 +251,24 @@ void func_809ECA50(EnDha* this, GlobalContext* globalCtx) {
|
|||
Math_SmoothStepToF(&this->unk_1DC.x, playerPos.x, 1.0f, 16.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->unk_1DC.y, playerPos.y, 1.0f, 16.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->unk_1DC.z, playerPos.z, 1.0f, 16.0f, 0.0f);
|
||||
func_80035844(&this->unk_1F4, &this->unk_1DC, &test.x, 0);
|
||||
func_80035844(&this->unk_1F4, &this->unk_1DC, &unkRot, 0);
|
||||
Matrix_Translate(this->unk_1DC.x, this->unk_1DC.y, this->unk_1DC.z, MTXMODE_NEW);
|
||||
Matrix_RotateRPY(test.x, test.y, 0, MTXMODE_APPLY);
|
||||
Matrix_RotateRPY(unkRot.x, unkRot.y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_809ED758, &this->unk_1F4);
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
func_80035844(&this->actor.world.pos, &this->unk_1F4, &test.x, 0);
|
||||
Matrix_RotateRPY(test.x, test.y, 0, MTXMODE_APPLY);
|
||||
func_80035844(&this->actor.world.pos, &this->unk_1F4, &unkRot, 0);
|
||||
Matrix_RotateRPY(unkRot.x, unkRot.y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_809ED74C, &this->unk_1F4);
|
||||
this->unk_1CE = Math_Vec3f_Pitch(&this->actor.world.pos, &this->unk_1F4);
|
||||
this->unk_1CE.x = Math_Vec3f_Pitch(&this->actor.world.pos, &this->unk_1F4);
|
||||
result = Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk_1F4) - this->actor.shape.rot.y;
|
||||
resultAbs = ABS(result);
|
||||
if (resultAbs >= 0x4000) {
|
||||
this->unk_1CE = -0x8000 - this->unk_1CE;
|
||||
this->unk_1CE.x = -0x8000 - this->unk_1CE.x;
|
||||
}
|
||||
this->unk_1D0.x = (Math_Vec3f_Pitch(&this->unk_1F4, &this->unk_1DC) - this->unk_1CE);
|
||||
if (this->unk_1D0.x < 0) {
|
||||
this->unk_1CE += this->unk_1D0.x * 2;
|
||||
this->unk_1D0.x *= -2;
|
||||
this->unk_1CE.y = (Math_Vec3f_Pitch(&this->unk_1F4, &this->unk_1DC) - this->unk_1CE.x);
|
||||
if (this->unk_1CE.y < 0) {
|
||||
this->unk_1CE.x += this->unk_1CE.y * 2;
|
||||
this->unk_1CE.y *= -2;
|
||||
}
|
||||
} else {
|
||||
if ((player->stateFlags2 & 0x80) && (&this->actor == player->actor.parent)) {
|
||||
|
@ -277,8 +277,8 @@ void func_809ECA50(EnDha* this, GlobalContext* globalCtx) {
|
|||
player->unk_850 = 200;
|
||||
}
|
||||
this->actor.home.rot.z = 1;
|
||||
Math_SmoothStepToS(&this->unk_1D0.x, 0, 1, 0x3E8, 0);
|
||||
Math_SmoothStepToS(&this->unk_1CE, -0x4000, 1, 0x3E8, 0);
|
||||
Math_SmoothStepToS(&this->unk_1CE.y, 0, 1, 0x3E8, 0);
|
||||
Math_SmoothStepToS(&this->unk_1CE.x, -0x4000, 1, 0x3E8, 0);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
}
|
||||
}
|
||||
|
@ -296,9 +296,9 @@ void func_809ECF8C(EnDha* this, GlobalContext* globalCtx) {
|
|||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
}
|
||||
Math_SmoothStepToS(&this->unk_1D0.x, 0, 1, 2000, 0);
|
||||
Math_SmoothStepToS(&this->unk_1D0.y, 0, 1, 600, 0);
|
||||
Math_SmoothStepToS(&this->unk_1CE, -0x4000, 1, 2000, 0);
|
||||
Math_SmoothStepToS(&this->unk_1CE.y, 0, 1, 2000, 0);
|
||||
Math_SmoothStepToS(&this->unk_1CE.z, 0, 1, 600, 0);
|
||||
Math_SmoothStepToS(&this->unk_1CE.x, -0x4000, 1, 2000, 0);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
this->unk_1C8--;
|
||||
if (this->unk_1C8 == 0) {
|
||||
|
@ -331,8 +331,8 @@ void EnDha_Die(EnDha* this, GlobalContext* globalCtx) {
|
|||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
}
|
||||
Math_SmoothStepToS(&this->unk_1D0.x, 0, 1, 0x7D0, 0);
|
||||
result = Math_SmoothStepToS(&this->unk_1CE, -0x4000, 1, 0x7D0, 0);
|
||||
Math_SmoothStepToS(&this->unk_1CE.y, 0, 1, 0x7D0, 0);
|
||||
result = Math_SmoothStepToS(&this->unk_1CE.x, -0x4000, 1, 0x7D0, 0);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (result == 0) {
|
||||
vector = this->actor.world.pos;
|
||||
|
@ -398,14 +398,14 @@ s32 EnDha_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
|
|||
EnDha* this = THIS;
|
||||
|
||||
if (limbIndex == 1) {
|
||||
rot->y = -(s16)(this->unk_1CE + 0x4000);
|
||||
rot->z += this->unk_1D0.y;
|
||||
rot->y = -(s16)(this->unk_1CE.x + 0x4000);
|
||||
rot->z += this->unk_1CE.z;
|
||||
} else if (limbIndex == 2) {
|
||||
rot->z = this->unk_1D0.x;
|
||||
rot->y -= this->unk_1D0.y;
|
||||
rot->z = this->unk_1CE.y;
|
||||
rot->y -= this->unk_1CE.z;
|
||||
} else if (limbIndex == 3) {
|
||||
rot->y = -this->unk_1D6.x;
|
||||
rot->z = -this->unk_1D0.z;
|
||||
rot->y = -this->unk_1D4.y;
|
||||
rot->z = -this->unk_1D4.x;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -18,9 +18,8 @@ typedef struct EnDha {
|
|||
/* 0x01C8 */ s16 unk_1C8;
|
||||
/* 0x01CA */ s16 unk_1CA;
|
||||
/* 0x01CC */ u8 unk_1CC;
|
||||
/* 0x01CE */ s16 unk_1CE;
|
||||
/* 0x01D0 */ Vec3s unk_1D0;
|
||||
/* 0x01D6 */ Vec3s unk_1D6;
|
||||
/* 0x01CE */ Vec3s unk_1CE;
|
||||
/* 0x01D4 */ Vec3s unk_1D4;
|
||||
/* 0x01DC */ Vec3f unk_1DC;
|
||||
/* 0x01E8 */ Vec3f unk_1E8;
|
||||
/* 0x01F4 */ Vec3f unk_1F4;
|
||||
|
|
|
@ -313,9 +313,9 @@ static InitChainEntry sInitChain[] = {
|
|||
};
|
||||
|
||||
static u8 sVertexIndices[] = {
|
||||
3, 4, 5, 6, 7, 8, 9, 10, 16, 17, 18, 19, 25, 26, 27, 32, 35, 36, 37, 38, 39, 45,
|
||||
46, 47, 52, 53, 54, 59, 60, 61, 67, 68, 69, 70, 71, 72, 0, 1, 11, 12, 14, 20, 21, 23,
|
||||
28, 30, 33, 34, 40, 41, 43, 48, 50, 55, 57, 62, 64, 65, 73, 74,
|
||||
3, 4, 5, 6, 7, 8, 9, 10, 16, 17, 18, 19, 25, 26, 27, 32, 35, 36, 37, 38,
|
||||
39, 45, 46, 47, 52, 53, 54, 59, 60, 61, 67, 68, 69, 70, 71, 72, 0, 1, 11, 12,
|
||||
14, 20, 21, 23, 28, 30, 33, 34, 40, 41, 43, 48, 50, 55, 57, 62, 64, 65, 73, 74,
|
||||
};
|
||||
|
||||
void MagicFire_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue