mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-05 22:00:15 +00:00
parent
941f79215c
commit
11e5be77d5
26 changed files with 400 additions and 1277 deletions
|
@ -9,13 +9,18 @@ void BgIceShelter_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
|||
void BgIceShelter_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
void BgIceShelter_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
extern UNK_TYPE D_060006F0;
|
||||
extern UNK_TYPE D_060012A0;
|
||||
extern UNK_TYPE D_06001C1C;
|
||||
extern UNK_TYPE D_06002640;
|
||||
extern UNK_TYPE D_06002920;
|
||||
void func_80891064(BgIceShelter* this);
|
||||
void func_808911BC(BgIceShelter* this);
|
||||
|
||||
void func_8089107C(BgIceShelter* this, GlobalContext* globalCtx);
|
||||
void func_808911D4(BgIceShelter* this, GlobalContext* globalCtx);
|
||||
|
||||
extern Gfx D_060006F0[];
|
||||
extern Gfx D_060012A0[];
|
||||
extern CollisionHeader D_06001C1C;
|
||||
extern Gfx D_06002640[];
|
||||
extern CollisionHeader D_06002920;
|
||||
|
||||
/*
|
||||
const ActorInit Bg_Ice_Shelter_InitVars = {
|
||||
ACTOR_BG_ICE_SHELTER,
|
||||
ACTORCAT_BG,
|
||||
|
@ -28,6 +33,11 @@ const ActorInit Bg_Ice_Shelter_InitVars = {
|
|||
(ActorFunc)BgIceShelter_Draw,
|
||||
};
|
||||
|
||||
static f32 sScales[] = { 0.1f, 0.06f, 0.1f, 0.1f, 0.25f };
|
||||
|
||||
static Color_RGBA8 sDustPrimColor = { 250, 250, 250, 255 };
|
||||
static Color_RGBA8 sDustEnvColor = { 180, 180, 180, 255 };
|
||||
|
||||
static ColliderCylinderInit D_8089170C = {
|
||||
{
|
||||
COLTYPE_NONE,
|
||||
|
@ -67,29 +77,369 @@ static ColliderCylinderInit D_80891738 = {
|
|||
},
|
||||
{ 0, 0, 0, { 0, 0, 0 } },
|
||||
};
|
||||
*/
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ice_Shelter/func_80890740.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ice_Shelter/func_80890874.s")
|
||||
void func_80890740(BgIceShelter* this, GlobalContext* globalCtx) {
|
||||
static s16 cylinderRadii[] = { 47, 33, 44, 41, 100 };
|
||||
static s16 cylinderHeights[] = { 80, 54, 90, 60, 200 };
|
||||
s32 pad;
|
||||
s32 type = (this->dyna.actor.params >> 8) & 7;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ice_Shelter/func_808908FC.s")
|
||||
Collider_InitCylinder(globalCtx, &this->cylinder1);
|
||||
Collider_SetCylinder(globalCtx, &this->cylinder1, &this->dyna.actor, &D_8089170C);
|
||||
Collider_UpdateCylinder(&this->dyna.actor, &this->cylinder1);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ice_Shelter/BgIceShelter_Init.s")
|
||||
this->cylinder1.dim.radius = cylinderRadii[type];
|
||||
this->cylinder1.dim.height = cylinderHeights[type];
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ice_Shelter/BgIceShelter_Destroy.s")
|
||||
if (type == 0 || type == 1 || type == 4) {
|
||||
Collider_InitCylinder(globalCtx, &this->cylinder2);
|
||||
Collider_SetCylinder(globalCtx, &this->cylinder2, &this->dyna.actor, &D_80891738);
|
||||
Collider_UpdateCylinder(&this->dyna.actor, &this->cylinder2);
|
||||
this->cylinder2.dim.radius = cylinderRadii[type];
|
||||
this->cylinder2.dim.height = cylinderHeights[type];
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ice_Shelter/func_80890B8C.s")
|
||||
if (type == 4) {
|
||||
this->cylinder1.dim.pos.z += 30;
|
||||
this->cylinder2.dim.pos.z += 30;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ice_Shelter/func_80890E00.s")
|
||||
void func_80890874(BgIceShelter* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 moveFlag) {
|
||||
s32 pad;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s32 pad2;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ice_Shelter/func_80891064.s")
|
||||
DynaPolyActor_Init(&this->dyna, moveFlag);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ice_Shelter/func_8089107C.s")
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
// Warning : move BG registration failed
|
||||
osSyncPrintf("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_ice_shelter.c", 362,
|
||||
this->dyna.actor.id, this->dyna.actor.params);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ice_Shelter/func_808911BC.s")
|
||||
void func_808908FC(Vec3f* dest, Vec3f* src, s16 angle) {
|
||||
f32 sin = Math_SinS(angle);
|
||||
f32 cos = Math_CosS(angle);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ice_Shelter/func_808911D4.s")
|
||||
dest->x = (src->z * sin) + (src->x * cos);
|
||||
dest->y = src->y;
|
||||
dest->z = (src->z * cos) - (src->x * sin);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ice_Shelter/BgIceShelter_Update.s")
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_F32(uncullZoneForward, 1200, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ice_Shelter/BgIceShelter_Draw.s")
|
||||
void BgIceShelter_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
static Vec3f kzIceScale = { 0.18f, 0.27f, 0.24f };
|
||||
BgIceShelter* this = THIS;
|
||||
s16 type = (this->dyna.actor.params >> 8) & 7;
|
||||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
|
||||
if (type == 4) {
|
||||
this->dyna.actor.world.rot.x += 0xBB8;
|
||||
this->dyna.actor.world.pos.y -= 45.0f;
|
||||
this->dyna.actor.shape.rot.x = this->dyna.actor.world.rot.x;
|
||||
this->dyna.actor.world.pos.z -= 38.0f;
|
||||
}
|
||||
|
||||
if (type == 4) {
|
||||
Math_Vec3f_Copy(&this->dyna.actor.scale, &kzIceScale);
|
||||
} else {
|
||||
Actor_SetScale(&this->dyna.actor, sScales[type]);
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
case 2:
|
||||
func_80890874(this, globalCtx, &D_06001C1C, 0);
|
||||
break;
|
||||
case 3:
|
||||
func_80890874(this, globalCtx, &D_06002920, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
func_80890740(this, globalCtx);
|
||||
|
||||
this->dyna.actor.colChkInfo.mass = MASS_IMMOVABLE;
|
||||
|
||||
if (!((this->dyna.actor.params >> 6) & 1) && (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F))) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
return;
|
||||
}
|
||||
|
||||
func_80891064(this);
|
||||
|
||||
osSyncPrintf("(ice shelter)(arg_data 0x%04x)\n", this->dyna.actor.params);
|
||||
}
|
||||
|
||||
void BgIceShelter_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgIceShelter* this = THIS;
|
||||
|
||||
switch ((this->dyna.actor.params >> 8) & 7) {
|
||||
case 2:
|
||||
case 3:
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
break;
|
||||
|
||||
case 0:
|
||||
case 1:
|
||||
case 4:
|
||||
Collider_DestroyCylinder(globalCtx, &this->cylinder2);
|
||||
break;
|
||||
}
|
||||
|
||||
Collider_DestroyCylinder(globalCtx, &this->cylinder1);
|
||||
}
|
||||
|
||||
s16 D_80891794[] = { 0x0000, 0x4000, 0x2000, 0x6000, 0x1000, 0x5000, 0x3000, 0x7000 };
|
||||
s16 D_808917A4[] = { 0x0000, 0x003C, 0x0018, 0x0054, 0x0030, 0x000C, 0x0048, 0x0024 };
|
||||
|
||||
void func_80890B8C(BgIceShelter* this, GlobalContext* globalCtx, f32 chance, f32 scale) {
|
||||
f32 cos;
|
||||
f32 sin;
|
||||
f32 xzOffset;
|
||||
Vec3f* icePos;
|
||||
s16 angle;
|
||||
s16 frames;
|
||||
s32 i;
|
||||
s32 pad[2];
|
||||
Vec3f dustPos;
|
||||
Vec3f dustVel;
|
||||
Vec3f dustAccel;
|
||||
|
||||
frames = (s16)globalCtx->state.frames & 7;
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
if (chance < Rand_ZeroOne()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
xzOffset = 42.0f * scale;
|
||||
icePos = &this->dyna.actor.world.pos;
|
||||
angle = D_80891794[frames] + (i * 0x8000);
|
||||
sin = Math_SinS(angle);
|
||||
cos = Math_CosS(angle);
|
||||
|
||||
dustPos.x = (xzOffset * sin) + icePos->x;
|
||||
dustPos.y = (16.0f * scale) + icePos->y;
|
||||
dustPos.z = (xzOffset * cos) + icePos->z;
|
||||
|
||||
dustVel.x = ((Rand_ZeroOne() * 3.0f) - 1.0f) * sin;
|
||||
dustVel.y = 0.0f;
|
||||
dustVel.z = ((Rand_ZeroOne() * 3.0f) - 1.0f) * cos;
|
||||
|
||||
dustAccel.x = 0.07f * sin;
|
||||
dustAccel.y = 0.8f;
|
||||
dustAccel.z = 0.07f * cos;
|
||||
|
||||
func_8002829C(globalCtx, &dustPos, &dustVel, &dustAccel, &sDustPrimColor, &sDustEnvColor, 450.0f * scale,
|
||||
(s16)((Rand_ZeroOne() * 40.0f) + 40.0f) * scale);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80890E00(BgIceShelter* this, GlobalContext* globalCtx, f32 chance, f32 arg3) {
|
||||
static f32 D_808917B4[] = { -1.0f, 1.0f };
|
||||
Vec3f* icePos;
|
||||
s16 frames;
|
||||
s32 pad[2];
|
||||
Vec3f dustPos;
|
||||
Vec3f dustVel;
|
||||
Vec3f dustAccel;
|
||||
Vec3f posOffset;
|
||||
s32 i;
|
||||
|
||||
frames = (s16)globalCtx->state.frames & 7;
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
icePos = &this->dyna.actor.world.pos;
|
||||
|
||||
if (chance < Rand_ZeroOne()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
posOffset.x = (D_808917A4[frames] + ((Rand_ZeroOne() * 12.0f) - 6.0f)) * D_808917B4[i];
|
||||
posOffset.y = 15.0f;
|
||||
posOffset.z = ((84.0f - posOffset.x) * 0.2f) + (Rand_ZeroOne() * 20.0f);
|
||||
|
||||
func_808908FC(&dustPos, &posOffset, this->dyna.actor.world.rot.y);
|
||||
Math_Vec3f_Sum(&dustPos, icePos, &dustPos);
|
||||
|
||||
dustVel.x = (Rand_ZeroOne() * 3.0f) - 1.5f;
|
||||
dustVel.y = 0.0f;
|
||||
dustVel.z = (Rand_ZeroOne() * 3.0f) - 1.5f;
|
||||
|
||||
dustAccel.x = (Rand_ZeroOne() * 0.14f) - 0.07f;
|
||||
dustAccel.y = 0.8f;
|
||||
dustAccel.z = (Rand_ZeroOne() * 0.14f) - 0.07f;
|
||||
|
||||
func_8002829C(globalCtx, &dustPos, &dustVel, &dustAccel, &sDustPrimColor, &sDustEnvColor, 450,
|
||||
(Rand_ZeroOne() * 40.0f) + 40.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80891064(BgIceShelter* this) {
|
||||
this->actionFunc = func_8089107C;
|
||||
this->alpha = 255;
|
||||
}
|
||||
|
||||
void func_8089107C(BgIceShelter* this, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
s16 type = (this->dyna.actor.params >> 8) & 7;
|
||||
|
||||
if (type == 4) {
|
||||
if (this->dyna.actor.parent != NULL) {
|
||||
this->dyna.actor.parent->freezeTimer = 10000;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->cylinder1.base.acFlags & AC_HIT) {
|
||||
this->cylinder1.base.acFlags &= ~AC_HIT;
|
||||
|
||||
if ((this->cylinder1.base.ac != NULL) && (this->cylinder1.base.ac->id == ACTOR_EN_ICE_HONO)) {
|
||||
if (type == 4) {
|
||||
if (this->dyna.actor.parent != NULL) {
|
||||
this->dyna.actor.parent->freezeTimer = 50;
|
||||
}
|
||||
}
|
||||
|
||||
func_808911BC(this);
|
||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_ICE_MELT);
|
||||
}
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 4:
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->cylinder1.base);
|
||||
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->cylinder2.base);
|
||||
break;
|
||||
}
|
||||
|
||||
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->cylinder1.base);
|
||||
}
|
||||
|
||||
void func_808911BC(BgIceShelter* this) {
|
||||
this->actionFunc = func_808911D4;
|
||||
this->alpha = 255;
|
||||
}
|
||||
|
||||
static f32 D_808917BC[] = { -0.0015f, -0.0009f, -0.0016f, -0.0016f, -0.00375f };
|
||||
static f32 D_808917D0[] = { 1.0f, 0.6f, 1.2f, 1.0f, 1.8f };
|
||||
|
||||
static void (*sEffSpawnFuncs[])(BgIceShelter* this, GlobalContext* globalCtx, f32 chance, f32 scale) = {
|
||||
func_80890B8C, func_80890B8C, func_80890B8C, func_80890E00, func_80890B8C,
|
||||
};
|
||||
|
||||
void func_808911D4(BgIceShelter* this, GlobalContext* globalCtx) {
|
||||
|
||||
s32 pad;
|
||||
s32 type = (this->dyna.actor.params >> 8) & 7;
|
||||
f32 phi_f0;
|
||||
|
||||
this->alpha -= 5;
|
||||
this->alpha = CLAMP(this->alpha, 0, 255);
|
||||
|
||||
this->dyna.actor.scale.y += D_808917BC[type];
|
||||
this->dyna.actor.scale.y = CLAMP_MIN(this->dyna.actor.scale.y, 0.0001f);
|
||||
|
||||
if (this->alpha > 80) {
|
||||
switch (type) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 4:
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->cylinder1.base);
|
||||
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->cylinder2.base);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->alpha > 180) {
|
||||
phi_f0 = 1.0f;
|
||||
} else if (this->alpha > 60) {
|
||||
phi_f0 = 0.5f;
|
||||
} else {
|
||||
phi_f0 = 0.0f;
|
||||
}
|
||||
|
||||
sEffSpawnFuncs[type](this, globalCtx, phi_f0, D_808917D0[type]);
|
||||
|
||||
if (this->alpha <= 0) {
|
||||
if (!((this->dyna.actor.params >> 6) & 1)) {
|
||||
Flags_SetSwitch(globalCtx, this->dyna.actor.params & 0x3F);
|
||||
}
|
||||
|
||||
if (type == 4) {
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
}
|
||||
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
}
|
||||
}
|
||||
|
||||
void BgIceShelter_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgIceShelter* this = THIS;
|
||||
|
||||
this->actionFunc(this, globalCtx);
|
||||
}
|
||||
|
||||
void BgIceShelter_Draw(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
GlobalContext* globalCtx = globalCtx2;
|
||||
BgIceShelter* this = THIS;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_ice_shelter.c", 748);
|
||||
|
||||
func_80093D84(globalCtx->state.gfxCtx);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_ice_shelter.c", 751),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
switch ((this->dyna.actor.params >> 8) & 7) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
case 4:
|
||||
func_8002ED80(&this->dyna.actor, globalCtx, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, this->alpha);
|
||||
|
||||
switch ((this->dyna.actor.params >> 8) & 7) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 4:
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, -globalCtx->gameplayFrames & 0x7F,
|
||||
-globalCtx->gameplayFrames & 0x7F, 0x20, 0x20, 1,
|
||||
-globalCtx->gameplayFrames & 0x7F, globalCtx->gameplayFrames & 0x7F, 0x20,
|
||||
0x20));
|
||||
gSPDisplayList(POLY_XLU_DISP++, D_060006F0);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, globalCtx->gameplayFrames & 0xFF, 0x40, 0x40, 1,
|
||||
0, -globalCtx->gameplayFrames & 0xFF, 0x40, 0x40));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x09,
|
||||
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, -globalCtx->gameplayFrames & 0xFF,
|
||||
globalCtx->gameplayFrames & 0xFF, 0x40, 0x40, 1,
|
||||
globalCtx->gameplayFrames & 0xFF, globalCtx->gameplayFrames & 0xFF, 0x40,
|
||||
0x40));
|
||||
gSPDisplayList(POLY_XLU_DISP++, D_060012A0);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
gSPDisplayList(POLY_XLU_DISP++, D_06002640);
|
||||
break;
|
||||
}
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_ice_shelter.c", 815);
|
||||
}
|
||||
|
|
|
@ -6,9 +6,14 @@
|
|||
|
||||
struct BgIceShelter;
|
||||
|
||||
typedef void (*BgIceShelterActionFunc)(struct BgIceShelter*, GlobalContext*);
|
||||
|
||||
typedef struct BgIceShelter {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ char unk_14C[0xB8];
|
||||
/* 0x0000 */ DynaPolyActor dyna;
|
||||
/* 0x0164 */ BgIceShelterActionFunc actionFunc;
|
||||
/* 0x0168 */ ColliderCylinder cylinder1;
|
||||
/* 0x01B4 */ ColliderCylinder cylinder2;
|
||||
/* 0x0200 */ s16 alpha;
|
||||
} BgIceShelter; // size = 0x0204
|
||||
|
||||
extern const ActorInit Bg_Ice_Shelter_InitVars;
|
||||
|
|
|
@ -330,8 +330,8 @@ void EnArrow_Fly(EnArrow* this, GlobalContext* globalCtx) {
|
|||
Actor_MoveForward(&this->actor);
|
||||
|
||||
if ((this->touchedPoly =
|
||||
BgCheck_ProjectileLineTest(&globalCtx->colCtx, &this->actor.prevPos, &this->actor.world.pos, &hitPoint,
|
||||
&this->actor.wallPoly, true, true, true, true, &bgId))) {
|
||||
BgCheck_ProjectileLineTest(&globalCtx->colCtx, &this->actor.prevPos, &this->actor.world.pos, &hitPoint,
|
||||
&this->actor.wallPoly, true, true, true, true, &bgId))) {
|
||||
func_8002F9EC(globalCtx, &this->actor, this->actor.wallPoly, bgId, &hitPoint);
|
||||
Math_Vec3f_Copy(&posCopy, &this->actor.world.pos);
|
||||
Math_Vec3f_Copy(&this->actor.world.pos, &hitPoint);
|
||||
|
|
|
@ -318,7 +318,8 @@ void EnDodongo_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->bodyScale.x = this->bodyScale.y = this->bodyScale.z = 1.0f;
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, &ActorShadow_DrawCircle, 48.0f);
|
||||
Actor_SetScale(&this->actor, 0.01875f);
|
||||
SkelAnime_Init(globalCtx, &this->skelAnime, &gDodongoSkel, &gDodongoWaitAnim, this->jointTable, this->morphTable, 31);
|
||||
SkelAnime_Init(globalCtx, &this->skelAnime, &gDodongoSkel, &gDodongoWaitAnim, this->jointTable, this->morphTable,
|
||||
31);
|
||||
this->actor.colChkInfo.health = 4;
|
||||
this->actor.colChkInfo.mass = MASS_HEAVY;
|
||||
this->actor.colChkInfo.damageTable = &sDamageTable;
|
||||
|
|
|
@ -143,7 +143,8 @@ void EnFirefly_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f);
|
||||
SkelAnime_Init(globalCtx, &this->skelAnime, &gKeeseSkeleton, &gKeeseFlyAnim, this->jointTable, this->morphTable, 28);
|
||||
SkelAnime_Init(globalCtx, &this->skelAnime, &gKeeseSkeleton, &gKeeseFlyAnim, this->jointTable, this->morphTable,
|
||||
28);
|
||||
Collider_InitJntSph(globalCtx, &this->collider);
|
||||
Collider_SetJntSph(globalCtx, &this->collider, &this->actor, &sJntSphInit, this->colliderItems);
|
||||
CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);
|
||||
|
|
|
@ -129,7 +129,8 @@ void EnFloormas_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 50.0f);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gWallmasterSkel, &gWallmasterWaitAnim, this->jointTable, this->morphTable, 25);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gWallmasterSkel, &gWallmasterWaitAnim, this->jointTable,
|
||||
this->morphTable, 25);
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
|
||||
CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);
|
||||
|
@ -235,8 +236,8 @@ void EnFloormas_SetupTurn(EnFloormas* this) {
|
|||
if (rotDelta > 0) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gFloormasterTurnAnim, -3.0f);
|
||||
} else {
|
||||
Animation_Change(&this->skelAnime, &gFloormasterTurnAnim, -1.0f, Animation_GetLastFrame(&gFloormasterTurnAnim), 0.0f, ANIMMODE_ONCE,
|
||||
-3.0f);
|
||||
Animation_Change(&this->skelAnime, &gFloormasterTurnAnim, -1.0f, Animation_GetLastFrame(&gFloormasterTurnAnim),
|
||||
0.0f, ANIMMODE_ONCE, -3.0f);
|
||||
}
|
||||
|
||||
if (this->actor.scale.x > 0.004f) {
|
||||
|
@ -249,7 +250,8 @@ void EnFloormas_SetupTurn(EnFloormas* this) {
|
|||
}
|
||||
|
||||
void EnFloormas_SetupHover(EnFloormas* this, GlobalContext* globalCtx) {
|
||||
Animation_Change(&this->skelAnime, &gWallmasterHoverAnim, 3.0f, 0, Animation_GetLastFrame(&gWallmasterHoverAnim), ANIMMODE_ONCE, -3.0f);
|
||||
Animation_Change(&this->skelAnime, &gWallmasterHoverAnim, 3.0f, 0, Animation_GetLastFrame(&gWallmasterHoverAnim),
|
||||
ANIMMODE_ONCE, -3.0f);
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->actor.gravity = 0.0f;
|
||||
EnFloormas_MakeInvulnerable(this);
|
||||
|
@ -288,8 +290,8 @@ void EnFloormas_SetupSplit(EnFloormas* this) {
|
|||
this->actor.shape.rot.y = this->actor.parent->shape.rot.y + 0x5555;
|
||||
this->actor.world.pos = this->actor.parent->world.pos;
|
||||
this->actor.params = 0x10;
|
||||
Animation_Change(&this->skelAnime, &gWallmasterJumpAnim, 1.0f, 41.0f, Animation_GetLastFrame(&gWallmasterJumpAnim), ANIMMODE_ONCE,
|
||||
0.0f);
|
||||
Animation_Change(&this->skelAnime, &gWallmasterJumpAnim, 1.0f, 41.0f, Animation_GetLastFrame(&gWallmasterJumpAnim),
|
||||
ANIMMODE_ONCE, 0.0f);
|
||||
this->collider.dim.radius = sCylinderInit.dim.radius * 0.6f;
|
||||
this->collider.dim.height = sCylinderInit.dim.height * 0.6f;
|
||||
this->collider.info.bumperFlags &= ~BUMP_HOOKABLE;
|
||||
|
|
|
@ -126,7 +126,8 @@ void EnOkuta_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->numShots = (thisx->params >> 8) & 0xFF;
|
||||
thisx->params &= 0xFF;
|
||||
if (thisx->params == 0) {
|
||||
SkelAnime_Init(globalCtx, &this->skelAnime, &gOctorokSkel, &gOctorokAppearAnim, this->jointTable, this->morphTable, 38);
|
||||
SkelAnime_Init(globalCtx, &this->skelAnime, &gOctorokSkel, &gOctorokAppearAnim, this->jointTable,
|
||||
this->morphTable, 38);
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinder(globalCtx, &this->collider, thisx, &sOctorockColliderInit);
|
||||
CollisionCheck_SetInfo(&thisx->colChkInfo, &sDamageTable, &sColChkInfoInit);
|
||||
|
|
|
@ -160,8 +160,7 @@ void EnSkb_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actor.colChkInfo.mass = 0xFE;
|
||||
this->actor.colChkInfo.health = 2;
|
||||
this->actor.shape.yOffset = -8000.0f;
|
||||
SkelAnime_Init(globalCtx, &this->skelAnime, &D_060041F8, &D_06001854, this->jointTable,
|
||||
this->morphTable, 20);
|
||||
SkelAnime_Init(globalCtx, &this->skelAnime, &D_060041F8, &D_06001854, this->jointTable, this->morphTable, 20);
|
||||
this->actor.naviEnemyId = 0x55;
|
||||
|
||||
Collider_InitJntSph(globalCtx, &this->collider);
|
||||
|
|
|
@ -122,7 +122,8 @@ void EnWallmas_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
Actor_ProcessInitChain(thisx, sInitChain);
|
||||
ActorShape_Init(&thisx->shape, 0, NULL, 0.5f);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gWallmasterSkel, &gWallmasterWaitAnim, this->jointTable, this->morphTable, 25);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gWallmasterSkel, &gWallmasterWaitAnim, this->jointTable,
|
||||
this->morphTable, 25);
|
||||
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinder(globalCtx, &this->collider, thisx, &sCylinderInit);
|
||||
|
@ -167,8 +168,8 @@ void EnWallmas_SetupDrop(EnWallmas* this, GlobalContext* globalCtx) {
|
|||
Player* player = PLAYER;
|
||||
AnimationHeader* objSegChangee = &gWallmasterLungeAnim;
|
||||
|
||||
Animation_Change(&this->skelAnime, objSegChangee, 0.0f, 20.0f, Animation_GetLastFrame(&gWallmasterLungeAnim), ANIMMODE_ONCE,
|
||||
0.0f);
|
||||
Animation_Change(&this->skelAnime, objSegChangee, 0.0f, 20.0f, Animation_GetLastFrame(&gWallmasterLungeAnim),
|
||||
ANIMMODE_ONCE, 0.0f);
|
||||
|
||||
this->yTarget = player->actor.world.pos.y;
|
||||
this->actor.world.pos.y = player->actor.world.pos.y + 300.0f;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue