mirror of
https://github.com/sonicdcer/sf64.git
synced 2025-02-17 03:18:08 +00:00
comments
This commit is contained in:
parent
266c14c0e5
commit
4bc559b590
@ -561,7 +561,7 @@ typedef enum ObjectId {
|
||||
/* 252 */ OBJ_ACTOR_ZO_RADARBUOY, // Zoness searchlight.
|
||||
/* 253 */ OBJ_ACTOR_ZO_SUPPLYCRANE,
|
||||
/* 254 */ OBJ_ACTOR_ZO_SEARCHLIGHT,
|
||||
/* 255 */ OBJ_ACTOR_255,
|
||||
/* 255 */ OBJ_ACTOR_255, // OBJ_ACTOR_AQ_SANADA (Named after from SFX_ID)
|
||||
/* 256 */ OBJ_ACTOR_256,
|
||||
/* 257 */ OBJ_ACTOR_257,
|
||||
/* 258 */ OBJ_ACTOR_AQ_PEARL,
|
||||
|
@ -706,6 +706,7 @@ void Display_Arwing(Player* player, s32 reflectY) {
|
||||
}
|
||||
}
|
||||
|
||||
// Arwing only
|
||||
void Display_Reticle(Player* player) {
|
||||
Vec3f* translate;
|
||||
s32 i;
|
||||
|
@ -3328,8 +3328,9 @@ void func_effect_800815DC(void) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(gEffects); i++) {
|
||||
if ((gEffects[i].obj.id == OBJ_EFFECT_366 || (gEffects[i].obj.id == OBJ_EFFECT_395 && gEffects[i].state == 1) ||
|
||||
gEffects[i].obj.id == OBJ_EFFECT_364 || gEffects[i].obj.id == OBJ_EFFECT_346) &&
|
||||
if (((gEffects[i].obj.id == OBJ_EFFECT_366) ||
|
||||
((gEffects[i].obj.id == OBJ_EFFECT_395) && (gEffects[i].state == 1)) ||
|
||||
(gEffects[i].obj.id == OBJ_EFFECT_364) || (gEffects[i].obj.id == OBJ_EFFECT_346)) &&
|
||||
gEffects[i].obj.status == OBJ_ACTIVE) {
|
||||
gEffects[i].obj.status = OBJ_FREE;
|
||||
break;
|
||||
|
@ -643,6 +643,7 @@ void Aquas_801A9ED0(Player* player) {
|
||||
Aquas_801A9DE4(player);
|
||||
}
|
||||
|
||||
// Blue Marine Reticle
|
||||
void Aquas_801AA20C(void) {
|
||||
s32 i;
|
||||
f32 x;
|
||||
@ -1821,6 +1822,7 @@ void Aquas_801ADF7C(f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot,
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
}
|
||||
|
||||
// Bacoon Snake
|
||||
void Aquas_Actor255_Draw(Actor255* this) {
|
||||
s32 i;
|
||||
f32 xz;
|
||||
@ -2641,6 +2643,7 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 40);
|
||||
Radio_PlayMessage(gMsg_ID_15100, RCID_FOX);
|
||||
}
|
||||
|
||||
if (fabsf(this->obj.pos.z - gPlayer[0].trueZpos) <= 3000.0f) {
|
||||
D_i3_801C4190[6] = 1;
|
||||
this->timer_056 = 20;
|
||||
@ -2648,6 +2651,7 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
this->state = 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
if (this->timer_056 == 0) {
|
||||
D_i3_801C4308[14] = 80.0f;
|
||||
@ -2657,6 +2661,7 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
AUDIO_PLAY_SFX(NA_SE_BUBBLE_UP, this->sfxSource, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
Aquas_801B0FCC(this);
|
||||
if (!(this->timer_056 & 1)) {
|
||||
@ -2671,12 +2676,14 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
this->state = 3;
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
Aquas_801B0FCC(this);
|
||||
Math_SmoothStepToF(&D_i3_801C4308[12], -45.0f, 0.5f, 1.0f, 0.01f);
|
||||
Math_SmoothStepToF(&D_i3_801C4308[13], 30.0f, 0.5f, 1.0f, 0.01f);
|
||||
Math_SmoothStepToAngle(&D_i3_801C4308[14], 0.0f, 1.0f, 2.0f, 0.0f);
|
||||
Math_SmoothStepToAngle(&D_i3_801C4308[15], D_i3_801C0190[this->swork[AQ_SWK_20]], 1.0f, 10, 0.0f);
|
||||
|
||||
if (this->timer_056 == 0) {
|
||||
this->timer_056 = 10;
|
||||
this->swork[AQ_SWK_20]++;
|
||||
@ -2685,33 +2692,41 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 4:
|
||||
Aquas_801B0FCC(this);
|
||||
Math_SmoothStepToF(&D_i3_801C4308[58], 0.25f, 0.3f, 1.0f, 0.0f);
|
||||
|
||||
if (this->timer_056 == 0) {
|
||||
this->timer_056 = 20;
|
||||
this->state = 5;
|
||||
}
|
||||
break;
|
||||
|
||||
case 5:
|
||||
Aquas_801B0FCC(this);
|
||||
Math_SmoothStepToF(&D_i3_801C4308[58], 0.25f, 0.3f, 1.0f, 0.0f);
|
||||
|
||||
if (this->timer_056 == 0) {
|
||||
this->timer_056 = 30;
|
||||
this->state = 6;
|
||||
}
|
||||
break;
|
||||
|
||||
case 6:
|
||||
Aquas_801B0FCC(this);
|
||||
if (this->timer_056 == 0) {
|
||||
this->state = 7;
|
||||
}
|
||||
break;
|
||||
|
||||
case 7:
|
||||
this->swork[AQ_SWK_19] = 500;
|
||||
D_i3_801C4308[79] = -28.0f;
|
||||
|
||||
Math_SmoothStepToF(&D_i3_801C4308[54], 1.0f, 0.001f, 0.01f, 0.0f);
|
||||
Math_SmoothStepToF(&D_i3_801C4308[61], 1.0f, 0.001f, 0.01f, 0.0f);
|
||||
|
||||
if (D_i3_801C4308[54] >= 0.9f) {
|
||||
this->timer_056 = 20;
|
||||
D_i3_801C4308[79] = 0.0f;
|
||||
@ -2719,6 +2734,7 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
this->state = 8;
|
||||
}
|
||||
break;
|
||||
|
||||
case 8:
|
||||
if (this->timer_056 == 0) {
|
||||
this->timer_056 = 20;
|
||||
@ -2729,19 +2745,23 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
this->state = 9;
|
||||
}
|
||||
break;
|
||||
|
||||
case 9:
|
||||
if (this->timer_056 == 0) {
|
||||
this->state = 10;
|
||||
}
|
||||
break;
|
||||
|
||||
case 10:
|
||||
case 11:
|
||||
case 12:
|
||||
Aquas_801B1008(this, 500);
|
||||
break;
|
||||
|
||||
case 13:
|
||||
Aquas_801B1008(this, 60);
|
||||
break;
|
||||
|
||||
case 14:
|
||||
if (this->timer_056 == 58) {
|
||||
AUDIO_PLAY_SFX(NA_SE_EN_SHELL_FILLOPEN, this->sfxSource, 4);
|
||||
@ -2754,6 +2774,7 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
Radio_PlayMessage(gMsg_ID_15140, RCID_PEPPY);
|
||||
}
|
||||
break;
|
||||
|
||||
case 15:
|
||||
if (this->swork[AQ_SWK_2] == 0) {
|
||||
this->swork[AQ_SWK_2] = 100 + RAND_INT(50.0f);
|
||||
@ -2762,8 +2783,10 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
this->swork[AQ_SWK_3] = 100 + RAND_INT(50.0f);
|
||||
}
|
||||
break;
|
||||
|
||||
case 16:
|
||||
D_ctx_801779A8[0] = 20.0f;
|
||||
|
||||
if (gCameraShake == 0) {
|
||||
|
||||
gFillScreenAlpha = gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlphaTarget = 255;
|
||||
@ -2772,11 +2795,14 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
gFillScreenAlphaStep = 25;
|
||||
gCameraShake = 20 + RAND_FLOAT(20);
|
||||
}
|
||||
|
||||
if (gCameraShake == 29) {
|
||||
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0;
|
||||
}
|
||||
|
||||
Math_SmoothStepToF(&D_i3_801C41B8[25], D_bg_8015F970, 1.0f, 100, 0.f);
|
||||
Math_SmoothStepToF(&D_i3_801C41B8[26], 128.0f, 1.0f, 100, 0.f);
|
||||
|
||||
for (i3 = 0; i3 < AQ_LIMB_MAX; i3++) {
|
||||
if (sAqBacoonlimbTimers[i3] == 0) {
|
||||
sAqBacoonlimbTimers[i3] = 100;
|
||||
@ -2796,47 +2822,58 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
this->obj.pos.y + 200.0f + RAND_FLOAT_CENTERED(400.0f),
|
||||
this->obj.pos.z + 1000.0f + RAND_FLOAT_CENTERED(800.0f), 10.0f);
|
||||
}
|
||||
if (i3 && i3) {}
|
||||
|
||||
if (i3 && i3) {} //! FAKE
|
||||
|
||||
for (i3 = 0; i3 < 3; i3++) {
|
||||
func_effect_80081A8C(this->obj.pos.x + RAND_FLOAT_CENTERED(1200.0f),
|
||||
this->obj.pos.y + 200.0f + RAND_FLOAT_CENTERED(200.0f),
|
||||
this->obj.pos.z + 1000.0f + RAND_FLOAT_CENTERED(800.0f), 3.0f + RAND_FLOAT(3.0f),
|
||||
5);
|
||||
}
|
||||
|
||||
if (this->timer_056 == 0) {
|
||||
gEffects[98].obj.status = OBJ_FREE;
|
||||
gEffects[99].obj.status = OBJ_FREE;
|
||||
Effect_Effect383_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 600.0f, 40.0f);
|
||||
this->timer_056 = 50;
|
||||
|
||||
for (i3 = 0; i3 < AQ_LIMB_MAX; i3++) {
|
||||
sAqBacoonlimbTimers[i3] = 100;
|
||||
}
|
||||
|
||||
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0;
|
||||
this->state = 17;
|
||||
}
|
||||
break;
|
||||
|
||||
case 17:
|
||||
if (this->timer_056 == 20) {
|
||||
gEffects[96].obj.status = OBJ_FREE;
|
||||
gEffects[97].obj.status = OBJ_FREE;
|
||||
Effect_Effect383_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 600.0f, 80.0f);
|
||||
}
|
||||
|
||||
D_i3_801C42A0[0] -= 4;
|
||||
if (D_i3_801C42A0[0] < 0) {
|
||||
D_i3_801C42A0[0] = 0;
|
||||
}
|
||||
|
||||
for (i3 = 0; i3 < 21; i3++) {
|
||||
Math_SmoothStepToF(&D_i3_801C4308[52 + i3], 0.1f, 0.1f, 1.0f, 0.0f);
|
||||
}
|
||||
|
||||
Math_SmoothStepToF(&this->fwork[AQ_FWK_8], 0.1f, 0.1f, 1.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->fwork[AQ_FWK_9], 0.1f, 0.1f, 1.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->fwork[AQ_FWK_10], 0.1f, 0.1f, 1.0f, 0.0f);
|
||||
if (((gGameFrameCount % 2) == 0)) {
|
||||
|
||||
if ((gGameFrameCount % 2) == 0) {
|
||||
Effect_Effect390_Spawn(this->obj.pos.x + RAND_FLOAT_CENTERED(1200.0f),
|
||||
this->obj.pos.y + 400.0f + RAND_FLOAT_CENTERED(400.0f),
|
||||
this->obj.pos.z + 1000.0f + RAND_FLOAT_CENTERED(800.0f), this->vel.x,
|
||||
this->vel.y, this->vel.z, 0.7f, 15);
|
||||
}
|
||||
|
||||
if (this->timer_056 == 1) {
|
||||
for (i3 = 0; i3 < AQ_LIMB_MAX; i3++) {
|
||||
if (i3 != AQ_LIMB_27) {
|
||||
@ -2849,6 +2886,7 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
this->state = 18;
|
||||
}
|
||||
break;
|
||||
|
||||
case 18:
|
||||
if (this->timer_056 != 0) {
|
||||
for (i3 = 0; i3 < 30; i3++) {
|
||||
@ -2859,6 +2897,7 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
switch (this->swork[AQ_SWK_0]) {
|
||||
case 0:
|
||||
if (D_i3_801C42A0[23] == 0) {
|
||||
@ -2868,14 +2907,17 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
}
|
||||
Math_SmoothStepToF(&D_i3_801C4308[10], D_i3_801C4308[79], 0.05f, 0.3f, 0.0f);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
Math_SmoothStepToF(&D_i3_801C4308[10], -28.0f, 0.05f, 0.3f, 0.0f);
|
||||
if (this->timer_052 < 3) {
|
||||
Aquas_801B0F88(this);
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
break;
|
||||
|
||||
case 3:
|
||||
Math_SmoothStepToF(&D_i3_801C4308[10], D_i3_801C4308[79], 0.5f, 10.0f, 0.0f);
|
||||
if (fabsf(D_i3_801C4308[10]) <= 5.0f) {
|
||||
@ -2883,7 +2925,9 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
this->timer_052 = 0;
|
||||
this->swork[AQ_SWK_19] = 500;
|
||||
D_i3_801C4308[79] = 0.0f;
|
||||
|
||||
AUDIO_PLAY_SFX(NA_SE_EN_SHELL_CLOSE, this->sfxSource, 4);
|
||||
|
||||
if (this->state < 14) {
|
||||
for (i3 = 0, actor = &gActors[0]; i3 < ARRAY_COUNT(gActors); i3++, actor++) {
|
||||
if ((actor->obj.id == OBJ_ACTOR_AQ_GAROA) && (actor->obj.status == OBJ_ACTIVE)) {
|
||||
@ -2896,6 +2940,7 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
AUDIO_PLAY_SFX(NA_SE_WATER_PRESSURE, this->sfxSource, 0);
|
||||
func_enmy_80062B60(this->obj.pos.x, this->obj.pos.z + 800.0f, 0, 100.0f);
|
||||
var_fs3 = 80.0f;
|
||||
|
||||
for (i2 = 0; i2 < 3; i2++, var_fs3 += 10.0f) {
|
||||
for (i3 = 0; i3 < 9; i3++) {
|
||||
var_fs0 = SIN_DEG((27 + 2 * i3) * (10.0f + 3 * i2)) * var_fs3 * 10.0f;
|
||||
@ -2908,6 +2953,7 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 4:
|
||||
this->swork[AQ_SWK_19] = 50;
|
||||
Math_SmoothStepToF(&D_i3_801C4308[10], D_i3_801C4308[79], 0.5f, 5.0f, 0.0f);
|
||||
@ -2929,8 +2975,10 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Math_SmoothStepToF(&D_i3_801C4308[80], 0.0f, 1.0f, 2.0f, 0);
|
||||
Math_SmoothStepToF(&D_i3_801C4308[11], D_i3_801C4308[80], 0.1f, 2.0f, 0);
|
||||
|
||||
if (this->dmgType != DMG_NONE) {
|
||||
this->dmgType = DMG_NONE;
|
||||
if (fabsf(D_i3_801C4308[10]) >= 5.0f) {
|
||||
@ -2948,6 +2996,7 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4);
|
||||
}
|
||||
break;
|
||||
|
||||
case 14:
|
||||
if (this->damage == 31) {
|
||||
if (D_i3_801C42A0[23] != 0) {
|
||||
@ -2967,6 +3016,7 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 15:
|
||||
if (this->damage == 31) {
|
||||
if (D_i3_801C42A0[23] != 0) {
|
||||
@ -2986,6 +3036,7 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 16:
|
||||
if (this->damage == 31) {
|
||||
if (D_i3_801C42A0[23] != 0) {
|
||||
@ -2995,6 +3046,7 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 17:
|
||||
if (this->damage == 31) {
|
||||
if (D_i3_801C42A0[23] != 0) {
|
||||
@ -3004,6 +3056,7 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 18:
|
||||
if ((this->damage == 31) && (this->swork[AQ_SWK_1] != 2) && (this->swork[AQ_SWK_12] == 0) &&
|
||||
(this->state == 15) && (this->health != 0)) {
|
||||
@ -3051,6 +3104,7 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 19:
|
||||
case 20:
|
||||
if (this->damage == 31) {
|
||||
@ -3061,22 +3115,26 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this->state >= 15) {
|
||||
switch (this->swork[AQ_SWK_1]) {
|
||||
case 0:
|
||||
Math_SmoothStepToF(&D_i3_801C4308[12], -45.0f, 1.0f, this->fwork[AQ_FWK_1], 0.01f);
|
||||
Math_SmoothStepToF(&D_i3_801C4308[13], 30.0f, 1.0f, this->fwork[AQ_FWK_1], 0.01f);
|
||||
|
||||
if ((this->timer_050 == 0) && (*(&D_i3_801C4308[12]) == -45.0f)) {
|
||||
this->timer_050 = 7;
|
||||
this->swork[AQ_SWK_1]++;
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
var_fs0 = 2.0f * this->fwork[AQ_FWK_1];
|
||||
Math_SmoothStepToF(&D_i3_801C4308[12], 0.0f, 1.0f, var_fs0, 0.0001f);
|
||||
@ -3086,6 +3144,7 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
this->timer_050 = 40.0f - ((this->health - 150) / 5.0f);
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (D_i3_801C42A0[7] != 0) {
|
||||
Math_SmoothStepToF(&D_i3_801C4308[12], -80.0f, 1.0f, 10.0f, 0.0001f);
|
||||
@ -3097,9 +3156,11 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
this->swork[AQ_SWK_14] += D_i3_801C0150[this->swork[AQ_SWK_18]][0];
|
||||
this->swork[AQ_SWK_15] += D_i3_801C0150[this->swork[AQ_SWK_18]][1];
|
||||
this->swork[AQ_SWK_16] += D_i3_801C0150[this->swork[AQ_SWK_18]][2];
|
||||
|
||||
if (this->swork[AQ_SWK_14] < 0) {
|
||||
this->swork[AQ_SWK_14] = 0;
|
||||
}
|
||||
@ -3114,6 +3175,7 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
this->swork[AQ_SWK_18]++;
|
||||
this->swork[AQ_SWK_18] &= 3;
|
||||
}
|
||||
|
||||
if ((this->state >= 4) && (this->state < 16)) {
|
||||
sp104 = gPlayer[0].pos.x - this->obj.pos.x;
|
||||
sp100 = gPlayer[0].pos.y - this->obj.pos.y;
|
||||
@ -3128,16 +3190,19 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
Math_SmoothStepToAngle(&D_i3_801C4308[14], spE4, 1.0f, 5.0f, 0.001f);
|
||||
}
|
||||
}
|
||||
|
||||
for (i3 = 0; i3 < 6; i3++) {
|
||||
if ((D_i3_801C42A0[i3 + 1] == 0) && (this->state < 17)) {
|
||||
if ((i3 + 1 != this->swork[AQ_SWK_6]) && (i3 + 1 != this->swork[AQ_SWK_7])) {
|
||||
i2 = D_i3_801C42A0[i3 + 16];
|
||||
|
||||
Math_SmoothStepToF(&D_i3_801C4308[52 + i3], D_i3_801BFC94[4 * i3 + i2].x, D_i3_801BFE18[4 * i3 + i2].x,
|
||||
D_i3_801BFF38[4 * i3 + i2].x, 0.00001f);
|
||||
Math_SmoothStepToF(&D_i3_801C4308[59 + i3], D_i3_801BFC94[4 * i3 + i2].y, D_i3_801BFE18[4 * i3 + i2].y,
|
||||
D_i3_801BFF38[4 * i3 + i2].y, 0.00001f);
|
||||
Math_SmoothStepToF(&D_i3_801C4308[66 + i3], D_i3_801BFC94[4 * i3 + i2].z, D_i3_801BFE18[4 * i3 + i2].z,
|
||||
D_i3_801BFF38[4 * i3 + i2].z, 0.00001f);
|
||||
|
||||
D_i3_801C42A0[i3 + 10]++;
|
||||
if (D_i3_801C42A0[i3 + 10] >= D_i3_801BFDB4[4 * i3 + i2]) {
|
||||
D_i3_801C42A0[i3 + 16]++;
|
||||
@ -3163,6 +3228,7 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
spF0 = sqrtf(SQ(spF8) + SQ(spF0));
|
||||
spE4 = Math_RadToDeg(-Math_Atan2F(sp100, spFC));
|
||||
spEC = Math_RadToDeg(-Math_Atan2F(spF4, spF0));
|
||||
|
||||
if ((spE8 <= 15.0f) || (spE8 >= 310.0f)) {
|
||||
Math_SmoothStepToAngle(&D_i3_801C4308[18], spE8, 1.0f, 5.0f, 0.001f);
|
||||
}
|
||||
@ -3175,6 +3241,7 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
if ((spEC <= 12.0f) || (spEC >= 330.0f)) {
|
||||
Math_SmoothStepToAngle(&D_i3_801C4308[17], spEC, 1.0f, 5.0f, 0.001f);
|
||||
}
|
||||
|
||||
if ((this->swork[AQ_SWK_2] == 1) && (this->swork[AQ_SWK_8] != 0) && (this->health != 0) &&
|
||||
(this->swork[AQ_SWK_6] == 0)) {
|
||||
D_i3_801C42A0[10] = D_i3_801C42A0[16] = 0;
|
||||
@ -3185,16 +3252,19 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
D_i3_801C42A0[11] = D_i3_801C42A0[17] = 0;
|
||||
this->swork[AQ_SWK_7] = 2;
|
||||
}
|
||||
|
||||
if (this->health != 0) {
|
||||
for (i7 = 0; i7 < 2; i7++) {
|
||||
if (this->swork[AQ_SWK_6 + i7] != 0) {
|
||||
i2 = this->swork[AQ_SWK_4 + i7];
|
||||
|
||||
Math_SmoothStepToF(&D_i3_801C4308[52 + i7], D_i3_801C00B0[0][i2], D_i3_801C00F0[0][i2],
|
||||
D_i3_801C0120[0][i2], 0.00001f);
|
||||
Math_SmoothStepToF(&D_i3_801C4308[59 + i7], D_i3_801C00B0[1][i2], D_i3_801C00F0[1][i2],
|
||||
D_i3_801C0120[1][i2], 0.00001f);
|
||||
Math_SmoothStepToF(&D_i3_801C4308[66 + i7], D_i3_801C00B0[2][i2], D_i3_801C00F0[2][i2],
|
||||
D_i3_801C0120[2][i2], 0.00001f);
|
||||
|
||||
D_i3_801C42A0[i7 + 10]++;
|
||||
if (D_i3_801C42A0[i7 + 10] >= D_i3_801C00E0[i2]) {
|
||||
this->swork[AQ_SWK_4 + i7]++;
|
||||
@ -3213,9 +3283,11 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
spD4.x = D_i3_801C4308[73 + 3 * i7];
|
||||
spD4.y = D_i3_801C4308[74 + 3 * i7];
|
||||
spD4.z = D_i3_801C4308[75 + 3 * i7];
|
||||
|
||||
Effect_SpawnTimedSfxAtPos(&spD4, NA_SE_EN_P_BALL_SHOT);
|
||||
|
||||
i2 = 0;
|
||||
for (i3 = 0; i2 <= i && i3 < ARRAY_COUNT(gActors); i3++) {
|
||||
for (i3 = 0; (i2 <= i) && (i3 < ARRAY_COUNT(gActors)); i3++) {
|
||||
if ((gActors[i3].obj.status == OBJ_FREE) && (i3 < ARRAY_COUNT(gActors))) {
|
||||
Actor_Initialize(&gActors[i3]);
|
||||
|
||||
@ -3224,6 +3296,7 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
gActors[i3].obj.pos.x = D_i3_801C4308[73 + 3 * i7];
|
||||
gActors[i3].obj.pos.y = D_i3_801C4308[74 + 3 * i7] + 30.0f;
|
||||
gActors[i3].obj.pos.z = D_i3_801C4308[75 + 3 * i7] + 150.0f;
|
||||
|
||||
if (Rand_ZeroOne() < 0.5f) {
|
||||
var_fs1 = Math_ModF(D_i3_801C4308[i7 + 16] + RAND_FLOAT_CENTERED(60.0f), 360.0f);
|
||||
var_fs0 = Math_ModF(D_i3_801C4308[i7 + 18] + RAND_FLOAT_CENTERED(60.0f), 360.0f);
|
||||
@ -3244,6 +3317,7 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
var_fs1 = Math_ModF(D_i3_801C4308[i7 + 16] + RAND_FLOAT_CENTERED(30.0f), 360.0f);
|
||||
var_fs0 = Math_ModF(D_i3_801C4308[i7 + 18] + RAND_FLOAT_CENTERED(30.0f), 360.0f);
|
||||
}
|
||||
|
||||
gActors[i3].fwork[3] = var_fs1;
|
||||
gActors[i3].fwork[4] = var_fs0;
|
||||
// gActors[i3].timer_0BC = i2 * 3;
|
||||
@ -3266,6 +3340,7 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (i7 = 26; i7 < 107; i7 += 10) {
|
||||
var_fs0 = D_i3_801C4308[10] - 10;
|
||||
if (fabsf(D_i3_801C4308[10]) <= 5.0f) {
|
||||
@ -3273,6 +3348,7 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
}
|
||||
this->info.hitbox[i7] = var_fs0;
|
||||
}
|
||||
|
||||
if (this->state >= 10) {
|
||||
sp110 = D_i3_801C42A0[9];
|
||||
i2 = (gGameFrameCount & 0x1F); // % 0x20 if possible
|
||||
@ -3285,9 +3361,11 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
}
|
||||
D_i3_801C42A0[9] = sp110;
|
||||
}
|
||||
|
||||
if (D_i3_801C42A0[7] != 0) {
|
||||
Math_SmoothStepToF(&D_ctx_801779A8[0], 20.0f, 1.0f, 5.0f, 0);
|
||||
}
|
||||
|
||||
for (i2 = 45, i3 = 1, i7 = 0; i7 < 14; i3++, i2++, i7 += 2) {
|
||||
if (D_i3_801C42A0[i3] != 0) {
|
||||
D_i3_801C4308[i2] = SIN_DEG(D_i3_801C0060[i7 + 0] * D_i3_801C42A0[i3]) *
|
||||
@ -3295,6 +3373,7 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
D_i3_801C42A0[i3]--;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->swork[AQ_SWK_12] != 0) {
|
||||
if (D_i3_801C42A0[3] != 0) {
|
||||
var_fs3 = 1.0f;
|
||||
@ -3333,12 +3412,15 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((D_i3_801C42A0[7] != 0) || (this->state >= 16)) {
|
||||
var_fs3 = 0.25f;
|
||||
} else {
|
||||
var_fs3 = 1.0f;
|
||||
}
|
||||
|
||||
Math_SmoothStepToF(&D_i3_801C4308[58], var_fs3, 0.3f, 1.0f, 0);
|
||||
|
||||
for (i3 = 0; i3 < 2; i3++) {
|
||||
if (this->swork[AQ_SWK_8 + i3] == 0) {
|
||||
if (this->swork[AQ_SWK_10 + i3] == 1) {
|
||||
@ -3347,6 +3429,7 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
spD4.z = D_i3_801C4308[75 + 3 * i3];
|
||||
Effect_SpawnTimedSfxAtPos(&spD4, NA_SE_EN_P_GUN_APPEAR);
|
||||
}
|
||||
|
||||
if ((fabsf(D_i3_801C4308[10]) <= 3.0f) || (this->swork[AQ_SWK_10 + i3] == 0)) {
|
||||
Math_SmoothStepToF(&D_i3_801C4308[52 + i3], 1.0f, 0.1f, 0.5f, 0.0f);
|
||||
Math_SmoothStepToF(&D_i3_801C4308[59 + i3], 1.0f, 0.1f, 0.5f, 0.0f);
|
||||
@ -3368,6 +3451,7 @@ void Aquas_AqBacoon_Update(AqBacoon* this) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this->swork[AQ_SWK_2] != 0) {
|
||||
this->swork[AQ_SWK_2]--;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user