|
|
|
@ -9,6 +9,7 @@
|
|
|
|
|
#include "objects/gameplay_keep/gameplay_keep.h"
|
|
|
|
|
#include "overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.h"
|
|
|
|
|
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
|
|
|
|
|
#include "soh/frame_interpolation.h"
|
|
|
|
|
|
|
|
|
|
#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_10)
|
|
|
|
|
|
|
|
|
@ -2705,6 +2706,8 @@ s32 BossSst_OverrideHandTrailDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx**
|
|
|
|
|
|
|
|
|
|
void BossSst_DrawHand(Actor* thisx, GlobalContext* globalCtx) {
|
|
|
|
|
BossSst* this = (BossSst*)thisx;
|
|
|
|
|
static s32 epoch = 0;
|
|
|
|
|
epoch++;
|
|
|
|
|
|
|
|
|
|
OPEN_DISPS(globalCtx->state.gfxCtx);
|
|
|
|
|
|
|
|
|
@ -2738,6 +2741,8 @@ void BossSst_DrawHand(Actor* thisx, GlobalContext* globalCtx) {
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < end; i++) {
|
|
|
|
|
if (Math3D_Vec3fDistSq(&trail2->world.pos, &trail->world.pos) > 900.0f) {
|
|
|
|
|
FrameInterpolation_RecordOpenChild(trail, 0);
|
|
|
|
|
|
|
|
|
|
Matrix_SetTranslateRotateYXZ(trail->world.pos.x, trail->world.pos.y, trail->world.pos.z,
|
|
|
|
|
&trail->world.rot);
|
|
|
|
|
Matrix_Scale(0.02f, 0.02f, 0.02f, MTXMODE_APPLY);
|
|
|
|
@ -2749,6 +2754,8 @@ void BossSst_DrawHand(Actor* thisx, GlobalContext* globalCtx) {
|
|
|
|
|
POLY_XLU_DISP = SkelAnime_DrawFlex(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
|
|
|
|
this->skelAnime.dListCount, BossSst_OverrideHandTrailDraw, NULL,
|
|
|
|
|
trail, POLY_XLU_DISP);
|
|
|
|
|
|
|
|
|
|
FrameInterpolation_RecordCloseChild();
|
|
|
|
|
}
|
|
|
|
|
idx = (idx + 5) % 7;
|
|
|
|
|
trail2 = trail;
|
|
|
|
@ -2955,6 +2962,8 @@ void BossSst_SpawnHeadShadow(BossSst* this) {
|
|
|
|
|
shadow->scale = 1450;
|
|
|
|
|
shadow->alpha = 254;
|
|
|
|
|
shadow->status = 65;
|
|
|
|
|
|
|
|
|
|
shadow->epoch++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this->effects[3].status = -1;
|
|
|
|
@ -2968,6 +2977,7 @@ void BossSst_SpawnHandShadow(BossSst* this) {
|
|
|
|
|
this->effects[0].scale = 2300;
|
|
|
|
|
this->effects[0].alpha = 254;
|
|
|
|
|
this->effects[0].status = 5;
|
|
|
|
|
this->effects[0].epoch++;
|
|
|
|
|
this->effects[1].status = -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2981,6 +2991,7 @@ void BossSst_SpawnShockwave(BossSst* this) {
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < 3; i++) {
|
|
|
|
|
BossSstEffect* shockwave = &this->effects[i];
|
|
|
|
|
shockwave->epoch++;
|
|
|
|
|
|
|
|
|
|
Math_Vec3f_Copy(&shockwave->pos, &this->actor.world.pos);
|
|
|
|
|
shockwave->move = (i + 9) * 2;
|
|
|
|
@ -3035,6 +3046,8 @@ void BossSst_SpawnIceCrystal(BossSst* this, s32 index) {
|
|
|
|
|
if ((index % 2) == 0) {
|
|
|
|
|
Audio_PlayActorSound2(&this->actor, NA_SE_PL_FREEZE_S);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ice->epoch++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void BossSst_SpawnIceShard(BossSst* this) {
|
|
|
|
@ -3050,6 +3063,7 @@ void BossSst_SpawnIceShard(BossSst* this) {
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < 18; i++) {
|
|
|
|
|
BossSstEffect* ice = &this->effects[i];
|
|
|
|
|
ice->epoch++;
|
|
|
|
|
|
|
|
|
|
Math_Vec3f_Copy(&ice->pos, &spawnPos);
|
|
|
|
|
ice->status = 1;
|
|
|
|
@ -3165,6 +3179,8 @@ void BossSst_DrawEffect(Actor* thisx, GlobalContext* globalCtx) {
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < 18; i++) {
|
|
|
|
|
effect = &this->effects[i];
|
|
|
|
|
FrameInterpolation_RecordOpenChild(effect, effect->epoch);
|
|
|
|
|
|
|
|
|
|
if (effect->move) {
|
|
|
|
|
func_8003435C(&effect->pos, globalCtx);
|
|
|
|
|
if (this->effects[0].status != 0) {
|
|
|
|
@ -3182,6 +3198,8 @@ void BossSst_DrawEffect(Actor* thisx, GlobalContext* globalCtx) {
|
|
|
|
|
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
|
|
|
|
gSPDisplayList(POLY_XLU_DISP++, gBongoIceShardDL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FrameInterpolation_RecordCloseChild();
|
|
|
|
|
}
|
|
|
|
|
} else if (this->effectMode == BONGO_SHOCKWAVE) {
|
|
|
|
|
f32 scaleY = 0.005f;
|
|
|
|
@ -3193,6 +3211,7 @@ void BossSst_DrawEffect(Actor* thisx, GlobalContext* globalCtx) {
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < 3; i++, scaleY -= 0.001f) {
|
|
|
|
|
effect = &this->effects[i];
|
|
|
|
|
FrameInterpolation_RecordOpenChild(effect, effect->epoch);
|
|
|
|
|
|
|
|
|
|
if (effect->move != 0) {
|
|
|
|
|
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
|
|
|
|
@ -3205,6 +3224,8 @@ void BossSst_DrawEffect(Actor* thisx, GlobalContext* globalCtx) {
|
|
|
|
|
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
|
|
|
|
gSPDisplayList(POLY_XLU_DISP++, gEffFireCircleDL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FrameInterpolation_RecordCloseChild();
|
|
|
|
|
}
|
|
|
|
|
} else if (this->effectMode == BONGO_SHADOW) {
|
|
|
|
|
gDPSetPrimColor(POLY_XLU_DISP++, 0x00, 0x80, 10, 10, 80, 0);
|
|
|
|
@ -3212,12 +3233,16 @@ void BossSst_DrawEffect(Actor* thisx, GlobalContext* globalCtx) {
|
|
|
|
|
|
|
|
|
|
effect = &this->effects[0];
|
|
|
|
|
while (effect->status != -1) {
|
|
|
|
|
FrameInterpolation_RecordOpenChild(effect, effect->epoch);
|
|
|
|
|
|
|
|
|
|
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
|
|
|
|
|
Matrix_Scale(effect->scale * 0.001f, 1.0f, effect->scale * 0.001f, MTXMODE_APPLY);
|
|
|
|
|
|
|
|
|
|
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(globalCtx->state.gfxCtx),
|
|
|
|
|
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
|
|
|
|
gSPDisplayList(POLY_XLU_DISP++, sShadowDList);
|
|
|
|
|
|
|
|
|
|
FrameInterpolation_RecordCloseChild();
|
|
|
|
|
effect++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|