Fight and other docu
This commit is contained in:
@@ -5,18 +5,10 @@
|
||||
#include <core1/viewport.h>
|
||||
#include "core2/particle.h"
|
||||
|
||||
extern void subaddie_set_state_with_direction(Actor *, s32, f32, s32);
|
||||
extern void func_80386654(f32 arg0, f32 (*arg1)[4], f32 (*arg2)[4]);
|
||||
extern void func_80324CFC(f32, enum comusic_e, s32);
|
||||
extern void func_80387470(Actor *, f32 [3], f32, f32, f32, f32, f32);
|
||||
extern void func_80329904(ActorMarker*, s32, f32*);
|
||||
|
||||
|
||||
void chBossJinjo_update(Actor *this);
|
||||
void chBossJinjo_func_8038D014(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorAnimationInfo chBossJinjoAnimations[] = {
|
||||
ActorAnimationInfo chBossJinjoAnimationInfo[] = {
|
||||
{0, 0.0f},
|
||||
{0x264, 1000000.0f},
|
||||
{0x264, 2.26f},
|
||||
@@ -25,159 +17,125 @@ ActorAnimationInfo chBossJinjoAnimations[] = {
|
||||
{0x262, 2.0f}
|
||||
};
|
||||
|
||||
ActorInfo chBossJinjoOrange = {
|
||||
MARKER_27B_BOSS_JINJO_ORANGE, ACTOR_3A5_BOSS_JINJO_ORANGE, ASSET_3BC_MODEL_JINJO_ORANGE,
|
||||
0x1, chBossJinjoAnimations,
|
||||
chBossJinjo_update, chBossJinjo_func_8038D014, actor_draw,
|
||||
0, 0, 1.0f, 0
|
||||
};
|
||||
ActorInfo chBossJinjoOrange = { MARKER_27B_BOSS_JINJO_ORANGE, ACTOR_3A5_BOSS_JINJO_ORANGE, ASSET_3BC_MODEL_JINJO_ORANGE, 1, chBossJinjoAnimationInfo, chBossJinjo_update, chBossJinjo_update2, actor_draw, 0, 0, 1.0f, 0 };
|
||||
ActorInfo chBossJinjoGreen = { MARKER_27C_BOSS_JINJO_GREEN, ACTOR_3A6_BOSS_JINJO_GREEN, ASSET_3C2_MODEL_JINJO_GREEN, 1, chBossJinjoAnimationInfo, chBossJinjo_update, chBossJinjo_update2, actor_draw, 0, 0, 1.0f, 0 };
|
||||
ActorInfo chBossJinjoPink = { MARKER_27D_BOSS_JINJO_PINK, ACTOR_3A7_BOSS_JINJO_PINK, ASSET_3C1_MODEL_JINJO_PINK, 1, chBossJinjoAnimationInfo, chBossJinjo_update, chBossJinjo_update2, actor_draw, 0, 0, 1.0f, 0 };
|
||||
ActorInfo chBossJinjoYellow = { MARKER_27E_BOSS_JINJO_YELLOW, ACTOR_3A8_BOSS_JINJO_YELLOW, ASSET_3BB_MODEL_JINJO_YELLOW, 1, chBossJinjoAnimationInfo, chBossJinjo_update, chBossJinjo_update2, actor_draw, 0, 0, 1.0f, 0 };
|
||||
|
||||
ActorInfo chBossJinjoGreen = {
|
||||
MARKER_27C_BOSS_JINJO_GREEN, ACTOR_3A6_BOSS_JINJO_GREEN, ASSET_3C2_MODEL_JINJO_GREEN,
|
||||
0x1, chBossJinjoAnimations,
|
||||
chBossJinjo_update, chBossJinjo_func_8038D014, actor_draw,
|
||||
0, 0, 1.0f, 0
|
||||
};
|
||||
ParticleSettingsVelocityAccelerationPosition chBossJinjoSpriteSettings1 = { { { -420.0f, 410.0f, -420.0f }, { 480.0f, 860.0f, 480.0f } }, { { 0.0f, -1200.0f, 0.0f }, { 0.0f, -1200.0f, 0.0f } }, { { 0.0f, -20.0f, 0.0f }, { 0.0f, 20.0f, 0.0f } } };
|
||||
ParticleSettingsVelocityPosition chBossJinjoSpriteSettings2 = { { { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, { { -80.0f, -80.0f, -80.0f }, { 80.0f, 80.0f, 80.0f } } };
|
||||
f32 D_80391948[4] = { 1.0f, 1.0f, 1.0f, 1.0f };
|
||||
f32 D_80391958[4] = { 0.33f, 0.33f, 0.33f, 1.0f };
|
||||
ParticleScaleAndLifetimeRanges sFightBlastParticleSettings = { { 0.1f, 0.1f }, { 10.0f, 10.0f }, { 0.0f, 0.01f }, { 0.8f, 0.8f }, 0.1f, 0.1f };
|
||||
|
||||
ActorInfo chBossJinjoPink = {
|
||||
MARKER_27D_BOSS_JINJO_PINK, ACTOR_3A7_BOSS_JINJO_PINK, ASSET_3C1_MODEL_JINJO_PINK,
|
||||
0x1, chBossJinjoAnimations,
|
||||
chBossJinjo_update, chBossJinjo_func_8038D014, actor_draw,
|
||||
0, 0, 1.0f, 0
|
||||
};
|
||||
|
||||
ActorInfo chBossJinjoYellow = {
|
||||
MARKER_27E_BOSS_JINJO_YELLOW, ACTOR_3A8_BOSS_JINJO_YELLOW, ASSET_3BB_MODEL_JINJO_YELLOW,
|
||||
0x1, chBossJinjoAnimations,
|
||||
chBossJinjo_update, chBossJinjo_func_8038D014, actor_draw,
|
||||
0, 0, 1.0f, 0
|
||||
};
|
||||
|
||||
struct43s D_803918D0 = {
|
||||
{ {-420.0f, 410.0f, -420.0f}, {480.0f, 860.0f, 480.0f}},
|
||||
{{0.0f, -1200.0f, 0.0f}, {0.0f, -1200.0f, 0.0f}},
|
||||
{{0.0f, -20.0f, 0.0f}, {0.0f, 20.0f, 0.0f}}
|
||||
};
|
||||
|
||||
struct42s D_80391918 = {
|
||||
{ {0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f}},
|
||||
{ {-80.0f, -80.0f, -80.0f}, {80.0f, 80.0f, 80.0f}}
|
||||
};
|
||||
|
||||
f32 D_80391948[4] = {1.0f, 1.0f, 1.0f, 1.0f};
|
||||
|
||||
f32 D_80391958[4] = {0.33f, 0.33f, 0.33f, 1.0f};
|
||||
|
||||
ParticleScaleAndLifetimeRanges D_80391968 = {
|
||||
{0.1f, 0.1f}, {10.0f, 10.0f}, {0.0f, 0.01f}, {0.8f, 0.8f}, 0.1f, 0.1f
|
||||
};
|
||||
|
||||
/* .code */
|
||||
void fight_func_8038C2C0(f32 position[3], s32 count, enum asset_e id, f32 arg3){
|
||||
ParticleEmitter * temp_s0 = partEmitMgr_newEmitter(count);
|
||||
f32 sp24;
|
||||
|
||||
particleEmitter_setSprite(temp_s0, id);
|
||||
particleEmitter_setStartingFrameRange(temp_s0, 1, 6);
|
||||
particleEmitter_setPosition(temp_s0, position);
|
||||
particleEmitter_setAngularVelocityRange(temp_s0, -300.0f, -300.0f, -300.0f, 300.0f, 300.0f, 300.0f);
|
||||
particleEmitter_setStartingScaleRange(temp_s0, arg3*0.35, arg3*0.65);
|
||||
particleEmitter_setFinalScaleRange(temp_s0, 0.0f, 0.0f);
|
||||
func_802EF9F8(temp_s0, 0.5f);
|
||||
func_802EFA18(temp_s0, 3);
|
||||
particleEmitter_setSpawnIntervalRange(temp_s0, 0.0f, 0.01f);
|
||||
particleEmitter_setParticleLifeTimeRange(temp_s0, 3.0f, 3.3f);
|
||||
particleEmitter_setFade(temp_s0, 0.0f, 0.35f);
|
||||
particleEmitter_setPositionVelocityAndAccelerationRanges(temp_s0, &D_803918D0);
|
||||
particleEmitter_setDrawMode(temp_s0, 4);
|
||||
particleEmitter_emitN(temp_s0, count);
|
||||
void chbossjinjo_createSpriteParticles(f32 position[3], s32 count, enum asset_e sprite_id, f32 scale) {
|
||||
ParticleEmitter *pCtrl = partEmitMgr_newEmitter(count);
|
||||
particleEmitter_setSprite(pCtrl, sprite_id);
|
||||
particleEmitter_setStartingFrameRange(pCtrl, 1, 6);
|
||||
particleEmitter_setPosition(pCtrl, position);
|
||||
particleEmitter_setAngularVelocityRange(pCtrl, -300.0f, -300.0f, -300.0f, 300.0f, 300.0f, 300.0f);
|
||||
particleEmitter_setStartingScaleRange(pCtrl, scale * 0.35, scale * 0.65);
|
||||
particleEmitter_setFinalScaleRange(pCtrl, 0.0f, 0.0f);
|
||||
particleEmitter_func_802EF9F8(pCtrl, 0.5f);
|
||||
particleEmitter_func_802EFA18(pCtrl, 3);
|
||||
particleEmitter_setSpawnIntervalRange(pCtrl, 0.0f, 0.01f);
|
||||
particleEmitter_setParticleLifeTimeRange(pCtrl, 3.0f, 3.3f);
|
||||
particleEmitter_setFade(pCtrl, 0.0f, 0.35f);
|
||||
particleEmitter_setVelocityAccelerationAndPositionRanges(pCtrl, &chBossJinjoSpriteSettings1);
|
||||
particleEmitter_setDrawMode(pCtrl, 4);
|
||||
particleEmitter_emitN(pCtrl, count);
|
||||
}
|
||||
|
||||
void func_8038C424(f32 position[3], s32 count, enum asset_e id, f32 arg3){
|
||||
ParticleEmitter * temp_s0 = partEmitMgr_newEmitter(count);
|
||||
f32 sp24;
|
||||
|
||||
particleEmitter_setSprite(temp_s0, id);
|
||||
particleEmitter_setStartingFrameRange(temp_s0, 0, 9);
|
||||
particleEmitter_setParticleFramerateRange(temp_s0, 12.0f, 12.0f);
|
||||
particleEmitter_setPosition(temp_s0, position);
|
||||
particleEmitter_setPositionAndVelocityRanges(temp_s0, &D_80391918);
|
||||
sp24 = arg3 * 5.0;
|
||||
particleEmitter_setStartingScaleRange(temp_s0, sp24, sp24);
|
||||
particleEmitter_setFinalScaleRange(temp_s0, sp24, sp24);
|
||||
particleEmitter_setSpawnIntervalRange(temp_s0, 0.0f, 0.0f);
|
||||
particleEmitter_setParticleLifeTimeRange(temp_s0, (arg3*0.5), (arg3*0.5)*1.5);
|
||||
particleEmitter_setFade(temp_s0, 0.7f, 0.8f);
|
||||
particleEmitter_setDrawMode(temp_s0, PART_EMIT_NO_DEPTH);
|
||||
particleEmitter_emitN(temp_s0, count);
|
||||
void chbossjinjo_createNonShrinkingSpriteParticles(f32 position[3], s32 count, enum asset_e sprite_id, f32 scale) {
|
||||
ParticleEmitter *pCtrl = partEmitMgr_newEmitter(count);
|
||||
f32 scale_adjusted = scale * 5.0;
|
||||
particleEmitter_setSprite(pCtrl, sprite_id);
|
||||
particleEmitter_setStartingFrameRange(pCtrl, 0, 9);
|
||||
particleEmitter_setParticleFramerateRange(pCtrl, 12.0f, 12.0f);
|
||||
particleEmitter_setPosition(pCtrl, position);
|
||||
particleEmitter_setPositionAndVelocityRanges(pCtrl, &chBossJinjoSpriteSettings2);
|
||||
particleEmitter_setStartingScaleRange(pCtrl, scale_adjusted, scale_adjusted);
|
||||
particleEmitter_setFinalScaleRange(pCtrl, scale_adjusted, scale_adjusted);
|
||||
particleEmitter_setSpawnIntervalRange(pCtrl, 0.0f, 0.0f);
|
||||
particleEmitter_setParticleLifeTimeRange(pCtrl, scale * 0.5, scale * 0.5 * 1.5);
|
||||
particleEmitter_setFade(pCtrl, 0.7f, 0.8f);
|
||||
particleEmitter_setDrawMode(pCtrl, PART_EMIT_NO_DEPTH);
|
||||
particleEmitter_emitN(pCtrl, count);
|
||||
}
|
||||
|
||||
void fight_func_8038C588(void){
|
||||
func_80386654(1.0f, &D_80391958, &D_80391948);
|
||||
void chbossjinjo_func_8038C588(void) {
|
||||
chfinalboss_func_80386654(1.0f, D_80391958, D_80391948);
|
||||
}
|
||||
|
||||
void fight_func_8038C5BC(void){
|
||||
func_80386654(1.0f, &D_80391948, &D_80391958);
|
||||
void chbossjinjo_func_8038C5BC(void) {
|
||||
chfinalboss_func_80386654(1.0f, D_80391948, D_80391958);
|
||||
}
|
||||
|
||||
void chbossjinjo_spawnParticles(Actor *this, enum asset_e arg1, enum asset_e arg2, f32 arg3){
|
||||
f32 sp1C[3];
|
||||
fight_func_8038C0DC(&sp1C);
|
||||
fight_func_8038C2C0(this->position, 0x20, arg1, arg3);
|
||||
func_8038C424(this->position, 4, arg2, arg3);
|
||||
timedFunc_set_0(0.0f, fight_func_8038C588);
|
||||
timedFunc_set_0(0.3f, fight_func_8038C5BC);
|
||||
void chbossjinjo_spawnParticlesAtFinalBoss(Actor *this, enum asset_e sprite1_id, enum asset_e sprite2_id, f32 scale) {
|
||||
f32 position_finalboss[3];
|
||||
|
||||
chfinalboss_getPosition(position_finalboss);
|
||||
chbossjinjo_createSpriteParticles(this->position, 32, sprite1_id, scale);
|
||||
chbossjinjo_createNonShrinkingSpriteParticles(this->position, 4, sprite2_id, scale);
|
||||
timedFunc_set_0(0.0f, chbossjinjo_func_8038C588);
|
||||
timedFunc_set_0(0.3f, chbossjinjo_func_8038C5BC);
|
||||
}
|
||||
|
||||
void chbossjinjo_spawnAttackParticles(Actor *this){
|
||||
void chbossjinjo_spawnAttackParticles(Actor *this) {
|
||||
s32 sparkle_sprite_id;
|
||||
s32 smoke_sprite_id;
|
||||
switch(this->marker->id){
|
||||
|
||||
switch (this->marker->id) {
|
||||
default:
|
||||
sparkle_sprite_id = ASSET_718_SPRITE_SPARKLE_WHITE_2;
|
||||
smoke_sprite_id = ASSET_6C2_SPRITE_SMOKE_WHITE;
|
||||
break;
|
||||
|
||||
case MARKER_27B_BOSS_JINJO_ORANGE:
|
||||
sparkle_sprite_id = ASSET_71B_SPRITE_SPARKLE_ORANGE_2;
|
||||
smoke_sprite_id = ASSET_6C5_SPRITE_SMOKE_ORANGE;
|
||||
break;
|
||||
|
||||
case MARKER_27C_BOSS_JINJO_GREEN:
|
||||
sparkle_sprite_id = ASSET_719_SPRITE_SPARKLE_GREEN_2;
|
||||
smoke_sprite_id = ASSET_6C3_SPRITE_SMOKE_GREEN;
|
||||
break;
|
||||
|
||||
case MARKER_27D_BOSS_JINJO_PINK:
|
||||
sparkle_sprite_id = ASSET_71A_SPRITE_SPARKLE_PINK_2;
|
||||
smoke_sprite_id = ASSET_6C6_SPRITE_SMOKE_PINK;
|
||||
break;
|
||||
|
||||
case MARKER_27E_BOSS_JINJO_YELLOW:
|
||||
sparkle_sprite_id = ASSET_717_SPRITE_SPARKLE_YELLOW_2;
|
||||
smoke_sprite_id = ASSET_6C4_SPRITE_SMOKE_YELLOW;
|
||||
break;
|
||||
}
|
||||
chbossjinjo_spawnParticles(this, sparkle_sprite_id, smoke_sprite_id, 1.0f);
|
||||
|
||||
chbossjinjo_spawnParticlesAtFinalBoss(this, sparkle_sprite_id, smoke_sprite_id, 1.0f);
|
||||
}
|
||||
|
||||
void chbossjinjo_rotateYaw(Actor *this, s16 angle) {
|
||||
f32 old_yaw = this->yaw;
|
||||
|
||||
void fight_func_8038C6FC(Actor *this, s16 arg1){
|
||||
f32 temp_f2 = this->yaw;
|
||||
f32 tick = time_getDelta();
|
||||
|
||||
old_yaw -= (time_getDelta() * angle) / 45.0;
|
||||
|
||||
temp_f2 -= (tick*arg1)/45.0;
|
||||
if(360.0f <= temp_f2){
|
||||
temp_f2 -= 360.0f;
|
||||
if (360.0f <= old_yaw) {
|
||||
old_yaw -= 360.0f;
|
||||
}
|
||||
else{
|
||||
if(temp_f2 < 0.0f)
|
||||
temp_f2 += 360.0f;
|
||||
else {
|
||||
if (old_yaw < 0.0f)
|
||||
old_yaw += 360.0f;
|
||||
}
|
||||
this->yaw = temp_f2;
|
||||
|
||||
this->yaw = old_yaw;
|
||||
}
|
||||
|
||||
void func_8038C79C(Actor *this){
|
||||
void chbossjinjo_func_8038C79C(Actor *this) {
|
||||
int i;
|
||||
for(i = 0; i < 4; i++){
|
||||
if(randf() < 0.3){
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (randf() < 0.3) {
|
||||
func_8033E73C(this->marker, i + 5, func_80329904);
|
||||
func_8033E3F0(8, this->marker->unk14_21);
|
||||
}
|
||||
@@ -185,227 +143,246 @@ void func_8038C79C(Actor *this){
|
||||
}
|
||||
|
||||
void chBossJinjo_update(Actor *this){
|
||||
f32 sp74 = time_getDelta();
|
||||
f32 time_delta = time_getDelta();
|
||||
f32 sp68[3];
|
||||
f32 sp5C[3];
|
||||
f32 sp50[3];
|
||||
f32 sp4C;
|
||||
int sp48;
|
||||
s32 sp44;
|
||||
s16 sp42;
|
||||
s16 sp40;
|
||||
f32 velocity_player[3];
|
||||
f32 position_finalboss[3];
|
||||
f32 yaw_delta;
|
||||
bool inState3;
|
||||
s32 pad;
|
||||
s16 new_yaw;
|
||||
s16 old_yaw;
|
||||
|
||||
if(!this->volatile_initialized){
|
||||
if (!this->volatile_initialized) {
|
||||
this->volatile_initialized = TRUE;
|
||||
func_80324CFC(0.0f, SFX_JINJO_STATUE_POWERUP, 32000);
|
||||
func_80324D2C(this->lifetime_value + 2.26, SFX_JINJO_STATUE_POWERUP);
|
||||
}//L8038C8A4
|
||||
}
|
||||
|
||||
func_8028E964(sp68);
|
||||
func_80257F18(this->position, sp68, &sp4C);
|
||||
sp40 = (this->yaw * 182.04444);
|
||||
sp42 = sp40 - (s16)(sp4C*182.04444);
|
||||
switch(this->state){
|
||||
case 1: //8038C92C
|
||||
func_80257F18(this->position, sp68, &yaw_delta);
|
||||
old_yaw = (this->yaw * 182.04444);
|
||||
new_yaw = old_yaw - (s16) (yaw_delta * 182.04444);
|
||||
|
||||
switch (this->state) {
|
||||
case BOSSJINJO_STATE_1_WAKE_UP:
|
||||
animctrl_setAnimTimer(this->animctrl, 0.0f);
|
||||
if(this->lifetime_value < 0.0)
|
||||
subaddie_set_state_with_direction(this, 2, 0.001f, 1);
|
||||
else//L8038C974
|
||||
this->lifetime_value -= sp74;
|
||||
|
||||
if (this->lifetime_value < 0.0) {
|
||||
subaddie_set_state_with_direction(this, BOSSJINJO_STATE_2_YAWN, 0.001f, 1);
|
||||
} else {
|
||||
this->lifetime_value -= time_delta;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 2: // 8038C980
|
||||
if(actor_animationIsAt(this, 0.44f))
|
||||
case BOSSJINJO_STATE_2_YAWN:
|
||||
if (actor_animationIsAt(this, 0.44f)) {
|
||||
func_8030E878(SFX_105_EYRIE_YAWN, randf2(0.95f, 1.05f), 32000, this->position, 1000.0f, 5000.0f);
|
||||
}
|
||||
|
||||
if(actor_animationIsAt(this, 0.999f)){
|
||||
subaddie_set_state_with_direction(this, 3, 0.001f, 1);
|
||||
if (actor_animationIsAt(this, 0.999f)) {
|
||||
subaddie_set_state_with_direction(this, BOSSJINJO_STATE_3_SPIN_UP, 0.001f, 1);
|
||||
func_8030E878(0x3ee, randf2(0.95f, 1.05f), 32000, this->position, 5000.0f, 12000.0f);
|
||||
}
|
||||
break;
|
||||
case 3: // 8038CA48
|
||||
case 4: // 8038CA48
|
||||
sp48 = (this->state == 3);
|
||||
if(!sp48 || 0.1 < animctrl_getAnimTimer(this->animctrl)){//L8038CA7C
|
||||
player_getVelocity(&sp5C);
|
||||
sp5C[0] *= sp74 * 6.0f;
|
||||
sp5C[1] *= sp74 * 6.0f;
|
||||
sp5C[2] *= sp74 * 6.0f;
|
||||
break;
|
||||
|
||||
sp5C[0] = sp5C[0] + sp68[0];
|
||||
sp5C[1] = sp5C[1] + sp68[1];
|
||||
sp5C[2] = sp5C[2] + sp68[2];
|
||||
case BOSSJINJO_STATE_3_SPIN_UP:
|
||||
case BOSSJINJO_STATE_4_ATTACK:
|
||||
inState3 = (this->state == BOSSJINJO_STATE_3_SPIN_UP);
|
||||
|
||||
sp5C[0] -= this->position_x;
|
||||
sp5C[1] -= this->position_y;
|
||||
sp5C[2] -= this->position_z;
|
||||
if (!inState3 || 0.1 < animctrl_getAnimTimer(this->animctrl)) {
|
||||
player_getVelocity(&velocity_player);
|
||||
|
||||
sp5C[0] *= sp74*3.0f;
|
||||
sp5C[1] *= sp74*3.0f;
|
||||
sp5C[2] *= sp74*3.0f;
|
||||
velocity_player[0] *= time_delta * 6.0f;
|
||||
velocity_player[1] *= time_delta * 6.0f;
|
||||
velocity_player[2] *= time_delta * 6.0f;
|
||||
|
||||
this->position_x = sp5C[0] + this->position_x;
|
||||
this->position_y = sp5C[1] + this->position_y;
|
||||
this->position_z = sp5C[2] + this->position_z;
|
||||
if(sp48 || animctrl_getAnimTimer(this->animctrl) < 0.8)
|
||||
func_8038C79C(this);
|
||||
}//L8038CB9C
|
||||
if(sp48){
|
||||
if(animctrl_getAnimTimer(this->animctrl) < 0.2){
|
||||
fight_func_8038C6FC(this, sp42);
|
||||
velocity_player[0] = velocity_player[0] + sp68[0];
|
||||
velocity_player[1] = velocity_player[1] + sp68[1];
|
||||
velocity_player[2] = velocity_player[2] + sp68[2];
|
||||
|
||||
velocity_player[0] -= this->position_x;
|
||||
velocity_player[1] -= this->position_y;
|
||||
velocity_player[2] -= this->position_z;
|
||||
|
||||
velocity_player[0] *= time_delta * 3.0f;
|
||||
velocity_player[1] *= time_delta * 3.0f;
|
||||
velocity_player[2] *= time_delta * 3.0f;
|
||||
|
||||
this->position_x = velocity_player[0] + this->position_x;
|
||||
this->position_y = velocity_player[1] + this->position_y;
|
||||
this->position_z = velocity_player[2] + this->position_z;
|
||||
|
||||
if (inState3 || animctrl_getAnimTimer(this->animctrl) < 0.8) {
|
||||
chbossjinjo_func_8038C79C(this);
|
||||
}
|
||||
}
|
||||
|
||||
if (inState3) {
|
||||
if(animctrl_getAnimTimer(this->animctrl) < 0.2) {
|
||||
chbossjinjo_rotateYaw(this, new_yaw);
|
||||
}
|
||||
|
||||
if(actor_animationIsAt(this, 0.1f)){
|
||||
if (actor_animationIsAt(this, 0.1f)) {
|
||||
this->unk44_31 = func_8030ED2C(0x18, 3);
|
||||
func_8030E2C4(this->unk44_31);
|
||||
func_8025A6EC(COMUSIC_43_ENTER_LEVEL_GLITTER, 0x7fff);
|
||||
FUNC_8030E8B4(SFX_C7_SHWOOP, 0.8f, 32750, this->position, 300, 2000);
|
||||
}//L8038CC2C
|
||||
}
|
||||
|
||||
if(actor_animationIsAt(this, 0.434f)){
|
||||
if (actor_animationIsAt(this, 0.434f)) {
|
||||
FUNC_8030E8B4(SFX_C7_SHWOOP, 0.9f, 32750, this->position, 300, 2000);
|
||||
}//L8038CC58
|
||||
}
|
||||
|
||||
if(actor_animationIsAt(this, 0.811f)){
|
||||
if (actor_animationIsAt(this, 0.811f)) {
|
||||
FUNC_8030E8B4(SFX_C7_SHWOOP, 1.0f, 32750, this->position, 300, 2000);
|
||||
}
|
||||
}
|
||||
else{//L8038CC8C
|
||||
if(actor_animationIsAt(this, 0.214f)){
|
||||
} else {
|
||||
if (actor_animationIsAt(this, 0.214f)) {
|
||||
FUNC_8030E8B4(SFX_C7_SHWOOP, 1.1f, 32750, this->position, 300, 2000);
|
||||
}//L8038CCB0
|
||||
}
|
||||
|
||||
if(actor_animationIsAt(this, 0.55f)){
|
||||
if (actor_animationIsAt(this, 0.55f)) {
|
||||
FUNC_8030E8B4(SFX_53_BANJO_HUIII, 1.5f, 32750, this->position, 300, 2000);
|
||||
}//L8038CCDC
|
||||
}
|
||||
|
||||
if(actor_animationIsAt(this, 0.85f)){
|
||||
if(func_8030E3FC(this->unk44_31))
|
||||
if (actor_animationIsAt(this, 0.85f)) {
|
||||
if(func_8030E3FC(this->unk44_31)) {
|
||||
func_8030E394(this->unk44_31);
|
||||
}
|
||||
|
||||
sfxsource_playHighPriority(SFX_19_BANJO_LANDING_08);
|
||||
func_8025A7DC(COMUSIC_43_ENTER_LEVEL_GLITTER);
|
||||
}//L8038CD20
|
||||
}
|
||||
|
||||
if(sp48){
|
||||
if(actor_animationIsAt(this, 0.96f)){
|
||||
subaddie_set_state_with_direction(this, 4, 0.0f, -1);
|
||||
actor_playAnimationOnce(this);
|
||||
}
|
||||
}
|
||||
else{//L8038CD68
|
||||
if(actor_animationIsAt(this, 0.9f)){
|
||||
|
||||
if (inState3) {
|
||||
if (actor_animationIsAt(this, 0.96f)) {
|
||||
subaddie_set_state_with_direction(this, BOSSJINJO_STATE_4_ATTACK, 0.0f, -1);
|
||||
actor_playAnimationOnce(this);
|
||||
}
|
||||
} else {
|
||||
if (actor_animationIsAt(this, 0.9f)) {
|
||||
animctrl_setSmoothTransition(this->animctrl, FALSE);
|
||||
subaddie_set_state_with_direction(this, 5, 0.001f, 1);
|
||||
subaddie_set_state_with_direction(this, BOSSJINJO_STATE_5_HIT, 0.001f, 1);
|
||||
FUNC_8030E8B4(SFX_135_CARTOONY_SPRING, 1.0f, 32000, this->position, 10000, 16000);
|
||||
func_80324D54(0.1f, SFX_C1_BUZZBOMB_ATTACK, 0.85f, 32000, this->position, 5000.0f, 12000.0f);
|
||||
func_8034A174(this->marker->unk44, 0x1f, this->position);
|
||||
this->velocity_x = (this->position_x - this->unk1C[0])/ sp74;
|
||||
this->velocity_y = (this->position_y - this->unk1C[1])/ sp74;
|
||||
this->velocity_z = (this->position_z - this->unk1C[2])/ sp74;
|
||||
|
||||
}
|
||||
else{//L8038CE50
|
||||
this->velocity_x = (this->position_x - this->unk1C[0])/ time_delta;
|
||||
this->velocity_y = (this->position_y - this->unk1C[1])/ time_delta;
|
||||
this->velocity_z = (this->position_z - this->unk1C[2])/ time_delta;
|
||||
} else {
|
||||
func_8034A174(this->marker->unk44, 0x1f, this->unk1C);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 5: // 8038CE68
|
||||
fight_func_8038C0DC(&sp50);
|
||||
sp50[1] += 100.0f;
|
||||
func_80387470(this, sp50, 1200.0f, 3840.0f, 200.0f, 2500.0f, 70.0f);
|
||||
func_8038C79C(this);
|
||||
|
||||
case BOSSJINJO_STATE_5_HIT:
|
||||
chfinalboss_getPosition(position_finalboss);
|
||||
position_finalboss[1] += 100.0f;
|
||||
chfinalboss_func_80387470(this, position_finalboss, 1200.0f, 3840.0f, 200.0f, 2500.0f, 70.0f);
|
||||
chbossjinjo_func_8038C79C(this);
|
||||
break;
|
||||
}//L8038CEC8
|
||||
}
|
||||
}
|
||||
|
||||
void func_8038CED8(f32 arg0[3], enum asset_e model_id, f32 arg2, f32 arg3){
|
||||
ParticleEmitter *s0 = partEmitMgr_newEmitter(1);
|
||||
void fight_createBlastParticle(f32 position[3], enum asset_e model_id, f32 scale_ratio, f32 fade_in) {
|
||||
ParticleEmitter *pCtrl = partEmitMgr_newEmitter(1);
|
||||
f32 viewport[3];
|
||||
f32 sp34[3];
|
||||
f32 velocity[3];
|
||||
|
||||
viewport_getPosition_vec3f(&viewport);
|
||||
|
||||
sp34[0] = viewport[0] - arg0[0];
|
||||
sp34[1] = viewport[1] - arg0[1];
|
||||
sp34[2] = viewport[2] - arg0[2];
|
||||
ml_vec3f_set_length(sp34, 20.0f);
|
||||
viewport_getPosition_vec3f(viewport);
|
||||
velocity[0] = viewport[0] - position[0];
|
||||
velocity[1] = viewport[1] - position[1];
|
||||
velocity[2] = viewport[2] - position[2];
|
||||
ml_vec3f_set_length(velocity, 20.0f);
|
||||
|
||||
particleEmitter_setModel(s0, model_id);
|
||||
particleEmitter_setPosition(s0, arg0);
|
||||
particleEmitter_setParticleVelocityRange(s0, sp34[0], sp34[1], sp34[2], sp34[0], sp34[1], sp34[2]);
|
||||
D_80391968.unk20 = arg3;
|
||||
D_80391968.unk0[0] *= arg2;
|
||||
D_80391968.unk24 = arg3;
|
||||
D_80391968.unk0[1] *= arg2;
|
||||
D_80391968.unk8[0] *= arg2;
|
||||
D_80391968.unk8[1] *= arg2;
|
||||
particleEmitter_setScaleAndLifetimeRanges(s0, &D_80391968);
|
||||
particleEmitter_setDrawMode(s0, PART_EMIT_NO_DEPTH);
|
||||
func_802EFA78(s0, 1);
|
||||
particleEmitter_emitN(s0, 1);
|
||||
particleEmitter_setModel(pCtrl, model_id);
|
||||
particleEmitter_setPosition(pCtrl, position);
|
||||
particleEmitter_setParticleVelocityRange(pCtrl, velocity[0], velocity[1], velocity[2], velocity[0], velocity[1], velocity[2]);
|
||||
|
||||
sFightBlastParticleSettings.unk20 = fade_in;
|
||||
sFightBlastParticleSettings.unk0[0] *= scale_ratio;
|
||||
sFightBlastParticleSettings.unk24 = fade_in;
|
||||
sFightBlastParticleSettings.unk0[1] *= scale_ratio;
|
||||
sFightBlastParticleSettings.unk8[0] *= scale_ratio;
|
||||
sFightBlastParticleSettings.unk8[1] *= scale_ratio;
|
||||
|
||||
particleEmitter_setScaleAndLifetimeRanges(pCtrl, &sFightBlastParticleSettings);
|
||||
particleEmitter_setDrawMode(pCtrl, PART_EMIT_NO_DEPTH);
|
||||
particleEmitter_func_802EFA78(pCtrl, 1);
|
||||
particleEmitter_emitN(pCtrl, 1);
|
||||
}
|
||||
|
||||
void chBossJinjo_func_8038D014(Actor *this){
|
||||
s32 temp_a1;
|
||||
void chBossJinjo_update2(Actor *this) {
|
||||
enum asset_e blast_asset;
|
||||
|
||||
if(!this->volatile_initialized){
|
||||
if (!this->volatile_initialized) {
|
||||
this->volatile_initialized = TRUE;
|
||||
this->marker->propPtr->unk8_3 = 0;
|
||||
actor_collisionOff(this);
|
||||
this->alpha_124_19 = 0x7d;
|
||||
actor_setOpacity(this, this->alpha_124_19);
|
||||
this->scale = (f64)this->scale + this->scale;
|
||||
subaddie_set_state_with_direction(this, 5, 0.001f, 1);
|
||||
subaddie_set_state_with_direction(this, BOSSJINJO_STATE_5_HIT, 0.001f, 1);
|
||||
func_80343DEC(this);
|
||||
}//L8038D0B8
|
||||
}
|
||||
|
||||
if(!func_8038C298()){
|
||||
if (!chfinalboss_func_8038C298()) {
|
||||
this->unk58_0 = 0;
|
||||
}else{//L8038D0DC
|
||||
} else {
|
||||
this->unk58_0 = 1;
|
||||
func_80343DEC(this);
|
||||
if(this->state == 5){
|
||||
if(this->marker->unk14_21)
|
||||
func_8038C79C(this);
|
||||
|
||||
if(0.98 < this->unk48){
|
||||
if (this->state == BOSSJINJO_STATE_5_HIT) {
|
||||
if(this->marker->unk14_21) {
|
||||
chbossjinjo_func_8038C79C(this);
|
||||
}
|
||||
|
||||
if (0.98 < this->unk48) {
|
||||
func_8030E6A4(0x3ee, randf2(1.0f, 1.15f), 32000);
|
||||
timed_playSfx(0.1f, 0x416, 0.6f, 32000);
|
||||
marker_despawn(this->marker);
|
||||
switch (this->marker->id)
|
||||
{
|
||||
case MARKER_27B_BOSS_JINJO_ORANGE:
|
||||
temp_a1 = 0x557;
|
||||
break;
|
||||
case MARKER_27C_BOSS_JINJO_GREEN:
|
||||
temp_a1 = 0x558;
|
||||
break;
|
||||
case MARKER_27D_BOSS_JINJO_PINK:
|
||||
temp_a1 = 0x559;
|
||||
break;
|
||||
case MARKER_27E_BOSS_JINJO_YELLOW:
|
||||
temp_a1 = 0x556;
|
||||
break;
|
||||
default:
|
||||
temp_a1 = 0x556;
|
||||
break;
|
||||
|
||||
switch (this->marker->id) {
|
||||
case MARKER_27B_BOSS_JINJO_ORANGE:
|
||||
blast_asset = ASSET_557_MODEL_ORANGE_JINJO_BLAST;
|
||||
break;
|
||||
|
||||
case MARKER_27C_BOSS_JINJO_GREEN:
|
||||
blast_asset = ASSET_558_MODEL_GREEN_JINJO_BLAST;
|
||||
break;
|
||||
|
||||
case MARKER_27D_BOSS_JINJO_PINK:
|
||||
blast_asset = ASSET_559_MODEL_PINK_JINJO_BLAST;
|
||||
break;
|
||||
|
||||
case MARKER_27E_BOSS_JINJO_YELLOW:
|
||||
blast_asset = ASSET_556_MODEL_YELLOW_JINJO_BLAST;
|
||||
break;
|
||||
|
||||
default:
|
||||
blast_asset = ASSET_556_MODEL_YELLOW_JINJO_BLAST;
|
||||
break;
|
||||
}
|
||||
func_8038CED8(this->position, temp_a1, 1.0f, 0.1f);
|
||||
|
||||
fight_createBlastParticle(this->position, blast_asset, 1.0f, 0.1f);
|
||||
func_802BB3DC(0, 12.0f, 0.4f);
|
||||
}
|
||||
}
|
||||
}//L8038D200
|
||||
}
|
||||
}
|
||||
|
||||
void chbossjinjo_attack(ActorMarker *marker) {
|
||||
Actor *actor_bossjinjo = marker_getActor(marker);
|
||||
|
||||
void chbossjinjo_attack(ActorMarker *marker){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
chbossjinjo_spawnAttackParticles(actor);
|
||||
FUNC_8030E8B4(SFX_1B_EXPLOSION_1, 1.0f, 32000, actor->position, 1000, 6500);
|
||||
marker_despawn(actor->marker);
|
||||
chbossjinjo_spawnAttackParticles(actor_bossjinjo);
|
||||
FUNC_8030E8B4(SFX_1B_EXPLOSION_1, 1.0f, 32000, actor_bossjinjo->position, 1000, 6500);
|
||||
marker_despawn(actor_bossjinjo->marker);
|
||||
}
|
||||
|
||||
f32 chbossjinjo_8038D268(void){
|
||||
f32 chbossjinjo_getWakeUpTime(void) {
|
||||
return 2.26f;
|
||||
}
|
||||
|
@@ -5,113 +5,86 @@
|
||||
|
||||
typedef struct {
|
||||
u8 sfxsourceIdx;
|
||||
}ActorLocal_BossJinjoBase;
|
||||
} ActorLocal_BossJinjoBase;
|
||||
|
||||
enum chBossJinjoBase_states {
|
||||
CHBOSSJINJOBASE_STATE_1_RAISE = 1,
|
||||
CHBOSSJINJOBASE_STATE_2_DEFAULT = 2,
|
||||
CHBOSSJINJOBASE_STATE_3_SPAWNED_BOSS_JINJO = 3
|
||||
};
|
||||
ActorInfo chBossJinjoBase = { MARKER_27A_JINJO_STATUE_BASE, ACTOR_3A2_JINJO_STATUE_BASE, ASSET_543_MODEL_JINJO_STATUE_BASE, 1, NULL, chBossJinjoBase_update, actor_update_func_80326224, actor_draw, 0, 2048, 0.0f, 0 };
|
||||
|
||||
void chBossJinjoBase_update(Actor *this);
|
||||
s32 chBossJinjoBase_SmokeColor[3] = { 200, 200, 160 };
|
||||
ParticleScaleAndLifetimeRanges chBossJinjoBase_SmokeScaleAndLifetimeSettings = { {1.0f, 1.0f}, {1.7f, 2.7f}, {0.0f, 0.05f}, {2.6f, 3.4f}, 0.0f, 0.1f };
|
||||
|
||||
/* .data */
|
||||
ActorInfo chBossJinjoBase = {
|
||||
MARKER_27A_JINJO_STATUE_BASE, ACTOR_3A2_JINJO_STATUE_BASE, ASSET_543_MODEL_JINJO_STATUE_BASE,
|
||||
0x1, NULL,
|
||||
chBossJinjoBase_update, func_80326224, actor_draw,
|
||||
0, 0x800, 0.0f, 0
|
||||
};
|
||||
void chbossjinjobase_spawnStoneJinjo(ActorMarker *marker) {
|
||||
Actor *actor_bossjinjobase = marker_getActor(marker);
|
||||
Actor *childactor_stonejinjo = spawn_child_actor(ACTOR_3A1_STONE_JINJO, &actor_bossjinjobase);
|
||||
|
||||
s32 chBossJinjoBase_smokeColor[3] = {0xC8, 0xC8, 0xA0};
|
||||
|
||||
ParticleScaleAndLifetimeRanges chBossJinjoBase_smokeSettings = {
|
||||
{1.0f, 1.0f},
|
||||
{1.7f, 2.7f},
|
||||
{0.0f, 0.05f},
|
||||
{2.6f, 3.4f},
|
||||
0.0f, 0.1f
|
||||
};
|
||||
|
||||
/* .code */
|
||||
void chbossjinjobase_spawnStoneJinjo(ActorMarker *arg0) {
|
||||
Actor *sp1C = marker_getActor(arg0);
|
||||
Actor *temp_v0 = spawn_child_actor(ACTOR_3A1_STONE_JINJO, &sp1C);
|
||||
|
||||
temp_v0->unkF4_8 = sp1C->unkF4_8;
|
||||
temp_v0->position_y = temp_v0->position_y + 172.0f;
|
||||
sp1C->unk100 = temp_v0->marker;
|
||||
childactor_stonejinjo->unkF4_8 = actor_bossjinjobase->unkF4_8;
|
||||
childactor_stonejinjo->position_y = childactor_stonejinjo->position_y + 172.0f;
|
||||
actor_bossjinjobase->unk100 = childactor_stonejinjo->marker;
|
||||
}
|
||||
|
||||
void chBossJinjoBase_emitSmoke(f32 position[3], s32 count) {
|
||||
ParticleEmitter *p = partEmitMgr_newEmitter(count);
|
||||
|
||||
particleEmitter_setSprite(p, ASSET_70E_SPRITE_SMOKE_2);
|
||||
particleEmitter_setRGB(p, chBossJinjoBase_smokeColor);
|
||||
particleEmitter_setStartingFrameRange(p, 0, 7);
|
||||
particleEmitter_setPosition(p, position);
|
||||
particleEmitter_setParticleSpawnPositionRange(p, -90.0f, 0.0f, -80.0f, 80.0f, 60.0f, 80.0f);
|
||||
particleEmitter_setParticleVelocityRange(p, -170.0f, 0.0f, -170.0f, 170.0f, 100.0f, 170.0f);
|
||||
particleEmitter_setScaleAndLifetimeRanges(p, &chBossJinjoBase_smokeSettings);
|
||||
particleEmitter_emitN(p, count);
|
||||
void chBossJinjoBase_createSmokeParticles(f32 position[3], s32 count) {
|
||||
ParticleEmitter *pCtrl = partEmitMgr_newEmitter(count);
|
||||
particleEmitter_setSprite(pCtrl, ASSET_70E_SPRITE_SMOKE_2);
|
||||
particleEmitter_setRGB(pCtrl, chBossJinjoBase_SmokeColor);
|
||||
particleEmitter_setStartingFrameRange(pCtrl, 0, 7);
|
||||
particleEmitter_setPosition(pCtrl, position);
|
||||
particleEmitter_setSpawnPositionRange(pCtrl, -90.0f, 0.0f, -80.0f, 80.0f, 60.0f, 80.0f);
|
||||
particleEmitter_setParticleVelocityRange(pCtrl, -170.0f, 0.0f, -170.0f, 170.0f, 100.0f, 170.0f);
|
||||
particleEmitter_setScaleAndLifetimeRanges(pCtrl, &chBossJinjoBase_SmokeScaleAndLifetimeSettings);
|
||||
particleEmitter_emitN(pCtrl, count);
|
||||
}
|
||||
|
||||
void func_8038D3DC(Actor* this, s32 arg1, f32 arg2, f32 arg3, f32 arg4){
|
||||
void chBossJinjoBase_func_8038D3DC(Actor *this, s32 arg1, f32 arg2, f32 arg3, f32 arg4) {
|
||||
s32 tmp = func_8034C2C4(this->marker, arg1);
|
||||
|
||||
if(tmp){
|
||||
if (tmp) {
|
||||
func_8034DE60(tmp, arg2, arg3, arg4, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void chBossJinjoBase_getHitByEgg(ActorMarker *this, ActorMarker *other) {
|
||||
Actor *actor_base;
|
||||
Actor *actor_other;
|
||||
Actor *actor_bossjinjobase = marker_getActor(this);
|
||||
|
||||
actor_base = marker_getActor(this);
|
||||
|
||||
if (actor_base->state != CHBOSSJINJOBASE_STATE_3_SPAWNED_BOSS_JINJO) {
|
||||
if (actor_bossjinjobase->state != CHBOSSJINJOBASE_STATE_3_SPAWNED_BOSS_JINJO) {
|
||||
comusic_playTrack(COMUSIC_2B_DING_B);
|
||||
actor_base->unk38_31++; // hit count
|
||||
actor_bossjinjobase->unk38_31++;
|
||||
|
||||
if (actor_base->unk38_31 >= 3) { // spawn Jjnjonator
|
||||
subaddie_set_state(actor_base, CHBOSSJINJOBASE_STATE_3_SPAWNED_BOSS_JINJO);
|
||||
chstonejinjo_breakOpen(actor_base->unk100);
|
||||
func_8038D3DC(actor_base, 0x19A, -100.0f, 0.0f, 1.2f);
|
||||
func_80324D54(1.2f, SFX_90_SWITCH_PRESS, 1.0f, 32000, actor_base->position, 1000.0f, 2000.0f);
|
||||
if (actor_bossjinjobase->unk38_31 >= 3) {
|
||||
subaddie_set_state(actor_bossjinjobase, CHBOSSJINJOBASE_STATE_3_SPAWNED_BOSS_JINJO);
|
||||
chstonejinjo_breakOpen(actor_bossjinjobase->unk100);
|
||||
chBossJinjoBase_func_8038D3DC(actor_bossjinjobase, 0x19A, -100.0f, 0.0f, 1.2f);
|
||||
func_80324D54(1.2f, SFX_90_SWITCH_PRESS, 1.0f, 32000, actor_bossjinjobase->position, 1000.0f, 2000.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void fight_func_8038D510(Actor *arg0) {
|
||||
ActorLocal_BossJinjoBase *sp18 = (ActorLocal_BossJinjoBase *)&arg0->local;
|
||||
void chBossJinjoBase_free(Actor *this) {
|
||||
ActorLocal_BossJinjoBase *local = (ActorLocal_BossJinjoBase *) &this->local;
|
||||
|
||||
if ((u8)arg0->unk44_31 != 0) {
|
||||
func_8030DA44(arg0->unk44_31);
|
||||
arg0->unk44_31 = 0;
|
||||
if ((u8)this->unk44_31 != 0) {
|
||||
func_8030DA44(this->unk44_31);
|
||||
this->unk44_31 = 0;
|
||||
}
|
||||
if (sp18->sfxsourceIdx != 0) {
|
||||
func_8030DA44(sp18->sfxsourceIdx);
|
||||
sp18->sfxsourceIdx = 0;
|
||||
if (local->sfxsourceIdx != 0) {
|
||||
func_8030DA44(local->sfxsourceIdx);
|
||||
local->sfxsourceIdx = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void chBossJinjoBase_update(Actor *this) {
|
||||
ActorLocal_BossJinjoBase *local = (ActorLocal_BossJinjoBase *)&this->local;
|
||||
|
||||
ActorLocal_BossJinjoBase *local = (ActorLocal_BossJinjoBase *) &this->local;
|
||||
f32 delta_time = time_getDelta();
|
||||
u32 shake_noise = globalTimer_getTime() & 0xF;
|
||||
Actor *actor_stone_jinjo; //sp40
|
||||
u32 rumbling = globalTimer_getTime() & 0xF;
|
||||
Actor *actor_stonejinjo;
|
||||
f32 y_delta;
|
||||
f32 position_delta[3];
|
||||
|
||||
this->unkF4_29 = 0;
|
||||
marker_loadModelBin(this->marker);
|
||||
|
||||
if(!this->volatile_initialized){
|
||||
if (!this->volatile_initialized) {
|
||||
this->volatile_initialized = TRUE;
|
||||
marker_setCollisionScripts(this->marker, NULL, chBossJinjoBase_getHitByEgg, NULL);
|
||||
marker_setFreeMethod(this->marker, fight_func_8038D510);
|
||||
marker_setFreeMethod(this->marker, chBossJinjoBase_free);
|
||||
this->marker->propPtr->unk8_3 = 1;
|
||||
actor_collisionOn(this);
|
||||
this->unk38_31 = 0;
|
||||
@@ -120,29 +93,29 @@ void chBossJinjoBase_update(Actor *this) {
|
||||
func_8030DD14(this->unk44_31, 2);
|
||||
sfxsource_playSfxAtVolume(this->unk44_31, 1.4f);
|
||||
sfxsource_setSampleRate(this->unk44_31, 32000);
|
||||
|
||||
local->sfxsourceIdx = sfxsource_createSfxsourceAndReturnIndex();
|
||||
sfxsource_setSfxId(local->sfxsourceIdx, SFX_405_UNKNOWN);
|
||||
func_8030DD14(local->sfxsourceIdx, 2);
|
||||
sfxsource_playSfxAtVolume(local->sfxsourceIdx, 0.7f);
|
||||
sfxsource_setSampleRate(local->sfxsourceIdx, 12000);
|
||||
FUNC_8030E624(SFX_3F6_RUBBING, 0.6f, 20000);
|
||||
func_8038D3DC(this, 0x19a, 0.0f, -200.0f, 0.0f);
|
||||
chBossJinjoBase_func_8038D3DC(this, 0x19a, 0.0f, -200.0f, 0.0f);
|
||||
TUPLE_COPY(this->unk1C, this->position);
|
||||
this->position_y = -400.0f;
|
||||
if(0.0f != this->lifetime_value)
|
||||
this->velocity_y = 400.0f/this->lifetime_value;
|
||||
|
||||
if (0.0f != this->lifetime_value)
|
||||
this->velocity_y = 400.0f / this->lifetime_value;
|
||||
else
|
||||
this->velocity_y = 100.0f;
|
||||
|
||||
func_802BB3DC(0, 8.0f, 0.92f);
|
||||
__spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, 0x3ad, *(s32*)&this->unk1C[0], *(s32*)&this->unk1C[1], *(s32*)&this->unk1C[2]);
|
||||
chBossJinjoBase_emitSmoke(this->unk1C, 0x10);
|
||||
__spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, ACTOR_3AD_JINJONATOR_STATUE_BASE_ACTIVATOR, *(s32*)&this->unk1C[0], *(s32*)&this->unk1C[1], *(s32*)&this->unk1C[2]);
|
||||
chBossJinjoBase_createSmokeParticles(this->unk1C, 0x10);
|
||||
SPAWNQUEUE_ADD_1(chbossjinjobase_spawnStoneJinjo, this->marker);
|
||||
}
|
||||
else{
|
||||
else {
|
||||
if(this->state == CHBOSSJINJOBASE_STATE_1_RAISE) {
|
||||
actor_stone_jinjo = marker_getActor(this->unk100);
|
||||
actor_stonejinjo = marker_getActor(this->unk100);
|
||||
y_delta = this->velocity_y * delta_time;
|
||||
|
||||
if(this->position_y + y_delta < this->unk1C[1]) {
|
||||
@@ -151,9 +124,9 @@ void chBossJinjoBase_update(Actor *this) {
|
||||
func_8030E2C4(local->sfxsourceIdx);
|
||||
}
|
||||
|
||||
position_delta[0] = (shake_noise & 1) ? 3.0f : -3.0f;
|
||||
position_delta[0] = (rumbling & 1) ? 3.0f : -3.0f;
|
||||
position_delta[1] = y_delta;
|
||||
position_delta[2] = (shake_noise & 2) ? 3.0f : -3.0f;
|
||||
position_delta[2] = (rumbling & 2) ? 3.0f : -3.0f;
|
||||
|
||||
this->position_x = this->unk1C[0];
|
||||
this->position_z = this->unk1C[2];
|
||||
@@ -161,11 +134,11 @@ void chBossJinjoBase_update(Actor *this) {
|
||||
this->position_y = position_delta[1] + this->position_y;
|
||||
this->position_z = position_delta[2] + this->position_z;
|
||||
|
||||
actor_stone_jinjo->position_x = this->unk1C[0];
|
||||
actor_stone_jinjo->position_z = this->unk1C[2];
|
||||
actor_stone_jinjo->position_x = position_delta[0] + actor_stone_jinjo->position_x;
|
||||
actor_stone_jinjo->position_y = position_delta[1] + actor_stone_jinjo->position_y;
|
||||
actor_stone_jinjo->position_z = position_delta[2] + actor_stone_jinjo->position_z;
|
||||
actor_stonejinjo->position_x = this->unk1C[0];
|
||||
actor_stonejinjo->position_z = this->unk1C[2];
|
||||
actor_stonejinjo->position_x = position_delta[0] + actor_stonejinjo->position_x;
|
||||
actor_stonejinjo->position_y = position_delta[1] + actor_stonejinjo->position_y;
|
||||
actor_stonejinjo->position_z = position_delta[2] + actor_stonejinjo->position_z;
|
||||
}
|
||||
else {
|
||||
subaddie_set_state(this, CHBOSSJINJOBASE_STATE_2_DEFAULT);
|
||||
@@ -174,9 +147,9 @@ void chBossJinjoBase_update(Actor *this) {
|
||||
func_8030DA44(local->sfxsourceIdx);
|
||||
local->sfxsourceIdx = 0;
|
||||
TUPLE_COPY(this->position, this->unk1C);
|
||||
TUPLE_COPY(actor_stone_jinjo->position, this->unk1C);
|
||||
actor_stone_jinjo->position_y += 172.0f;
|
||||
TUPLE_COPY(actor_stonejinjo->position, this->unk1C);
|
||||
actor_stonejinjo->position_y += 172.0f;
|
||||
}
|
||||
}
|
||||
}//L8038D954
|
||||
}
|
||||
}
|
||||
|
@@ -3,25 +3,21 @@
|
||||
#include "variables.h"
|
||||
#include "fight.h"
|
||||
|
||||
ActorInfo chBossShadow = {
|
||||
MARKER_288_GRUNTY_SHADOW, ACTOR_3AF_GRUNTY_SHADOW, ASSET_3BF_MODEL_PLAYER_SHADOW, 0x1, NULL,
|
||||
chBossShadow_update, func_80326224, chBossShadow_draw,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
ActorInfo chBossShadow = { MARKER_288_GRUNTY_SHADOW, ACTOR_3AF_GRUNTY_SHADOW, ASSET_3BF_MODEL_PLAYER_SHADOW, 1, NULL, chBossShadow_update, actor_update_func_80326224, chBossShadow_draw, 0, 0, 0.0f, 0 };
|
||||
|
||||
Actor *chBossShadow_draw(ActorMarker *this, Gfx **gdl, Mtx **mptr, Vtx **vptr) {
|
||||
Actor *chBossShadow_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) {
|
||||
f32 rotation[3];
|
||||
f32 scale;
|
||||
Actor *actor;
|
||||
Actor *actor_bossshadow;
|
||||
|
||||
// unk1C[0] of ACTOR_3AF_GRUNTY_SHADOW is set in chfinalboss_update to the distance between Gruntilda and the floor triangle below her
|
||||
actor = marker_getActorAndRotation(this, rotation);
|
||||
scale = actor->scale * ml_map_f(actor->unk1C[0], 0.0f, 1000.0f, 1.75f, 0.9f);
|
||||
actor_bossshadow = marker_getActorAndRotation(marker, rotation);
|
||||
scale = actor_bossshadow->scale * ml_map_f(actor_bossshadow->unk1C[0], 0.0f, 1000.0f, 1.75f, 0.9f);
|
||||
|
||||
modelRender_setDepthMode(MODEL_RENDER_DEPTH_COMPARE);
|
||||
modelRender_draw(gdl, mptr, actor->position, rotation, scale, NULL, marker_loadModelBin(this));
|
||||
modelRender_draw(gfx, mtx, actor_bossshadow->position, rotation, scale, NULL, marker_loadModelBin(marker));
|
||||
|
||||
return actor;
|
||||
return actor_bossshadow;
|
||||
}
|
||||
|
||||
void chBossShadow_update(Actor *this) {
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -3,20 +3,9 @@
|
||||
#include "variables.h"
|
||||
#include "fight.h"
|
||||
|
||||
extern void func_80386654(f32 arg0, f32 (*arg1)[4], f32 (*arg2)[4]);
|
||||
extern void func_80387470(Actor *, f32 [3], f32, f32, f32, f32, f32);
|
||||
extern Actor *func_80325CAC(ActorMarker *, Gfx **, Mtx **, Vtx**);
|
||||
|
||||
void chGreenBlast_update(Actor *this);
|
||||
Actor *chGreenBlast_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vtx **arg3);
|
||||
|
||||
/* .data */
|
||||
ActorInfo chGreenBlast = {
|
||||
MARKER_25D_GREEN_BLAST, ACTOR_38A_GREEN_BLAST, ASSET_6C7_GREEN_BLAST,
|
||||
0x1, NULL,
|
||||
chGreenBlast_update, func_80326224, chGreenBlast_draw,
|
||||
0, 0, 1.0f, 0
|
||||
};
|
||||
ActorInfo chGreenBlast = { MARKER_25D_GREEN_BLAST, ACTOR_38A_GREEN_BLAST, ASSET_6C7_GREEN_BLAST, 1, NULL, chGreenBlast_update, actor_update_func_80326224, chGreenBlast_draw, 0, 0, 1.0f, 0 };
|
||||
|
||||
f32 D_80391DE4[4] = {0.6f, 1.0f, 1.0f, 1.0f};
|
||||
f32 D_80391DF4[4] = {0.3f, 0.3f, 0.3f, 1.0f};
|
||||
@@ -48,19 +37,18 @@ f32 chGreenBlastSparklesScaleRange[4] = {0.15f, 0.3f, 0.0f, 0.0f};
|
||||
f32 chGreenBlastSparklesLifetimeRange[4] = {0.0f, 0.01f, 0.7f, 0.8f};
|
||||
f32 chGreenBlastSparklesFade[2] = {0.0f, 0.65f};
|
||||
|
||||
/* .code */
|
||||
Actor *chGreenBlast_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vtx **arg3){
|
||||
Actor *chGreenBlast_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) {
|
||||
Actor *actor = marker_getActor(marker);
|
||||
func_80344C2C(1);
|
||||
return func_80325CAC(marker, gdl, mptr, arg3);
|
||||
return func_80325CAC(marker, gfx, mtx, vtx);
|
||||
}
|
||||
|
||||
void func_8038FC88(void){
|
||||
func_80386654(1.0f, &D_80391DF4, &D_80391DE4);
|
||||
void chGreenBlast_func_8038FC88(void){
|
||||
chfinalboss_func_80386654(1.0f, D_80391DF4, D_80391DE4);
|
||||
}
|
||||
|
||||
void func_8038FCBC(void){
|
||||
func_80386654(1.0f, &D_80391DE4, &D_80391DF4);
|
||||
void chGreenBlast_func_8038FCBC(void){
|
||||
chfinalboss_func_80386654(1.0f, D_80391DE4, D_80391DF4);
|
||||
}
|
||||
|
||||
void chGreenBlast_collisionDie(ActorMarker *marker, ActorMarker *other_marker){
|
||||
@@ -73,30 +61,18 @@ void chGreenBlast_collisionDie(ActorMarker *marker, ActorMarker *other_marker){
|
||||
explosion_position[1] += 160.0f;
|
||||
|
||||
FUNC_8030E8B4(SFX_1B_EXPLOSION_1, 1.0f, 32000, actor->position, 1000, 3500);
|
||||
timedFunc_set_0(0.0f, func_8038FC88);
|
||||
timedFunc_set_0(0.3f, func_8038FCBC);
|
||||
timedFunc_set_0(0.0f, chGreenBlast_func_8038FC88);
|
||||
timedFunc_set_0(0.3f, chGreenBlast_func_8038FCBC);
|
||||
|
||||
chSpellFireball_emitSparkles(actor->position, 4, ASSET_710_SPRITE_SPARKLE_PURPLE,
|
||||
chGreenBlastDieSparklesPositionRange, chGreenBlastDieSparklesAccelerationRange, chGreenBlastDieSparklesVelocityRange,
|
||||
chGreenBlastDieSparklesScaleRange, chGreenBlastDieSparklesLifetimeRange, chGreenBlastDieSparklesFade
|
||||
);
|
||||
|
||||
chSpellFireball_emitSparkles(actor->position, 4, ASSET_711_SPRITE_SPARKLE_DARK_BLUE,
|
||||
chGreenBlastDieSparklesPositionRange, chGreenBlastDieSparklesAccelerationRange, chGreenBlastDieSparklesVelocityRange,
|
||||
chGreenBlastDieSparklesScaleRange, chGreenBlastDieSparklesLifetimeRange, chGreenBlastDieSparklesFade
|
||||
);
|
||||
|
||||
chSpellFireball_emitSmoke(actor->position, 3, chGreenBlastSmokeLifetime);
|
||||
|
||||
chSpellFireball_emitExplosion(&explosion_position, 0x6C8, 3,
|
||||
chGreenBlastExplosionStartFrameRange, chGreenBlastExplosionPositionRange,
|
||||
chGreenBlastExplosionScaleRange, chGreenBlastExplosionLifetimeRange, chGreenBlastExplosionFade
|
||||
);
|
||||
fight_createSpriteParticles(actor->position, 4, ASSET_710_SPRITE_SPARKLE_PURPLE, chGreenBlastDieSparklesPositionRange, chGreenBlastDieSparklesAccelerationRange, chGreenBlastDieSparklesVelocityRange, chGreenBlastDieSparklesScaleRange, chGreenBlastDieSparklesLifetimeRange, chGreenBlastDieSparklesFade);
|
||||
fight_createSpriteParticles(actor->position, 4, ASSET_711_SPRITE_SPARKLE_DARK_BLUE, chGreenBlastDieSparklesPositionRange, chGreenBlastDieSparklesAccelerationRange, chGreenBlastDieSparklesVelocityRange, chGreenBlastDieSparklesScaleRange, chGreenBlastDieSparklesLifetimeRange, chGreenBlastDieSparklesFade);
|
||||
fight_createSmokeParticles(actor->position, 3, chGreenBlastSmokeLifetime);
|
||||
fight_createAnimatedSpriteParticles(explosion_position, 0x6C8, 3, chGreenBlastExplosionStartFrameRange, chGreenBlastExplosionPositionRange, chGreenBlastExplosionScaleRange, chGreenBlastExplosionLifetimeRange, chGreenBlastExplosionFade);
|
||||
|
||||
marker_despawn(actor->marker);
|
||||
}
|
||||
|
||||
void chGreenBlast_update(Actor *this){
|
||||
void chGreenBlast_update(Actor *this) {
|
||||
f32 delta_time = time_getDelta();
|
||||
f32 target_position[3];
|
||||
|
||||
@@ -113,42 +89,33 @@ void chGreenBlast_update(Actor *this){
|
||||
|
||||
if (globalTimer_getTime() % 4 == 1) {
|
||||
if (randf() < 0.5) {
|
||||
chSpellFireball_emitSparkles(this->position, 4, ASSET_718_SPRITE_SPARKLE_WHITE_2,
|
||||
chGreenBlastSparklesPositionRange, chGreenBlastSparklesAccelerationRange, chGreenBlastSparklesVelocityRange,
|
||||
chGreenBlastSparklesScaleRange, chGreenBlastSparklesLifetimeRange, chGreenBlastSparklesFade
|
||||
);
|
||||
}
|
||||
else {
|
||||
chSpellFireball_emitSparkles(this->position, 4, ASSET_719_SPRITE_SPARKLE_GREEN_2,
|
||||
chGreenBlastSparklesPositionRange, chGreenBlastSparklesAccelerationRange, chGreenBlastSparklesVelocityRange,
|
||||
chGreenBlastSparklesScaleRange, chGreenBlastSparklesLifetimeRange, chGreenBlastSparklesFade
|
||||
);
|
||||
fight_createSpriteParticles(this->position, 4, ASSET_718_SPRITE_SPARKLE_WHITE_2, chGreenBlastSparklesPositionRange, chGreenBlastSparklesAccelerationRange, chGreenBlastSparklesVelocityRange, chGreenBlastSparklesScaleRange, chGreenBlastSparklesLifetimeRange, chGreenBlastSparklesFade);
|
||||
} else {
|
||||
fight_createSpriteParticles(this->position, 4, ASSET_719_SPRITE_SPARKLE_GREEN_2, chGreenBlastSparklesPositionRange, chGreenBlastSparklesAccelerationRange, chGreenBlastSparklesVelocityRange, chGreenBlastSparklesScaleRange, chGreenBlastSparklesLifetimeRange, chGreenBlastSparklesFade);
|
||||
}
|
||||
}
|
||||
|
||||
player_getPosition(target_position);
|
||||
target_position[1] += 50.0f;
|
||||
func_80387470(this, target_position, this->unk1C[0], this->unk1C[1], 0.0f, 1400.0f, 70.0f);
|
||||
chfinalboss_func_80387470(this, target_position, this->unk1C[0], this->unk1C[1], 0.0f, 1400.0f, 70.0f);
|
||||
|
||||
if (func_8028F25C()) {
|
||||
chGreenBlast_collisionDie(this->marker, 0);
|
||||
}
|
||||
else {
|
||||
if(0.0 <= this->lifetime_value) {
|
||||
} else {
|
||||
if (0.0 <= this->lifetime_value) {
|
||||
this->lifetime_value -= delta_time;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
chGreenBlast_collisionDie(this->marker, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void fight_func_803900DC(ActorMarker *marker, f32 (*arg1)[3], f32 arg2, f32 arg3){
|
||||
void chGreenBlast_func_803900DC(ActorMarker *marker, f32 position[3], f32 arg2, f32 arg3) {
|
||||
Actor *actor = marker_getActor(marker);
|
||||
actor->position_x = (*arg1)[0];
|
||||
actor->position_y = (*arg1)[1];
|
||||
actor->position_z = (*arg1)[2];
|
||||
|
||||
actor->position_x = position[0];
|
||||
actor->position_y = position[1];
|
||||
actor->position_z = position[2];
|
||||
actor->unk1C[0] = arg2;
|
||||
actor->unk1C[1] = arg3;
|
||||
}
|
||||
|
@@ -3,33 +3,22 @@
|
||||
#include "variables.h"
|
||||
#include "fight.h"
|
||||
|
||||
extern f32 func_8038C288(void);
|
||||
extern void subaddie_set_state_with_direction(Actor *, s32, f32, s32);
|
||||
extern void func_80324CFC(f32, s32, s32);
|
||||
extern void func_802F9E44(s32, f32, f32, f32, f32);
|
||||
extern void func_80387470(Actor *, f32 [3], f32, f32, f32, f32, f32);
|
||||
extern void fight_func_8038C0DC(f32[3]);
|
||||
|
||||
extern void chbossjinjo_spawnParticles(Actor *, enum asset_e, enum asset_e, f32);
|
||||
typedef struct {
|
||||
f32 velocity_move_up;
|
||||
f32 boss_scream_time;
|
||||
f32 position_finalboss[3];
|
||||
f32 sfx_volume;
|
||||
f32 sfx_volume_adjust;
|
||||
f32 boss_claw_sfx_volume;
|
||||
s32 final_attack_countdown;
|
||||
s32 hit_count;
|
||||
s32 attack_timer;
|
||||
} ActorLocal_Jinjonator;
|
||||
|
||||
typedef struct{
|
||||
f32 unk0;
|
||||
f32 unk4;
|
||||
f32 unk8[3];
|
||||
f32 unk14;
|
||||
f32 unk18;
|
||||
f32 unk1C;
|
||||
s32 unk20;
|
||||
s32 unk24;
|
||||
s32 unk28;
|
||||
}ActorLocal_fight_9850;
|
||||
|
||||
void chjinjonator_update(Actor *this);
|
||||
|
||||
/* .data */
|
||||
|
||||
//BBC0
|
||||
ActorAnimationInfo D_80391FB0[] = {
|
||||
ActorAnimationInfo chJinjonatorAnimationInfo[] = {
|
||||
{0x000, 00000000},
|
||||
{0x275, 1000000.0f},
|
||||
{0x275, 3.3f},
|
||||
@@ -45,15 +34,10 @@ ActorAnimationInfo D_80391FB0[] = {
|
||||
{0x280, 0.4f}
|
||||
};
|
||||
|
||||
ActorInfo chJinjonator = {
|
||||
MARKER_285_JINJONATOR, ACTOR_3AC_JINJONATOR, ASSET_551_MODEL_JINJONATOR,
|
||||
0x1, D_80391FB0,
|
||||
chjinjonator_update, func_80326224, actor_draw,
|
||||
0, 0, 1.0f, 0
|
||||
};
|
||||
ActorInfo chJinjonator = { MARKER_285_JINJONATOR, ACTOR_3AC_JINJONATOR, ASSET_551_MODEL_JINJONATOR, 1, chJinjonatorAnimationInfo, chjinjonator_update, actor_update_func_80326224, actor_draw, 0, 0, 1.0f, 0 };
|
||||
|
||||
s32 D_8039203C[] = {0xDC, 0x96, 0x82, 0xB4, 0xD2, 0xAA, 0xC8, 0x96, 0xB4};
|
||||
s32 D_80392060[] = {
|
||||
s32 chJinjonatorHitYawValue[] = { 220, 150, 130, 180, 210, 170, 200, 150, 180 };
|
||||
s32 chJinjonatorHitSounds[] = {
|
||||
COMUSIC_9A_JINJONATOR_HITS_GRUNTY_A,
|
||||
COMUSIC_9B_JINJONATOR_HITS_GRUNTY_B,
|
||||
COMUSIC_9C_JINJONATOR_HITS_GRUNTY_C,
|
||||
@@ -65,199 +49,207 @@ s32 D_80392060[] = {
|
||||
COMUSIC_A2_JINJONATOR_HITS_GRUNTY_I
|
||||
};
|
||||
|
||||
/* .bss */
|
||||
f32 D_80392920[3];
|
||||
|
||||
/* .code */
|
||||
void chjinjonator_80390130(f32 position[3], int count, enum asset_e sprite_id){
|
||||
ParticleEmitter *s0 = partEmitMgr_newEmitter(count);
|
||||
particleEmitter_setSprite(s0, sprite_id);
|
||||
particleEmitter_setStartingFrameRange(s0, 1, 6);
|
||||
particleEmitter_setPosition(s0, position);
|
||||
particleEmitter_setParticleAccelerationRange(s0, 0.0f, -200.0f, 0.0f, 0.0f, -200.0f, 0.0f);
|
||||
particleEmitter_setParticleVelocityRange(s0, -100.0f, -100.0f, -100.0f, 100.0f, 100.0f, 100.0f);
|
||||
particleEmitter_setStartingScaleRange(s0, 0.5f, 0.65f);
|
||||
particleEmitter_setFinalScaleRange(s0, 0.0f, 0.0f);
|
||||
particleEmitter_setSpawnIntervalRange(s0, 0.0f, 0.01f);
|
||||
particleEmitter_setParticleLifeTimeRange(s0, 0.65f, 0.85f);
|
||||
particleEmitter_setFade(s0, 0.0f, 0.35f);
|
||||
func_802EFA78(s0, 1);
|
||||
particleEmitter_setDrawMode(s0, 4);
|
||||
particleEmitter_emitN(s0, count);
|
||||
void chjinjonator_createSpriteParticles(f32 position[3], s32 count, enum asset_e sprite_id) {
|
||||
ParticleEmitter *pCtrl = partEmitMgr_newEmitter(count);
|
||||
particleEmitter_setSprite(pCtrl, sprite_id);
|
||||
particleEmitter_setStartingFrameRange(pCtrl, 1, 6);
|
||||
particleEmitter_setPosition(pCtrl, position);
|
||||
particleEmitter_setAccelerationRange(pCtrl, 0.0f, -200.0f, 0.0f, 0.0f, -200.0f, 0.0f);
|
||||
particleEmitter_setParticleVelocityRange(pCtrl, -100.0f, -100.0f, -100.0f, 100.0f, 100.0f, 100.0f);
|
||||
particleEmitter_setStartingScaleRange(pCtrl, 0.5f, 0.65f);
|
||||
particleEmitter_setFinalScaleRange(pCtrl, 0.0f, 0.0f);
|
||||
particleEmitter_setSpawnIntervalRange(pCtrl, 0.0f, 0.01f);
|
||||
particleEmitter_setParticleLifeTimeRange(pCtrl, 0.65f, 0.85f);
|
||||
particleEmitter_setFade(pCtrl, 0.0f, 0.35f);
|
||||
particleEmitter_func_802EFA78(pCtrl, 1);
|
||||
particleEmitter_setDrawMode(pCtrl, 4);
|
||||
particleEmitter_emitN(pCtrl, count);
|
||||
}
|
||||
|
||||
void chjinjonator_80390278(Actor *this){
|
||||
f32 sp34[3];
|
||||
void chjinjonator_spawnSparkleParticles(Actor *this) {
|
||||
f32 position[3];
|
||||
int i;
|
||||
for(i = 0; i < 4; i++){
|
||||
if(randf() < 0.3){
|
||||
func_8034A174(this->marker->unk44, i + 5, sp34);
|
||||
chjinjonator_80390130(sp34, 1, ASSET_718_SPRITE_SPARKLE_WHITE_2);
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (randf() < 0.3) {
|
||||
func_8034A174(this->marker->unk44, i + 5, position);
|
||||
chjinjonator_createSpriteParticles(position, 1, ASSET_718_SPRITE_SPARKLE_WHITE_2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void chjinjonator_spawnAttackParticles(Actor *this, s32 arg1){
|
||||
s32 sp1C;
|
||||
s32 sp18;
|
||||
void chjinjonator_spawnAttackParticles(Actor *this, s32 hit_id){
|
||||
s32 sparkle_sprite_id;
|
||||
s32 smoke_sprite_id;
|
||||
|
||||
switch(arg1){
|
||||
switch (hit_id) {
|
||||
case 1:
|
||||
case 5:
|
||||
sp1C = ASSET_71B_SPRITE_SPARKLE_ORANGE_2;
|
||||
sp18 = ASSET_6C5_SPRITE_SMOKE_ORANGE;
|
||||
sparkle_sprite_id = ASSET_71B_SPRITE_SPARKLE_ORANGE_2;
|
||||
smoke_sprite_id = ASSET_6C5_SPRITE_SMOKE_ORANGE;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
case 6:
|
||||
sp1C = ASSET_719_SPRITE_SPARKLE_GREEN_2;
|
||||
sp18 = ASSET_6C3_SPRITE_SMOKE_GREEN;
|
||||
sparkle_sprite_id = ASSET_719_SPRITE_SPARKLE_GREEN_2;
|
||||
smoke_sprite_id = ASSET_6C3_SPRITE_SMOKE_GREEN;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
case 7:
|
||||
sp1C = ASSET_71A_SPRITE_SPARKLE_PINK_2;
|
||||
sp18 = ASSET_6C6_SPRITE_SMOKE_PINK;
|
||||
sparkle_sprite_id = ASSET_71A_SPRITE_SPARKLE_PINK_2;
|
||||
smoke_sprite_id = ASSET_6C6_SPRITE_SMOKE_PINK;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
case 8:
|
||||
sp1C = ASSET_717_SPRITE_SPARKLE_YELLOW_2;
|
||||
sp18 = ASSET_6C4_SPRITE_SMOKE_YELLOW;
|
||||
sparkle_sprite_id = ASSET_717_SPRITE_SPARKLE_YELLOW_2;
|
||||
smoke_sprite_id = ASSET_6C4_SPRITE_SMOKE_YELLOW;
|
||||
break;
|
||||
|
||||
case 9:
|
||||
case 10:
|
||||
sp1C = ASSET_718_SPRITE_SPARKLE_WHITE_2;
|
||||
sp18 = ASSET_6C2_SPRITE_SMOKE_WHITE;
|
||||
sparkle_sprite_id = ASSET_718_SPRITE_SPARKLE_WHITE_2;
|
||||
smoke_sprite_id = ASSET_6C2_SPRITE_SMOKE_WHITE;
|
||||
break;
|
||||
}
|
||||
chbossjinjo_spawnParticles(this, sp1C, sp18, 2.0f);
|
||||
chbossjinjo_spawnParticlesAtFinalBoss(this, sparkle_sprite_id, smoke_sprite_id, 2.0f);
|
||||
}
|
||||
|
||||
void chjinjonator_803903C4(Actor *this){
|
||||
void chjinjonator_803903C4(Actor *this) {
|
||||
animctrl_setSmoothTransition(this->animctrl, FALSE);
|
||||
subaddie_set_state_with_direction(this, 7, 0.001f, 1);
|
||||
subaddie_set_state_with_direction(this, JINJONATOR_STATE_7_ATTACK_END, 0.001f, 1);
|
||||
actor_loopAnimation(this);
|
||||
}
|
||||
|
||||
void chjinjonator_8039040C(Actor *this){
|
||||
ActorLocal_fight_9850 *local = (ActorLocal_fight_9850 *)&this->local;
|
||||
void chjinjonator_8039040C(Actor *this) {
|
||||
ActorLocal_Jinjonator *local = (ActorLocal_Jinjonator *) &this->local;
|
||||
f32 tick = time_getDelta();
|
||||
|
||||
local->unk14 = MIN(1.99, local->unk14 + local->unk18*tick);
|
||||
sfxsource_playSfxAtVolume(this->unk44_31, local->unk14);
|
||||
if(func_8030E3FC(this->unk44_31) == 0)
|
||||
local->sfx_volume = MIN(1.99, local->sfx_volume + local->sfx_volume_adjust * tick);
|
||||
sfxsource_playSfxAtVolume(this->unk44_31, local->sfx_volume);
|
||||
|
||||
if (func_8030E3FC(this->unk44_31) == 0)
|
||||
func_8030E2C4(this->unk44_31);
|
||||
}
|
||||
|
||||
void chjinjonator_update(Actor *this){
|
||||
ActorLocal_fight_9850 *local = (ActorLocal_fight_9850 *)&this->local;
|
||||
f32 sp58;
|
||||
f32 sp54;
|
||||
ActorLocal_Jinjonator *local = (ActorLocal_Jinjonator *) &this->local;
|
||||
f32 time_delta = time_getDelta();
|
||||
f32 sp54 = animctrl_getDuration(this->animctrl);
|
||||
f32 sp50;
|
||||
s32 sp4C;
|
||||
f32 sp48;
|
||||
|
||||
|
||||
sp58 = time_getDelta();
|
||||
sp54 = animctrl_getDuration(this->animctrl);
|
||||
|
||||
if(!this->volatile_initialized){
|
||||
if (!this->volatile_initialized) {
|
||||
this->volatile_initialized = TRUE;
|
||||
local->unk18 = 0.40000000000000013 / (this->lifetime_value + 3.3);
|
||||
local->unk14 = 0.7f;
|
||||
local->sfx_volume_adjust = 0.40000000000000013 / (this->lifetime_value + 3.3);
|
||||
local->sfx_volume = 0.7f;
|
||||
func_8025A6EC(JINGLE_MENACING_GRUNTILDA_B, 20000);
|
||||
func_8025A58C(0, 0x7fff);
|
||||
this->unk44_31 = func_8030ED2C(SFX_17A_SHIPHORN, 3);
|
||||
sfxsource_setSampleRate(this->unk44_31, 25000);
|
||||
sfxsource_playSfxAtVolume(this->unk44_31, local->unk14);
|
||||
sfxsource_playSfxAtVolume(this->unk44_31, local->sfx_volume);
|
||||
func_8030E2C4(this->unk44_31);
|
||||
local->unk28 = 0xC;
|
||||
}//L80390574
|
||||
local->attack_timer = 12;
|
||||
}
|
||||
|
||||
if(0.0 < local->unk4){
|
||||
local->unk4 -= sp58;
|
||||
if (0.0 < local->boss_scream_time) {
|
||||
local->boss_scream_time -= time_delta;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
switch(this->state){
|
||||
case 1: //803905D4
|
||||
|
||||
switch (this->state) {
|
||||
case JINJONATOR_STATE_1_RELEASE:
|
||||
chjinjonator_8039040C(this);
|
||||
animctrl_setAnimTimer(this->animctrl, 0.0f);
|
||||
this->lifetime_value -= sp58;
|
||||
if(this->lifetime_value < 0.0){
|
||||
subaddie_set_state_with_direction(this, 2, 0.001f, 1);
|
||||
this->lifetime_value -= time_delta;
|
||||
|
||||
if (this->lifetime_value < 0.0) {
|
||||
subaddie_set_state_with_direction(this, JINJONATOR_STATE_2_WAKE_UP, 0.001f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 2: //80390648
|
||||
case JINJONATOR_STATE_2_WAKE_UP:
|
||||
chjinjonator_8039040C(this);
|
||||
if(actor_animationIsAt(this, 0.27f))
|
||||
|
||||
if (actor_animationIsAt(this, 0.27f))
|
||||
FUNC_8030E624(SFX_D0_GRIMLET_SQUEAK, 0.7f, 29000);
|
||||
|
||||
if(actor_animationIsAt(this, 0.44f)){
|
||||
if (actor_animationIsAt(this, 0.44f)) {
|
||||
FUNC_8030E624(SFX_176_JINJONATOR_JINJOOO_1, 1.0f, 25000);
|
||||
timed_playSfx(0.66f, SFX_176_JINJONATOR_JINJOOO_1, 0.9f, 25000);
|
||||
}
|
||||
|
||||
if(actor_animationIsAt(this, 0.999f)){
|
||||
subaddie_set_state_with_direction(this, 3, 0.001f, 1);
|
||||
if (actor_animationIsAt(this, 0.999f)) {
|
||||
subaddie_set_state_with_direction(this, JINJONATOR_STATE_3_MOVE_UPWARD, 0.001f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
func_8030E394(this->unk44_31);
|
||||
func_8030DA44(this->unk44_31);
|
||||
this->unk44_31 = 0;
|
||||
local->unk0 = (320.0f - this->position_y) * 0.5;
|
||||
local->velocity_move_up = (320.0f - this->position_y) * 0.5;
|
||||
func_80324CFC(0.0f, COMUSIC_8C_JINJONATOR_POWERUP, 32000);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 3: //8039073C
|
||||
chjinjonator_80390278(this);
|
||||
if(this->position_y < 320.0f){
|
||||
this->position_y = MIN(320.0f, this->position_y + local->unk0*sp58);
|
||||
}//L803907A0
|
||||
case JINJONATOR_STATE_3_MOVE_UPWARD:
|
||||
chjinjonator_spawnSparkleParticles(this);
|
||||
|
||||
if(320.0f == this->position_y){
|
||||
subaddie_set_state_with_direction(this, 4, 0.001f, 1);
|
||||
actor_loopAnimation(this);
|
||||
local->unk4 = func_8038C288();
|
||||
if (this->position_y < 320.0f) {
|
||||
this->position_y = MIN(320.0f, this->position_y + local->velocity_move_up * time_delta);
|
||||
}
|
||||
|
||||
if (320.0f == this->position_y) {
|
||||
subaddie_set_state_with_direction(this, JINJONATOR_STATE_4_PREPARE_SPIN_UP, 0.001f, 1);
|
||||
actor_loopAnimation(this);
|
||||
local->boss_scream_time = chfinalboss_getScreamTime();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 4: //803907D4
|
||||
chjinjonator_80390278(this);
|
||||
subaddie_set_state_with_direction(this, 5, 0.001f, 1);
|
||||
case JINJONATOR_STATE_4_PREPARE_SPIN_UP:
|
||||
chjinjonator_spawnSparkleParticles(this);
|
||||
subaddie_set_state_with_direction(this, JINJONATOR_STATE_5_SPIN_UP, 0.001f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
break;
|
||||
|
||||
case 5: //80390804
|
||||
chjinjonator_80390278(this);
|
||||
if(actor_animationIsAt(this, 0.998f)){
|
||||
case JINJONATOR_STATE_5_SPIN_UP:
|
||||
chjinjonator_spawnSparkleParticles(this);
|
||||
|
||||
if (actor_animationIsAt(this, 0.998f)) {
|
||||
animctrl_setSmoothTransition(this->animctrl, FALSE);
|
||||
subaddie_set_state_with_direction(this, 6, 0.0001f, 1);
|
||||
subaddie_set_state_with_direction(this, JINJONATOR_STATE_6_ATTACK, 0.0001f, 1);
|
||||
actor_loopAnimation(this);
|
||||
if(this->unk44_31 == 0){
|
||||
local->unk18 = 0.1f;
|
||||
local->unk14 = 0.4f;
|
||||
|
||||
if (this->unk44_31 == 0) {
|
||||
local->sfx_volume_adjust = 0.1f;
|
||||
local->sfx_volume = 0.4f;
|
||||
this->unk44_31 = func_8030ED2C(0x416, 3);
|
||||
sfxsource_setSampleRate(this->unk44_31, 26000);
|
||||
sfxsource_playSfxAtVolume(this->unk44_31, local->unk14);
|
||||
sfxsource_playSfxAtVolume(this->unk44_31, local->sfx_volume);
|
||||
func_8030E2C4(this->unk44_31);
|
||||
}//L803908AC
|
||||
local->unk1C = 0.5f;
|
||||
}
|
||||
|
||||
local->boss_claw_sfx_volume = 0.5f;
|
||||
}
|
||||
break;
|
||||
|
||||
case 6: //803908BC
|
||||
this->position[1] = MIN(1e+8f, this->position[1] + 80.0f*sp58);
|
||||
animctrl_setDuration(this->animctrl, MAX(0.4, sp54 - (0.5*sp58)));
|
||||
chjinjonator_80390278(this);
|
||||
case JINJONATOR_STATE_6_ATTACK:
|
||||
this->position[1] = MIN(1e+8f, this->position[1] + 80.0f * time_delta);
|
||||
animctrl_setDuration(this->animctrl, MAX(0.4, sp54 - (0.5 * time_delta)));
|
||||
chjinjonator_spawnSparkleParticles(this);
|
||||
if(actor_animationIsAt(this, 0.25f) || actor_animationIsAt(this, 0.75f)){
|
||||
FUNC_8030E624(SFX_2_CLAW_SWIPE, local->unk1C, 26000);
|
||||
local->unk1C += 0.04;
|
||||
}//L80390A4C
|
||||
FUNC_8030E624(SFX_2_CLAW_SWIPE, local->boss_claw_sfx_volume, 26000);
|
||||
local->boss_claw_sfx_volume += 0.04;
|
||||
}
|
||||
chjinjonator_8039040C(this);
|
||||
if(actor_animationIsAt(this, 0.5f)){
|
||||
if(--local->unk28 <= 0){
|
||||
if(--local->attack_timer <= 0){
|
||||
chjinjonator_803903C4(this);
|
||||
FUNC_8030E8B4(SFX_135_CARTOONY_SPRING, 1.0f, 32000, this->position, 10000, 16000);
|
||||
func_80324D54(0.1f, SFX_C1_BUZZBOMB_ATTACK, 0.85f, 32000, this->position, 5000.0f, 12000.0f);
|
||||
@@ -268,24 +260,26 @@ void chjinjonator_update(Actor *this){
|
||||
}
|
||||
func_80324D2C(0.0f, COMUSIC_8C_JINJONATOR_POWERUP);
|
||||
func_8034A174(this->marker->unk44, 0x1f, this->position);
|
||||
this->velocity[0] = (this->position[0] - this->unk1C[0]) / sp58;
|
||||
this->velocity[1] = (this->position[1] - this->unk1C[1]) / sp58;
|
||||
this->velocity[2] = (this->position[2] - this->unk1C[2]) / sp58;
|
||||
this->velocity[0] = (this->position[0] - this->unk1C[0]) / time_delta;
|
||||
this->velocity[1] = (this->position[1] - this->unk1C[1]) / time_delta;
|
||||
this->velocity[2] = (this->position[2] - this->unk1C[2]) / time_delta;
|
||||
}
|
||||
|
||||
}//L80390B60
|
||||
}
|
||||
else{
|
||||
func_8034A174(this->marker->unk44, 0x1f, this->unk1C);
|
||||
}
|
||||
break;
|
||||
case 7: //80390B78
|
||||
sp50 = local->unk24*0.11 + 1.0;
|
||||
chjinjonator_80390278(this);
|
||||
fight_func_8038C0DC(local->unk8);
|
||||
local->unk8[1] += 100.0f;
|
||||
func_80387470(this, local->unk8, sp50*2400.0f, sp50*2400.0f*4.2, 170.0f, sp50*2500.0f, 0.0f);
|
||||
|
||||
case JINJONATOR_STATE_7_ATTACK_END:
|
||||
sp50 = local->hit_count*0.11 + 1.0;
|
||||
chjinjonator_spawnSparkleParticles(this);
|
||||
chfinalboss_getPosition(local->position_finalboss);
|
||||
local->position_finalboss[1] += 100.0f;
|
||||
chfinalboss_func_80387470(this, local->position_finalboss, sp50*2400.0f, sp50*2400.0f*4.2, 170.0f, sp50*2500.0f, 0.0f);
|
||||
break;
|
||||
case 8: //80390C48
|
||||
|
||||
case JINJONATOR_STATE_8:
|
||||
if(actor_animationIsAt(this, 0.16f) || actor_animationIsAt(this, 0.47f))
|
||||
FUNC_8030E624(SFX_2_CLAW_SWIPE, 1.0f, 28000);
|
||||
|
||||
@@ -297,129 +291,134 @@ void chjinjonator_update(Actor *this){
|
||||
this->velocity[2] = 0.0f;
|
||||
this->velocity[1] = 0.0f;
|
||||
this->velocity[0] = 0.0f;
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 9: //80390D20
|
||||
if(actor_animationIsAt(this, 0.16f) || actor_animationIsAt(this, 0.47f))
|
||||
case JINJONATOR_STATE_9_FINAL_ATTACK_POWER_UP:
|
||||
if (actor_animationIsAt(this, 0.16f) || actor_animationIsAt(this, 0.47f)) {
|
||||
FUNC_8030E624(SFX_2_CLAW_SWIPE, 1.0f, 28000);
|
||||
}
|
||||
|
||||
|
||||
if(actor_animationIsAt(this, 0.8f)){
|
||||
if (actor_animationIsAt(this, 0.8f)) {
|
||||
sp4C = func_802F9AA8(SFX_141_MECHANICAL_WINCH);
|
||||
func_802F9F80(sp4C, 0.0f, 5.92f, 0.0f);
|
||||
func_802F9E44(sp4C, 0.1f, 5.92f, 0.3f, 1.0f);
|
||||
func_802FA060(sp4C, 32000, 32000, 0.0f);
|
||||
}
|
||||
|
||||
if(actor_animationIsAt(this, 0.999f)){
|
||||
subaddie_set_state_with_direction(this, 0xA, 0.001f, 1);
|
||||
if (actor_animationIsAt(this, 0.999f)) {
|
||||
subaddie_set_state_with_direction(this, JINJONATOR_STATE_10_FINAL_ATTACK_PREPARE, 0.001f, 1);
|
||||
actor_loopAnimation(this);
|
||||
local->unk20 = 0xE;
|
||||
local->final_attack_countdown = 14;
|
||||
}
|
||||
break;
|
||||
|
||||
case 10: //80390E1C
|
||||
if(actor_animationIsAt(this, 0.999f)){
|
||||
local->unk20--;
|
||||
case JINJONATOR_STATE_10_FINAL_ATTACK_PREPARE:
|
||||
if (actor_animationIsAt(this, 0.999f)) {
|
||||
local->final_attack_countdown--;
|
||||
}
|
||||
|
||||
if(local->unk20 == 2 && actor_animationIsAt(this, 0.1f)){
|
||||
if (local->final_attack_countdown == 2 && actor_animationIsAt(this, 0.1f)) {
|
||||
FUNC_8030E624(SFX_176_JINJONATOR_JINJOOO_1, 1.0f, 32000);
|
||||
timed_playSfx(0.66f, SFX_176_JINJONATOR_JINJOOO_1, 0.9f, 32000);
|
||||
}//L80390E90
|
||||
}
|
||||
|
||||
if(local->unk20 <= 0){
|
||||
if (local->final_attack_countdown <= 0) {
|
||||
s32 text_id;
|
||||
subaddie_set_state_with_direction(this, 0xB, 0.001f, 1);
|
||||
subaddie_set_state_with_direction(this, JINJONATOR_STATE_11_FINAL_ATTACK, 0.001f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
func_802BB41C(0);
|
||||
text_id = 0x115e + randi2(0,5);
|
||||
gcdialog_showText(text_id, 0x20, 0, 0, 0, 0);
|
||||
}
|
||||
break;
|
||||
case 11: //80390EF8
|
||||
if(actor_animationIsAt(this, 0.999f)){
|
||||
|
||||
case JINJONATOR_STATE_11_FINAL_ATTACK:
|
||||
if (actor_animationIsAt(this, 0.999f)) {
|
||||
func_8034A174(this->marker->unk44, 0x1f, this->position);
|
||||
FUNC_8030E624(SFX_17B_AIRPLANE_FALLING, 1.0f, 32000);
|
||||
FUNC_8030E624(SFX_147_GRUNTY_SPELL_ATTACK_2, 1.0f, 32000);
|
||||
animctrl_setSmoothTransition(this->animctrl, 0);
|
||||
subaddie_set_state_with_direction(this, 0xC, 0.001f, 1);
|
||||
subaddie_set_state_with_direction(this, JINJONATOR_STATE_12_FINAL_ATTACK_END, 0.001f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
this->velocity[2] = 0.0f;
|
||||
this->velocity[1] = 0.0f;
|
||||
this->velocity[0] = 0.0f;
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
case 12: //80390F7C
|
||||
sp48 = local->unk24*0.11 + 1.0;
|
||||
chjinjonator_80390278(this);
|
||||
fight_func_8038C0DC(local->unk8);
|
||||
local->unk8[1] += 100.0f;
|
||||
func_80387470(this, local->unk8, sp48*2400.0f, sp48*2400.0f*4.2, 170.0f, sp48*2500.0f, 0.0f);
|
||||
|
||||
case JINJONATOR_STATE_12_FINAL_ATTACK_END:
|
||||
sp48 = local->hit_count * 0.11 + 1.0;
|
||||
chjinjonator_spawnSparkleParticles(this);
|
||||
chfinalboss_getPosition(local->position_finalboss);
|
||||
local->position_finalboss[1] += 100.0f;
|
||||
chfinalboss_func_80387470(this, local->position_finalboss, sp48*2400.0f, sp48*2400.0f*4.2, 170.0f, sp48*2500.0f, 0.0f);
|
||||
break;
|
||||
}//L80391044
|
||||
}
|
||||
|
||||
func_8034A174(this->marker->unk44, 0x1f, D_80392920);
|
||||
}
|
||||
|
||||
void chjinjonator_attack(ActorMarker *marker, s32 hit_count, bool mirrored) {
|
||||
Actor *temp_s0;
|
||||
ActorLocal_fight_9850 *local;
|
||||
Actor *actor_jinjonator = marker_getActor(marker);
|
||||
ActorLocal_Jinjonator *local = (ActorLocal_Jinjonator *) &actor_jinjonator->local;
|
||||
s32 pad;
|
||||
|
||||
temp_s0 = marker_getActor(marker);
|
||||
local = (ActorLocal_fight_9850 *)&temp_s0->local;
|
||||
|
||||
func_8025A6EC(D_80392060[hit_count-1], 20000);
|
||||
func_8025A6EC(chJinjonatorHitSounds[hit_count - 1], 20000);
|
||||
|
||||
chjinjonator_spawnAttackParticles(temp_s0, hit_count);
|
||||
FUNC_8030E8B4(SFX_1B_EXPLOSION_1, 1.0f, 32000, temp_s0->position, 1000, 6500);
|
||||
chjinjonator_spawnAttackParticles(actor_jinjonator, hit_count);
|
||||
FUNC_8030E8B4(SFX_1B_EXPLOSION_1, 1.0f, 32000, actor_jinjonator->position, 1000, 6500);
|
||||
|
||||
temp_s0->velocity[2] = 0.0f;
|
||||
temp_s0->velocity[1] = 0.0f;
|
||||
temp_s0->velocity[0] = 0.0f;
|
||||
actor_jinjonator->velocity[2] = 0.0f;
|
||||
actor_jinjonator->velocity[1] = 0.0f;
|
||||
actor_jinjonator->velocity[0] = 0.0f;
|
||||
|
||||
temp_s0->yaw = (f32)D_8039203C[hit_count-1];
|
||||
actor_jinjonator->yaw = (f32)chJinjonatorHitYawValue[hit_count - 1];
|
||||
if (mirrored) {
|
||||
temp_s0->yaw = (f32) (temp_s0->yaw + 180.0f);
|
||||
actor_jinjonator->yaw = (f32) (actor_jinjonator->yaw + 180.0f);
|
||||
}
|
||||
local->unk24 = hit_count;
|
||||
animctrl_setSmoothTransition(temp_s0->animctrl, 1);
|
||||
actor_playAnimationOnce(temp_s0);
|
||||
if (&D_8039203C[hit_count] >= D_80392060) {
|
||||
subaddie_set_state_with_direction(temp_s0, 9, 0.001f, 1);
|
||||
|
||||
local->hit_count = hit_count;
|
||||
animctrl_setSmoothTransition(actor_jinjonator->animctrl, 1);
|
||||
actor_playAnimationOnce(actor_jinjonator);
|
||||
|
||||
if (&chJinjonatorHitYawValue[hit_count] >= chJinjonatorHitSounds) {
|
||||
subaddie_set_state_with_direction(actor_jinjonator, JINJONATOR_STATE_9_FINAL_ATTACK_POWER_UP, 0.001f, 1);
|
||||
return;
|
||||
}
|
||||
subaddie_set_state_with_direction(temp_s0, 8, 0.001f, 1);
|
||||
animctrl_setDuration(temp_s0->animctrl, (f32) (1.75 - 0.11 * local->unk24));
|
||||
|
||||
subaddie_set_state_with_direction(actor_jinjonator, JINJONATOR_STATE_8, 0.001f, 1);
|
||||
animctrl_setDuration(actor_jinjonator->animctrl, (f32) (1.75 - 0.11 * local->hit_count));
|
||||
}
|
||||
|
||||
void chjinjonator_finalAttack(ActorMarker *marker){
|
||||
void chjinjonator_finalAttack(ActorMarker *marker) {
|
||||
Actor *actor = marker_getActor(marker);
|
||||
chjinjonator_spawnAttackParticles(actor, 0xa);
|
||||
chjinjonator_spawnAttackParticles(actor, 10);
|
||||
marker_despawn(actor->marker);
|
||||
}
|
||||
|
||||
f32 chjinjonator_80391234(void){
|
||||
f32 chjinjonator_80391234(void) {
|
||||
return 3.3f;
|
||||
}
|
||||
|
||||
f32 chjinjonator_80391240(void){
|
||||
f32 chjinjonator_80391240(void) {
|
||||
return 2.0;
|
||||
}
|
||||
|
||||
f32 chjinjonator_80391250(void){
|
||||
f32 chjinjonator_80391250(void) {
|
||||
return 4.62f;
|
||||
}
|
||||
|
||||
bool chjinjonator_8039125C(ActorMarker *marker){
|
||||
bool chjinjonator_8039125C(ActorMarker *marker) {
|
||||
u32 state = (u32) (marker_getActor(marker))->state;
|
||||
if (state == 0x7 || state == 0xC) {
|
||||
|
||||
if (state == JINJONATOR_STATE_7_ATTACK_END || state == JINJONATOR_STATE_12_FINAL_ATTACK_END) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@@ -4,61 +4,36 @@
|
||||
#include "fight.h"
|
||||
|
||||
typedef struct {
|
||||
u8 unk0[4];
|
||||
}ActorLocal_fight_7BE0;
|
||||
u8 egg_hits[4];
|
||||
} ActorLocal_BossJinjonatorBase;
|
||||
|
||||
void chjinjonatorbase_update(Actor *);
|
||||
ActorInfo chJinjonatorBase = { MARKER_27F_JINJONATOR_STATUE_BASE, ACTOR_3A9_JINJONATOR_STATUE_BASE, ASSET_544_MODEL_JINJONATOR_STATUE_BASE, 1, NULL, chjinjonatorbase_update, actor_update_func_80326224, actor_draw, 0, 2048, 0.0f, 0 };
|
||||
|
||||
/* .data */
|
||||
ActorInfo chJinjonatorBase = {
|
||||
MARKER_27F_JINJONATOR_STATUE_BASE, ACTOR_3A9_JINJONATOR_STATUE_BASE, ASSET_544_MODEL_JINJONATOR_STATUE_BASE,
|
||||
0x1, NULL,
|
||||
chjinjonatorbase_update, func_80326224, actor_draw,
|
||||
0, 0x800, 0.0f, 0
|
||||
};
|
||||
s32 chJinjonatorBase_SmokeColor[3] = { 200, 200, 160 };
|
||||
ParticleScaleAndLifetimeRanges chJinjonatorBase_SmokeScaleAndLifetimeSettings = { {1.0f, 1.0f}, {1.7f, 2.7f}, {0.0f, 0.05f}, {2.6f, 3.4f}, 0.0f, 0.1f };
|
||||
ParticleSettingsVelocityPosition chJinjonatorBase_SmokeVelocityPositionSettings = { { {-170.0f, 0.0f, -170.0f}, {170.0f, 100.0f, 170.0f} }, { {-90.0f, 0.0f, -80.0f}, {80.0f, 60.0f, 80.0f} } };
|
||||
|
||||
s32 D_80391A64[3] = {0xC8, 0xC8, 0xA0};
|
||||
|
||||
ParticleScaleAndLifetimeRanges fight_D_80391A70 = {
|
||||
{1.0f, 1.0f},
|
||||
{1.7f, 2.7f},
|
||||
{0.0f, 0.05f},
|
||||
{2.6f, 3.4f},
|
||||
0.0f, 0.1f
|
||||
};
|
||||
|
||||
struct42s D_80391A98 = {
|
||||
{ {-170.0f, 0.0f, -170.0f}, {170.0f, 100.0f, 170.0f}},
|
||||
{ {-90.0f, 0.0f, -80.0f},
|
||||
{80.0f, 60.0f, 80.0f}
|
||||
}
|
||||
};
|
||||
|
||||
/* .code */
|
||||
void chjinjonatorbase_spawnStoneJinjo(ActorMarker *marker) {
|
||||
Actor *this;
|
||||
Actor *stone_jinjo;
|
||||
Actor *actor_jinjonatorbase = marker_getActor(marker);
|
||||
Actor *actor_stonejinjo = spawn_child_actor(ACTOR_3A1_STONE_JINJO, &actor_jinjonatorbase);
|
||||
|
||||
this = marker_getActor(marker);
|
||||
stone_jinjo = spawn_child_actor(ACTOR_3A1_STONE_JINJO, &this);
|
||||
stone_jinjo->unkF4_8 = this->unkF4_8;
|
||||
stone_jinjo->position_y = stone_jinjo->position_y + 155.0f;
|
||||
this->unk100 = stone_jinjo->marker;
|
||||
actor_stonejinjo->unkF4_8 = actor_jinjonatorbase->unkF4_8;
|
||||
actor_stonejinjo->position_y = actor_stonejinjo->position_y + 155.0f;
|
||||
actor_jinjonatorbase->unk100 = actor_stonejinjo->marker;
|
||||
}
|
||||
|
||||
void func_8038E03C(f32 arg0[3], u32 arg1) {
|
||||
ParticleEmitter *temp_v0 = partEmitMgr_newEmitter(arg1);
|
||||
|
||||
particleEmitter_setSprite(temp_v0, ASSET_70E_SPRITE_SMOKE_2);
|
||||
particleEmitter_setRGB(temp_v0, D_80391A64);
|
||||
particleEmitter_setStartingFrameRange(temp_v0, 0, 7);
|
||||
particleEmitter_setPosition(temp_v0, arg0);
|
||||
particleEmitter_setPositionAndVelocityRanges(temp_v0, &D_80391A98);
|
||||
particleEmitter_setScaleAndLifetimeRanges(temp_v0, &fight_D_80391A70);
|
||||
particleEmitter_emitN(temp_v0, arg1);
|
||||
void chjinjonatorbase_createSmokeParticles(f32 position[3], s32 count) {
|
||||
ParticleEmitter *pCtrl = partEmitMgr_newEmitter(count);
|
||||
particleEmitter_setSprite(pCtrl, ASSET_70E_SPRITE_SMOKE_2);
|
||||
particleEmitter_setRGB(pCtrl, chJinjonatorBase_SmokeColor);
|
||||
particleEmitter_setStartingFrameRange(pCtrl, 0, 7);
|
||||
particleEmitter_setPosition(pCtrl, position);
|
||||
particleEmitter_setPositionAndVelocityRanges(pCtrl, &chJinjonatorBase_SmokeVelocityPositionSettings);
|
||||
particleEmitter_setScaleAndLifetimeRanges(pCtrl, &chJinjonatorBase_SmokeScaleAndLifetimeSettings);
|
||||
particleEmitter_emitN(pCtrl, count);
|
||||
}
|
||||
|
||||
void func_8038E0D4(Actor *arg0, s32 arg1, f32 arg2, f32 arg3, f32 arg4) {
|
||||
void chjinjonatorbase_func_8038E0D4(Actor *arg0, s32 arg1, f32 arg2, f32 arg3, f32 arg4) {
|
||||
s32 temp_v0 = func_8034C2C4(arg0->marker, arg1);
|
||||
|
||||
if (temp_v0) {
|
||||
@@ -66,67 +41,70 @@ void func_8038E0D4(Actor *arg0, s32 arg1, f32 arg2, f32 arg3, f32 arg4) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_8038E120(ActorMarker * marker, ActorMarker *arg1){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
ActorLocal_fight_7BE0 * local = (ActorLocal_fight_7BE0 *)&actor->local;
|
||||
int indx;
|
||||
s32 remaining;
|
||||
f32 pad;
|
||||
|
||||
void chjinjonatorbase_getHitByEgg(ActorMarker *this, ActorMarker *other) {
|
||||
Actor *actor_jinjonatorbase = marker_getActor(this);
|
||||
ActorLocal_BossJinjonatorBase *local = (ActorLocal_BossJinjonatorBase *) &actor_jinjonatorbase->local;
|
||||
int indx = this->unk40_31 - 1;
|
||||
s32 remaining_hits;
|
||||
f32 pad;
|
||||
|
||||
indx = marker->unk40_31 - 1;
|
||||
if(actor->state != 3){
|
||||
if(local->unk0[indx]){
|
||||
local->unk0[indx]--;
|
||||
if (actor_jinjonatorbase->state != CHBOSSJINJOBASE_STATE_3_SPAWNED_BOSS_JINJO) {
|
||||
if (local->egg_hits[indx]) {
|
||||
local->egg_hits[indx]--;
|
||||
comusic_playTrack(COMUSIC_2B_DING_B);
|
||||
if(local->unk0[indx] <= 0){
|
||||
func_8038E0D4(actor, indx + 0x19a, -100.0f, 0.0f, 1.2f);
|
||||
func_80324D54(1.2f, SFX_90_SWITCH_PRESS, 1.0f, 32000, actor->position, 1000.0f, 2000.0f);
|
||||
|
||||
if (local->egg_hits[indx] <= 0) {
|
||||
chjinjonatorbase_func_8038E0D4(actor_jinjonatorbase, indx + 0x19a, -100.0f, 0.0f, 1.2f);
|
||||
func_80324D54(1.2f, SFX_90_SWITCH_PRESS, 1.0f, 32000, actor_jinjonatorbase->position, 1000.0f, 2000.0f);
|
||||
}
|
||||
}//L8038E210
|
||||
remaining = local->unk0[0] + local->unk0[1] + local->unk0[2] + local->unk0[3];
|
||||
if( remaining <= 0){
|
||||
func_8038C148();
|
||||
subaddie_set_state(actor, 3);
|
||||
chstonejinjo_breakOpen(actor->unk100);
|
||||
}
|
||||
}//L8038E24C
|
||||
|
||||
remaining_hits = local->egg_hits[0] + local->egg_hits[1] + local->egg_hits[2] + local->egg_hits[3];
|
||||
|
||||
if (remaining_hits <= 0) {
|
||||
chfinalboss_setBossDefeated();
|
||||
subaddie_set_state(actor_jinjonatorbase, CHBOSSJINJOBASE_STATE_3_SPAWNED_BOSS_JINJO);
|
||||
chstonejinjo_breakOpen(actor_jinjonatorbase->unk100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void func_8038E260(ActorMarker *arg0) {
|
||||
Actor *sp24 = marker_getActor(arg0);
|
||||
void chjinjonatorbase_spawnActivator(ActorMarker *marker) {
|
||||
Actor *sp24 = marker_getActor(marker);
|
||||
|
||||
func_802BB3DC(0, 18.0f, 0.92f);
|
||||
__spawnQueue_add_4((GenFunction_4) spawnQueue_actor_f32, 0x3AD, *(u32 *)(&sp24->unk1C_x), *(u32 *)(&sp24->unk1C_y), *(u32 *)(&sp24->unk1C_z));
|
||||
func_8038E03C(sp24->unk1C, 0x10);
|
||||
__spawnQueue_add_4((GenFunction_4) spawnQueue_actor_f32, ACTOR_3AD_JINJONATOR_STATUE_BASE_ACTIVATOR, *(u32 *)(&sp24->unk1C_x), *(u32 *)(&sp24->unk1C_y), *(u32 *)(&sp24->unk1C_z));
|
||||
chjinjonatorbase_createSmokeParticles(sp24->unk1C, 16);
|
||||
}
|
||||
|
||||
void func_8038E2CC(ActorMarker *arg0) {
|
||||
func_8032BB88(marker_getActor(arg0), -1, 0x7FFF);
|
||||
void chjinjonatorbase_func_8038E2CC(ActorMarker *marker) {
|
||||
func_8032BB88(marker_getActor(marker), -1, 0x7FFF);
|
||||
}
|
||||
|
||||
void chjinjonatorbase_update(Actor *this){
|
||||
ActorLocal_fight_7BE0 *local = (ActorLocal_fight_7BE0 *)&this->local;
|
||||
f32 sp58 = time_getDelta();
|
||||
s32 temp_s1 = globalTimer_getTime() & 0xf;
|
||||
ActorLocal_BossJinjonatorBase *local = (ActorLocal_BossJinjonatorBase *) &this->local;
|
||||
f32 delta_time = time_getDelta();
|
||||
s32 rumbling = globalTimer_getTime() & 0x0F;
|
||||
s32 temp_s0;
|
||||
int i;
|
||||
Actor *other;
|
||||
f32 temp_f20;
|
||||
f32 sp38[3];
|
||||
|
||||
Actor *actor_jinjonator;
|
||||
f32 y_delta;
|
||||
f32 position_delta[3];
|
||||
|
||||
marker_loadModelBin(this->marker);
|
||||
if(!this->volatile_initialized){
|
||||
|
||||
if (!this->volatile_initialized) {
|
||||
this->volatile_initialized = TRUE;
|
||||
marker_setCollisionScripts(this->marker, NULL, func_8038E120, NULL);
|
||||
marker_setCollisionScripts(this->marker, NULL, chjinjonatorbase_getHitByEgg, NULL);
|
||||
this->marker->propPtr->unk8_3 = 1;
|
||||
actor_collisionOn(this);
|
||||
for(i = 0; i < 4; i++){
|
||||
local->unk0[i] = 5;
|
||||
func_8038E0D4(this, 0x19a + i, 0.0f, -300.0f, 0.0f);
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
local->egg_hits[i] = 5;
|
||||
chjinjonatorbase_func_8038E0D4(this, 0x19a + i, 0.0f, -300.0f, 0.0f);
|
||||
}
|
||||
|
||||
this->unk44_31 = sfxsource_createSfxsourceAndReturnIndex();
|
||||
sfxsource_setSfxId(this->unk44_31, 0x3f9);
|
||||
func_8030DD14(this->unk44_31, 3);
|
||||
@@ -140,70 +118,70 @@ void chjinjonatorbase_update(Actor *this){
|
||||
func_802FA060(temp_s0, 17000, 17000, 0.0f);
|
||||
func_8025A6EC(JINGLE_MENACING_GRUNTILDA_A, 15000);
|
||||
func_8032BB88(this, 0, 0x7fff);
|
||||
timedFunc_set_1(8.0f, (GenFunction_1)func_8038E2CC, reinterpret_cast(s32,this->marker));
|
||||
timedFunc_set_1(8.0f, (GenFunction_1)chjinjonatorbase_func_8038E2CC, reinterpret_cast(s32,this->marker));
|
||||
this->unk1C[0] = this->position_x;
|
||||
this->unk1C[1] = this->position_y;
|
||||
this->unk1C[2] = this->position_z;
|
||||
this->position_y = -600.0f;
|
||||
FUNC_8030E624(SFX_3F6_RUBBING, 0.6f, 25000);
|
||||
if(0.0f != this->lifetime_value){
|
||||
|
||||
if (0.0f != this->lifetime_value){
|
||||
this->velocity_y = 600.0f/this->lifetime_value;
|
||||
}else{
|
||||
} else {
|
||||
this->velocity_y = 100.0f;
|
||||
}
|
||||
timedFunc_set_1(this->lifetime_value* 0.05, (GenFunction_1)func_8038E260, reinterpret_cast(s32,this->marker));
|
||||
timedFunc_set_1(this->lifetime_value* 0.28, (GenFunction_1) func_8038E260, reinterpret_cast(s32,this->marker));
|
||||
timedFunc_set_1(this->lifetime_value* 0.46, (GenFunction_1) func_8038E260, reinterpret_cast(s32,this->marker));
|
||||
timedFunc_set_1(this->lifetime_value* 0.58, (GenFunction_1) func_8038E260, reinterpret_cast(s32,this->marker));
|
||||
|
||||
timedFunc_set_1(this->lifetime_value* 0.05, (GenFunction_1)chjinjonatorbase_spawnActivator, reinterpret_cast(s32,this->marker));
|
||||
timedFunc_set_1(this->lifetime_value* 0.28, (GenFunction_1) chjinjonatorbase_spawnActivator, reinterpret_cast(s32,this->marker));
|
||||
timedFunc_set_1(this->lifetime_value* 0.46, (GenFunction_1) chjinjonatorbase_spawnActivator, reinterpret_cast(s32,this->marker));
|
||||
timedFunc_set_1(this->lifetime_value* 0.58, (GenFunction_1) chjinjonatorbase_spawnActivator, reinterpret_cast(s32,this->marker));
|
||||
SPAWNQUEUE_ADD_1(chjinjonatorbase_spawnStoneJinjo, this->marker);
|
||||
|
||||
}
|
||||
else{//L8038E5CC
|
||||
if(this->state == 1){
|
||||
other = marker_getActor(this->unk100);
|
||||
temp_f20 = this->velocity_y * sp58;
|
||||
if(this->position_y + temp_f20 < this->unk1C[1]){
|
||||
if(!func_8030E3FC(this->unk44_31)){
|
||||
else {
|
||||
if(this->state == CHBOSSJINJOBASE_STATE_1_RAISE) {
|
||||
actor_jinjonator = marker_getActor(this->unk100);
|
||||
y_delta = this->velocity_y * delta_time;
|
||||
|
||||
if(this->position_y + y_delta < this->unk1C[1]) {
|
||||
if (!func_8030E3FC(this->unk44_31)) {
|
||||
func_8030E2C4(this->unk44_31);
|
||||
}
|
||||
|
||||
sp38[0] = (temp_s1 & 1) ? 3.0f : -3.0f;
|
||||
sp38[1] = temp_f20;
|
||||
sp38[2] = (temp_s1 & 2) ? 3.0f : -3.0f;
|
||||
position_delta[0] = (rumbling & 1) ? 3.0f : -3.0f;
|
||||
position_delta[1] = y_delta;
|
||||
position_delta[2] = (rumbling & 2) ? 3.0f : -3.0f;
|
||||
|
||||
this->position_x = this->unk1C[0];
|
||||
this->position_z = this->unk1C[2];
|
||||
|
||||
this->position_x = sp38[0] + this->position_x;
|
||||
this->position_y = sp38[1] + this->position_y;
|
||||
this->position_z = sp38[2] + this->position_z;
|
||||
this->position_x = position_delta[0] + this->position_x;
|
||||
this->position_y = position_delta[1] + this->position_y;
|
||||
this->position_z = position_delta[2] + this->position_z;
|
||||
|
||||
other->position_x = this->unk1C[0];
|
||||
other->position_z = this->unk1C[2];
|
||||
actor_jinjonator->position_x = this->unk1C[0];
|
||||
actor_jinjonator->position_z = this->unk1C[2];
|
||||
|
||||
other->position_x = sp38[0] + other->position_x;
|
||||
other->position_y = sp38[1] + other->position_y;
|
||||
other->position_z = sp38[2] + other->position_z;
|
||||
actor_jinjonator->position_x = position_delta[0] + actor_jinjonator->position_x;
|
||||
actor_jinjonator->position_y = position_delta[1] + actor_jinjonator->position_y;
|
||||
actor_jinjonator->position_z = position_delta[2] + actor_jinjonator->position_z;
|
||||
}
|
||||
else{//L8038E6FC
|
||||
subaddie_set_state(this, 2);
|
||||
else {
|
||||
subaddie_set_state(this, CHBOSSJINJOBASE_STATE_2_DEFAULT);
|
||||
|
||||
FUNC_8030E624(SFX_7F_HEAVYDOOR_SLAM, 0.8f, 32000);
|
||||
func_8030E394(this->unk44_31);
|
||||
func_8030DA44(this->unk44_31);
|
||||
this->unk44_31 = 0;
|
||||
|
||||
this->position_x = this->unk1C[0];
|
||||
this->position_y = this->unk1C[1];
|
||||
this->position_z = this->unk1C[2];
|
||||
|
||||
other->position_x = this->unk1C[0];
|
||||
other->position_y = this->unk1C[1];
|
||||
other->position_z = this->unk1C[2];
|
||||
|
||||
other->position_y += 155.0f;
|
||||
|
||||
actor_jinjonator->position_x = this->unk1C[0];
|
||||
actor_jinjonator->position_y = this->unk1C[1];
|
||||
actor_jinjonator->position_z = this->unk1C[2];
|
||||
actor_jinjonator->position_y += 155.0f;
|
||||
}
|
||||
}
|
||||
}//L8038E768
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -3,10 +3,7 @@
|
||||
#include "variables.h"
|
||||
#include "fight.h"
|
||||
|
||||
extern ActorMarker *chfinalboss_findCollidingJinjo(Actor*, f32);
|
||||
void func_80386654(f32 arg0, f32 (*arg1)[4], f32 (*arg2)[4]);
|
||||
|
||||
typedef struct {
|
||||
typedef struct chspellbarrier_s {
|
||||
s32 unk0;
|
||||
u8 unk4;
|
||||
u8 unk5;
|
||||
@@ -21,57 +18,49 @@ typedef struct {
|
||||
u8 unkE;
|
||||
u8 unkF;
|
||||
u8 sfxsourceIdx;
|
||||
} ActorLocal_fight_8390;
|
||||
} ActorLocal_SpellBarrier;
|
||||
|
||||
void chspellbarrier_update(Actor *this);
|
||||
ActorInfo chSpellBarrier = { MARKER_284_GRUNTY_SPELL_BARRIER, ACTOR_3AB_GRUNTY_SPELL_BARRIER, ASSET_546_MODEL_GRUNTY_SPELL_BARRIER, 1, NULL, chspellbarrier_update, actor_update_func_80326224, actor_draw, 0, 0, 0.0f, 0 };
|
||||
|
||||
/* .data */
|
||||
ActorInfo chSpellBarrier = {
|
||||
MARKER_284_GRUNTY_SPELL_BARRIER, ACTOR_3AB_GRUNTY_SPELL_BARRIER, ASSET_546_MODEL_GRUNTY_SPELL_BARRIER,
|
||||
0x1, NULL,
|
||||
chspellbarrier_update, func_80326224, actor_draw,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
void chspellbarrier_collisionPassive(ActorMarker *this, ActorMarker *other) {
|
||||
Actor *actor_spellbarrier = marker_getActor(this);
|
||||
ActorLocal_SpellBarrier *local = (ActorLocal_SpellBarrier *) &actor_spellbarrier->local;
|
||||
|
||||
/* .code */
|
||||
void func_8038E780(ActorMarker *arg0, ActorMarker *arg1) {
|
||||
Actor *sp1C;
|
||||
ActorLocal_fight_8390 *sp18;
|
||||
local->unk0 = 0xFF;
|
||||
local->unk4 = 0;
|
||||
|
||||
sp1C = marker_getActor(arg0);
|
||||
sp18 = (ActorLocal_fight_8390 *) &sp1C->local;
|
||||
sp18->unk0 = 0xFF;
|
||||
sp18->unk4 = 0;
|
||||
if (func_8030E3FC(sp18->sfxsourceIdx) == 0) {
|
||||
func_8030E2C4(sp18->sfxsourceIdx);
|
||||
if (func_8030E3FC(local->sfxsourceIdx) == 0) {
|
||||
func_8030E2C4(local->sfxsourceIdx);
|
||||
}
|
||||
if (func_8030E3FC(sp1C->unk44_31) == 0) {
|
||||
func_8030E2C4(sp1C->unk44_31);
|
||||
|
||||
if (func_8030E3FC(actor_spellbarrier->unk44_31) == 0) {
|
||||
func_8030E2C4(actor_spellbarrier->unk44_31);
|
||||
}
|
||||
}
|
||||
|
||||
void func_8038E7EC(Actor *arg0) {
|
||||
ActorLocal_fight_8390 *local = (ActorLocal_fight_8390 *)&arg0->local;
|
||||
void chspellbarrier_free(Actor *this) {
|
||||
ActorLocal_SpellBarrier *local = (ActorLocal_SpellBarrier *) &this->local;
|
||||
|
||||
if ((u8)arg0->unk44_31) {
|
||||
func_8030DA44(arg0->unk44_31);
|
||||
arg0->unk44_31 = 0;
|
||||
if ((u8) this->unk44_31) {
|
||||
func_8030DA44(this->unk44_31);
|
||||
this->unk44_31 = 0;
|
||||
}
|
||||
|
||||
if (local->sfxsourceIdx != 0) {
|
||||
func_8030DA44(local->sfxsourceIdx);
|
||||
local->sfxsourceIdx = (u8)0;
|
||||
local->sfxsourceIdx = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void chspellbarrier_update(Actor *this){
|
||||
ActorLocal_fight_8390 *local = (ActorLocal_fight_8390 *)&this->local;
|
||||
f32 sp38 = time_getDelta();
|
||||
void chspellbarrier_update(Actor *this) {
|
||||
ActorLocal_SpellBarrier *local = (ActorLocal_SpellBarrier *) &this->local;
|
||||
f32 delta_time = time_getDelta();
|
||||
ActorMarker *jinjo_marker;
|
||||
|
||||
if(!this->volatile_initialized){
|
||||
if (!this->volatile_initialized){
|
||||
this->volatile_initialized = TRUE;
|
||||
marker_setCollisionScripts(this->marker, NULL, func_8038E780, NULL);
|
||||
marker_setFreeMethod(this->marker, func_8038E7EC);
|
||||
marker_setCollisionScripts(this->marker, NULL, chspellbarrier_collisionPassive, NULL);
|
||||
marker_setFreeMethod(this->marker, chspellbarrier_free);
|
||||
this->marker->propPtr->unk8_3 = 0;
|
||||
actor_collisionOn(this);
|
||||
local->unk0 = 0;
|
||||
@@ -85,51 +74,54 @@ void chspellbarrier_update(Actor *this){
|
||||
func_8030DB04(local->sfxsourceIdx, 32000, this->position, 4000.0f, 12000.0f);
|
||||
sfxsource_playSfxAtVolume(local->sfxsourceIdx, 1.0f);
|
||||
FUNC_8030E8B4(SFX_416, 0.8f, 32000, this->position, 10000, 25000);
|
||||
}//L8038E97C
|
||||
}
|
||||
|
||||
jinjo_marker = chfinalboss_findCollidingJinjo(this, 600.0f);
|
||||
if(jinjo_marker){
|
||||
if(jinjo_marker->id == MARKER_285_JINJONATOR){
|
||||
|
||||
if (jinjo_marker) {
|
||||
if (jinjo_marker->id == MARKER_285_JINJONATOR) {
|
||||
marker_despawn(this->marker);
|
||||
chfinalboss_spellBarrierInactive();
|
||||
return;
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
local->unk0 = 0;
|
||||
local->unk4 = 1;
|
||||
actor_setOpacity(this, 0);
|
||||
this->unk58_0 = 0;
|
||||
this->lifetime_value = 2.0f;
|
||||
this->lifetime_value = 2.0f;
|
||||
}
|
||||
} //L8038E9F4
|
||||
if(this->state == 1){
|
||||
this->yaw += 30.0f*sp38;
|
||||
if(this->scale < 1.0){
|
||||
this->scale = MIN(1.0, this->scale + ((f64)sp38 + (f64)sp38));
|
||||
}//L8038EA68
|
||||
}
|
||||
|
||||
if(0.0 < this->lifetime_value){
|
||||
this->unk58_0 = 0;
|
||||
this->lifetime_value -= sp38;
|
||||
if (this->state == 1) {
|
||||
this->yaw += 30.0f * delta_time;
|
||||
if (this->scale < 1.0) {
|
||||
this->scale = MIN(1.0, this->scale + ((f64)delta_time + (f64)delta_time));
|
||||
}
|
||||
else{ //L8038EAA4
|
||||
|
||||
if (0.0 < this->lifetime_value) {
|
||||
this->unk58_0 = 0;
|
||||
this->lifetime_value -= delta_time;
|
||||
} else {
|
||||
this->unk58_0 = 1;
|
||||
if(local->unk4){
|
||||
local->unk0 = MIN(0x64, local->unk0 + (s32)(60.0f*sp38));
|
||||
|
||||
if (local->unk4) {
|
||||
local->unk0 = MIN(0x64, local->unk0 + (s32)(60.0f * delta_time));
|
||||
|
||||
if(local->unk0 >= 0x64){
|
||||
local->unk0 = 0x64;
|
||||
local->unk4 = 0;
|
||||
}
|
||||
}
|
||||
else{//L8038EB20
|
||||
local->unk0 = MAX(0, local->unk0 - (s32)(60.0f*sp38));
|
||||
if(local->unk0 <= 0){
|
||||
} else {
|
||||
local->unk0 = MAX(0, local->unk0 - (s32)(60.0f*delta_time));
|
||||
|
||||
if (local->unk0 <= 0) {
|
||||
local->unk0 = 0;
|
||||
local->unk4 = 1;
|
||||
this->lifetime_value = 0.25f;
|
||||
}
|
||||
}//L8038EB74
|
||||
}
|
||||
|
||||
actor_setOpacity(this, local->unk0);
|
||||
}
|
||||
}
|
||||
//L8038EB80
|
||||
}
|
||||
|
@@ -5,405 +5,361 @@
|
||||
#include "core2/particle.h"
|
||||
|
||||
extern void func_80324CFC(f32, s32, s32);
|
||||
extern void func_80386654(f32 arg0, f32 arg1[4], f32 arg2[4]);
|
||||
extern void func_8038E03C(f32*, u32);
|
||||
extern Actor *func_80325CAC(ActorMarker*, Gfx**, Mtx**, Vtx **);
|
||||
bool func_80320C94(f32 [3], f32[3], f32, f32[3], s32, u32);
|
||||
f32 func_8033229C(ActorMarker *);
|
||||
void func_8038CED8(f32 [3], s32, f32, f32);
|
||||
void chbossjinjo_spawnParticles(Actor *, s32, s32, f32);
|
||||
|
||||
typedef struct {
|
||||
f32 unk0;
|
||||
}ActorLocal_fight_87A0;
|
||||
|
||||
void func_8038F620(Actor *this);
|
||||
typedef struct chspellfireball_s {
|
||||
f32 explosion_lifetime;
|
||||
} ActorLocal_SpellFireball;
|
||||
|
||||
/* .data */
|
||||
ActorInfo chSpellFireball = {
|
||||
MARKER_25C_GRUNTY_SPELL_FIREBALL, ACTOR_389_GRUNTY_SPELL_FIREBALL, ASSET_541_SPRITE_FIREBALL_SPELL_ATTACK,
|
||||
0x1, NULL,
|
||||
func_8038F620, func_80326224, actor_draw,
|
||||
0, 0, 1.0f, 0
|
||||
};
|
||||
ActorInfo chSpellFireball = { MARKER_25C_GRUNTY_SPELL_FIREBALL, ACTOR_389_GRUNTY_SPELL_FIREBALL, ASSET_541_SPRITE_FIREBALL_SPELL_ATTACK, 1, NULL, chSpellFireball_update, actor_update_func_80326224, actor_draw, 0, 0, 1.0f, 0 };
|
||||
ActorInfo chSpellGreen = { MARKER_280_GRUNTY_SPELL_GREEN_ATTACK, ACTOR_3AA_GRUNTY_SPELL_GREEN_ATTACK, ASSET_6C9_SPRITE_GREEN_SPELL_ATTACK, 1, NULL, chSpellFireball_update, actor_update_func_80326224, func_80325CAC, 0, 0, 1.0f, 0 };
|
||||
|
||||
ActorInfo chSpellGreen = {
|
||||
MARKER_280_GRUNTY_SPELL_GREEN_ATTACK, ACTOR_3AA_GRUNTY_SPELL_GREEN_ATTACK, ASSET_6C9_SPRITE_GREEN_SPELL_ATTACK,
|
||||
0x1, NULL,
|
||||
func_8038F620, func_80326224, func_80325CAC,
|
||||
0, 0, 1.0f, 0
|
||||
};
|
||||
static s32 sFightSmokeColor[3] = { 186, 186, 186 };
|
||||
ParticleSettingsVelocityPosition sFightSmokeVelocityPosition = { { { -70.0f, 50.0f, -70.0f }, { 70.0f, 100.0f, 70.0f } }, { { -55.0f, 0.0f, -55.0f }, { 55.0f, 20.0f, 55.0f } } };
|
||||
static f32 D_80391B84[4] = { 1.0f, 1.0f, 1.0f, 1.0f };
|
||||
static f32 D_80391B94[4] = { 0.3f, 0.3f, 0.3f, 1.0f };
|
||||
static s32 sFightExplosionStartFrameRange[2] = { 1, 9 };
|
||||
static f32 sFightExplosionScaleRange[4] = { 4.5f, 4.5f, 4.5f, 4.5f };
|
||||
static f32 sFightExplosionLifetimeRange[4] = { 0.0f, 0.0f, 1.0f, 1.0f };
|
||||
static f32 D_80391BCC[4] = { 0.0f, 0.0f, 0.85f, 1.35f };
|
||||
static f32 sFightExplosionFadeRange[2] = { 0.6f, 0.7f };
|
||||
static f32 sFightExplosionSpawnPositionRange[6] = { -130.0f, 0.0f, -130.0f, 130.0f, 0.0f, 130.0f };
|
||||
static f32 D_80391BFC[4] = { 1.1f, 1.1f, 4.0f, 5.4f };
|
||||
static f32 D_80391C0C[6] = { -20.0f, 0.0f, -20.0f, 20.0f, 40.0f, 20.0f };
|
||||
static f32 D_80391C24[6] = { 0.0f, -1200.0f, 0.0f, 0.0f, -1200.0f, 0.0f };
|
||||
static f32 D_80391C3C[6] = { -420.0f, 410.0f, -420.0f, 480.0f, 860.0f, 480.0f };
|
||||
static f32 D_80391C54[4] = { 0.35f, 0.65f, 0.0f, 0.0f };
|
||||
static f32 D_80391C64[4] = { 0.0f, 0.01f, 2.0f, 2.3f };
|
||||
static f32 D_80391C74[2] = { 0.0f, 0.35f };
|
||||
static f32 D_80391C7C[6] = { 0.0f, 50.0f, 0.0f, 0.0f, 50.0f, 0.0f };
|
||||
static f32 D_80391C94[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
|
||||
static f32 D_80391CA4[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
|
||||
static f32 D_80391CB4[2] = { 0.0f, 0.0f };
|
||||
static f32 D_80391CBC[4] = { 0.0f, 0.0f, 0.2f, 0.25f };
|
||||
static f32 D_80391DCC[2] = { 2.3f, 2.5f };
|
||||
static f32 D_80391DD4[6] = { 0.0f, 0.0f, 0.34f, 0.34f, 0.7f, 0.8f };
|
||||
static s32 sFightExplosionStartFrameRange2[2] = { 2, 15 };
|
||||
static f32 D_80391CF4[4] = { 2.0f, 2.0f, 0.4f, 0.4f };
|
||||
static f32 D_80391D04[4] = { 0.0f, 0.0f, 0.24f, 0.24f };
|
||||
static f32 D_80391D14[2] = { 0.1f, 0.2f };
|
||||
static f32 D_80391D1C[4] = { 0.0f, 0.0f, 0.44f, 0.44f };
|
||||
static f32 D_80391D2C[2] = { 0.4f, 0.5f };
|
||||
static f32 D_80391D34[6] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f };
|
||||
static f32 sFightUnused1[6] = { -50.0f, -50.0f, -50.0f, 50.0f, 50.0f, 50.0f };
|
||||
static f32 sFightUnused2[6] = { 0.0f, -1200.0f, 0.0f, 0.0f, -1200.0f, 0.0f };
|
||||
static f32 sFightUnused3[6] = { -260.0f, -260.0f, -260.0f, 260.0f, 260.0f, 260.0f };
|
||||
static f32 sFightUnused4[4] = { 0.15f, 0.3f, 0.0f, 0.0f };
|
||||
static f32 sFightUnused5[4] = { 0.0f, 0.01f, 0.7f, 0.8f };
|
||||
static f32 sFightUnused6[2] = { 0.0f, 0.65f };
|
||||
static u8 sFightPlayerHitBySpellInPhase1;
|
||||
static u8 sFightPlayerHitBySpellInPhase2;
|
||||
static u8 sFightPlayerHitBySpellInPhase3;
|
||||
static u8 sFightPlayerHitBySpellInPhase4;
|
||||
static u8 sFightPlayerHitBySpellInPhase5;
|
||||
static u8 sFightLastSpellFired; // The big green spell that Gruntilda fires before she falls off the tower
|
||||
|
||||
s32 D_80391B48[3] = {0xBA, 0xBA, 0xBA};
|
||||
struct42s D_80391B54 = {
|
||||
{ {-70.0f, 50.0f, -70.0f}, {70.0f, 100.0f, 70.0f}},
|
||||
{ {-55.0f, 0.0f, -55.0f}, {55.0f, 20.0f, 55.0f}}
|
||||
};
|
||||
f32 D_80391B84[4] = {1.0f, 1.0f, 1.0f, 1.0f};
|
||||
f32 D_80391B94[4] = {0.3f, 0.3f, 0.3f, 1.0f};
|
||||
s32 D_80391BA4[2] = {1, 9};
|
||||
f32 D_80391BAC[4] = {4.5f, 4.5f, 4.5f, 4.5f};
|
||||
f32 D_80391BBC[4] = {0.0f, 0.0f, 1.0f, 1.0f};
|
||||
f32 D_80391BCC[4] = {0.0f, 0.0f, 0.85f, 1.35f};
|
||||
f32 D_80391BDC[2] = {0.6f, 0.7f};
|
||||
f32 D_80391BE4[6] = {-130.0f, 0.0f, -130.0f, 130.0f, 0.0f, 130.0f};
|
||||
f32 D_80391BFC[4] = {1.1f, 1.1f, 4.0f, 5.4f};
|
||||
void fight_setPositionWithDisplacement(ActorMarker *marker, f32 *position) {
|
||||
Actor *actor;
|
||||
|
||||
f32 D_80391C0C[6] = {-20.0f, 0.0f, -20.0f, 20.0f, 40.0f, 20.0f};
|
||||
f32 D_80391C24[6] = {0.0f, -1200.0f, 0.0f, 0.0f, -1200.0f, 0.0f};
|
||||
f32 D_80391C3C[6] = {-420.0f, 410.0f, -420.0f, 480.0f, 860.0f, 480.0f};
|
||||
f32 D_80391C54[4] = {0.35f, 0.65f, 0.0f, 0.0f};
|
||||
f32 D_80391C64[4] = {0.0f, 0.01f, 2.0f, 2.3f};
|
||||
f32 D_80391C74[2] = {0.0f, 0.35f};
|
||||
|
||||
f32 D_80391C7C[6] = {0.0f, 50.0f, 0.0f, 0.0f, 50.0f, 0.0f};
|
||||
f32 D_80391C94[4] = {0.0f, 0.0f, 0.0f, 0.0f};
|
||||
f32 D_80391CA4[4] = {0.0f, 0.0f, 0.0f, 0.0f};
|
||||
f32 D_80391CB4[2] = {0.0f, 0.0f};
|
||||
f32 D_80391CBC[4] = {0.0f, 0.0f, 0.2f, 0.25f};
|
||||
f32 D_80391DCC[2] = {2.3f, 2.5f};
|
||||
f32 D_80391DD4[6] = {0.0f, 0.0f, 0.34f, 0.34f, 0.7f, 0.8f};
|
||||
|
||||
s32 D_80391CEC[2] = {2, 0xf};
|
||||
f32 D_80391CF4[4] = {2.0f, 2.0f, 0.4f, 0.4f};
|
||||
f32 D_80391D04[4] = {0.0f, 0.0f, 0.24f, 0.24f};
|
||||
f32 D_80391D14[2] = {0.1f, 0.2f};
|
||||
f32 D_80391D1C[4] = {0.0f, 0.0f, 0.44f, 0.44f};
|
||||
f32 D_80391D2C[2] = {0.4f, 0.5f};
|
||||
f32 D_80391D34[6] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
|
||||
|
||||
f32 D_80391D4C[6] = {-50.0f, -50.0f, -50.0f, 50.0f, 50.0f, 50.0f};
|
||||
f32 D_80391D64[6] = {0.0f, -1200.0f, 0.0f, 0.0f, -1200.0f, 0.0f};
|
||||
f32 D_80391D7C[6] = {-260.0f, -260.0f, -260.0f, 260.0f, 260.0f, 260.0f};
|
||||
f32 fight_D_80391D94[4] = {0.15f, 0.3f, 0.0f, 0.0f};
|
||||
f32 D_80391DA4[4] = {0.0f, 0.01f, 0.7f, 0.8f};
|
||||
f32 D_80391DB4[2] = {0.0f, 0.65f};
|
||||
|
||||
/* .bss */
|
||||
// u8 pad[0x180]; //TODO!!!! define other file .bss sections
|
||||
u8 fight_D_803928E0;
|
||||
u8 D_803928E1;
|
||||
u8 D_803928E2;
|
||||
u8 D_803928E3;
|
||||
u8 D_803928E4;
|
||||
u8 D_803928E5;
|
||||
|
||||
/* .code */
|
||||
void func_8038EB90(ActorMarker *arg0, f32 *arg1) {
|
||||
Actor *temp_v0;
|
||||
|
||||
temp_v0 = marker_getActor(arg0);
|
||||
temp_v0->position_x = arg1[0];
|
||||
temp_v0->position_y = arg1[1];
|
||||
temp_v0->position_z = arg1[2];
|
||||
temp_v0->position_y = temp_v0->position_y + 210.0f;
|
||||
actor = marker_getActor(marker);
|
||||
actor->position_x = position[0];
|
||||
actor->position_y = position[1];
|
||||
actor->position_z = position[2];
|
||||
actor->position_y = actor->position_y + 210.0f;
|
||||
}
|
||||
|
||||
void chSpellFireball_emitSparkles(f32 position[3], u32 count, enum asset_e sprite, f32 position_range[6], f32 acceleration_range[6], f32 velocity_range[6], f32 scale_range[4], f32 lifetime_range[4], f32 fade[2]) {
|
||||
ParticleEmitter *pe = partEmitMgr_newEmitter(count);
|
||||
|
||||
particleEmitter_setSprite(pe, sprite);
|
||||
particleEmitter_setStartingFrameRange(pe, 1, 6);
|
||||
particleEmitter_setPosition(pe, position);
|
||||
particleEmitter_setParticleSpawnPositionRange(pe, position_range[0], position_range[1], position_range[2], position_range[3], position_range[4], position_range[5]);
|
||||
particleEmitter_setParticleAccelerationRange(pe, acceleration_range[0], acceleration_range[1], acceleration_range[2], acceleration_range[3], acceleration_range[4], acceleration_range[5]);
|
||||
particleEmitter_setParticleVelocityRange(pe, velocity_range[0], velocity_range[1], velocity_range[2], velocity_range[3], velocity_range[4], velocity_range[5]);
|
||||
particleEmitter_setAngularVelocityRange(pe, -300.0f, -300.0f, -300.0f, 300.0f, 300.0f, 300.0f);
|
||||
particleEmitter_setStartingScaleRange(pe, scale_range[0], scale_range[1]);
|
||||
particleEmitter_setFinalScaleRange(pe, scale_range[2], scale_range[3]);
|
||||
func_802EF9F8(pe, 0.5f);
|
||||
func_802EFA18(pe, 3);
|
||||
particleEmitter_setSpawnIntervalRange(pe, lifetime_range[0], lifetime_range[1]);
|
||||
particleEmitter_setParticleLifeTimeRange(pe, lifetime_range[2], lifetime_range[3]);
|
||||
particleEmitter_setFade(pe, fade[0], fade[1]);
|
||||
func_802EFA78(pe, 1);
|
||||
particleEmitter_setDrawMode(pe, 4);
|
||||
particleEmitter_emitN(pe, count);
|
||||
void fight_createSpriteParticles(f32 position[3], s32 count, enum asset_e sprite, f32 position_range[6], f32 acceleration_range[6], f32 velocity_range[6], f32 scale_range[4], f32 lifetime_range[4], f32 fade[2]) {
|
||||
ParticleEmitter *pCtrl = partEmitMgr_newEmitter(count);
|
||||
particleEmitter_setSprite(pCtrl, sprite);
|
||||
particleEmitter_setStartingFrameRange(pCtrl, 1, 6);
|
||||
particleEmitter_setPosition(pCtrl, position);
|
||||
particleEmitter_setSpawnPositionRange(pCtrl, position_range[0], position_range[1], position_range[2], position_range[3], position_range[4], position_range[5]);
|
||||
particleEmitter_setAccelerationRange(pCtrl, acceleration_range[0], acceleration_range[1], acceleration_range[2], acceleration_range[3], acceleration_range[4], acceleration_range[5]);
|
||||
particleEmitter_setParticleVelocityRange(pCtrl, velocity_range[0], velocity_range[1], velocity_range[2], velocity_range[3], velocity_range[4], velocity_range[5]);
|
||||
particleEmitter_setAngularVelocityRange(pCtrl, -300.0f, -300.0f, -300.0f, 300.0f, 300.0f, 300.0f);
|
||||
particleEmitter_setStartingScaleRange(pCtrl, scale_range[0], scale_range[1]);
|
||||
particleEmitter_setFinalScaleRange(pCtrl, scale_range[2], scale_range[3]);
|
||||
particleEmitter_func_802EF9F8(pCtrl, 0.5f);
|
||||
particleEmitter_func_802EFA18(pCtrl, 3);
|
||||
particleEmitter_setSpawnIntervalRange(pCtrl, lifetime_range[0], lifetime_range[1]);
|
||||
particleEmitter_setParticleLifeTimeRange(pCtrl, lifetime_range[2], lifetime_range[3]);
|
||||
particleEmitter_setFade(pCtrl, fade[0], fade[1]);
|
||||
particleEmitter_func_802EFA78(pCtrl, 1);
|
||||
particleEmitter_setDrawMode(pCtrl, 4);
|
||||
particleEmitter_emitN(pCtrl, count);
|
||||
}
|
||||
|
||||
void chSpellFireball_emitExplosion(f32 position[3], enum asset_e sprite, s32 count, s32 staring_frame_range[2], f32 position_range[6], f32 scale_range[4], f32 lifetime_range[4], f32 fade[2]) {
|
||||
ParticleEmitter *pe = partEmitMgr_newEmitter(count);
|
||||
|
||||
particleEmitter_setSprite(pe, sprite);
|
||||
particleEmitter_setStartingFrameRange(pe, staring_frame_range[0], staring_frame_range[1]);
|
||||
particleEmitter_setParticleFramerateRange(pe, 8.0f, 8.0f);
|
||||
particleEmitter_setPosition(pe, position);
|
||||
particleEmitter_setParticleSpawnPositionRange(pe, position_range[0], position_range[1], position_range[2], position_range[3], position_range[4], position_range[5]);
|
||||
particleEmitter_setParticleVelocityRange(pe, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
particleEmitter_setStartingScaleRange(pe, scale_range[0], scale_range[1]);
|
||||
particleEmitter_setFinalScaleRange(pe, scale_range[2], scale_range[3]);
|
||||
particleEmitter_setSpawnIntervalRange(pe, lifetime_range[0], lifetime_range[1]);
|
||||
particleEmitter_setParticleLifeTimeRange(pe, lifetime_range[2], lifetime_range[3]);
|
||||
particleEmitter_setFade(pe, fade[0], fade[1]);
|
||||
particleEmitter_setDrawMode(pe, PART_EMIT_NO_DEPTH);
|
||||
func_802EFA78(pe, 1);
|
||||
particleEmitter_emitN(pe, count);
|
||||
void fight_createAnimatedSpriteParticles(f32 position[3], enum asset_e sprite, s32 count, s32 staring_frame_range[2], f32 position_range[6], f32 scale_range[4], f32 lifetime_range[4], f32 fade[2]) {
|
||||
ParticleEmitter *pCtrl = partEmitMgr_newEmitter(count);
|
||||
particleEmitter_setSprite(pCtrl, sprite);
|
||||
particleEmitter_setStartingFrameRange(pCtrl, staring_frame_range[0], staring_frame_range[1]);
|
||||
particleEmitter_setParticleFramerateRange(pCtrl, 8.0f, 8.0f);
|
||||
particleEmitter_setPosition(pCtrl, position);
|
||||
particleEmitter_setSpawnPositionRange(pCtrl, position_range[0], position_range[1], position_range[2], position_range[3], position_range[4], position_range[5]);
|
||||
particleEmitter_setParticleVelocityRange(pCtrl, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
particleEmitter_setStartingScaleRange(pCtrl, scale_range[0], scale_range[1]);
|
||||
particleEmitter_setFinalScaleRange(pCtrl, scale_range[2], scale_range[3]);
|
||||
particleEmitter_setSpawnIntervalRange(pCtrl, lifetime_range[0], lifetime_range[1]);
|
||||
particleEmitter_setParticleLifeTimeRange(pCtrl, lifetime_range[2], lifetime_range[3]);
|
||||
particleEmitter_setFade(pCtrl, fade[0], fade[1]);
|
||||
particleEmitter_setDrawMode(pCtrl, PART_EMIT_NO_DEPTH);
|
||||
particleEmitter_func_802EFA78(pCtrl, 1);
|
||||
particleEmitter_emitN(pCtrl, count);
|
||||
}
|
||||
|
||||
void chSpellFireball_emitSmoke(f32 position[3], u32 count, f32 *lifetime_and_spawn_range) {
|
||||
ParticleEmitter *pe = partEmitMgr_newEmitter(count);
|
||||
|
||||
particleEmitter_setSprite(pe, ASSET_70E_SPRITE_SMOKE_2);
|
||||
particleEmitter_setRGB(pe, D_80391B48);
|
||||
particleEmitter_setAlpha(pe, 0xEB);
|
||||
particleEmitter_setStartingFrameRange(pe, 0, 7);
|
||||
particleEmitter_setPosition(pe, position);
|
||||
particleEmitter_setPositionAndVelocityRanges(pe, &D_80391B54);
|
||||
particleEmitter_setStartingScaleRange(pe, 0.1f, 0.2f);
|
||||
particleEmitter_setFinalScaleRange(pe, 3.6f, 4.6f);
|
||||
particleEmitter_setSpawnIntervalRange(pe, lifetime_and_spawn_range[0], lifetime_and_spawn_range[1]);
|
||||
particleEmitter_setParticleLifeTimeRange(pe, lifetime_and_spawn_range[2], lifetime_and_spawn_range[3]);
|
||||
particleEmitter_setFade(pe, 0.05f, 0.1f);
|
||||
particleEmitter_setDrawMode(pe, PART_EMIT_NO_DEPTH);
|
||||
func_802EFA78(pe, 1);
|
||||
particleEmitter_emitN(pe, count);
|
||||
void fight_createSmokeParticles(f32 position[3], s32 count, f32 *lifetime_and_spawn_range) {
|
||||
ParticleEmitter *pCtrl = partEmitMgr_newEmitter(count);
|
||||
particleEmitter_setSprite(pCtrl, ASSET_70E_SPRITE_SMOKE_2);
|
||||
particleEmitter_setRGB(pCtrl, sFightSmokeColor);
|
||||
particleEmitter_setAlpha(pCtrl, 235);
|
||||
particleEmitter_setStartingFrameRange(pCtrl, 0, 7);
|
||||
particleEmitter_setPosition(pCtrl, position);
|
||||
particleEmitter_setPositionAndVelocityRanges(pCtrl, &sFightSmokeVelocityPosition);
|
||||
particleEmitter_setStartingScaleRange(pCtrl, 0.1f, 0.2f);
|
||||
particleEmitter_setFinalScaleRange(pCtrl, 3.6f, 4.6f);
|
||||
particleEmitter_setSpawnIntervalRange(pCtrl, lifetime_and_spawn_range[0], lifetime_and_spawn_range[1]);
|
||||
particleEmitter_setParticleLifeTimeRange(pCtrl, lifetime_and_spawn_range[2], lifetime_and_spawn_range[3]);
|
||||
particleEmitter_setFade(pCtrl, 0.05f, 0.1f);
|
||||
particleEmitter_setDrawMode(pCtrl, PART_EMIT_NO_DEPTH);
|
||||
particleEmitter_func_802EFA78(pCtrl, 1);
|
||||
particleEmitter_emitN(pCtrl, count);
|
||||
}
|
||||
|
||||
void func_8038F01C(void) {
|
||||
func_80386654(1.0f, D_80391B94, D_80391B84);
|
||||
void chSpellFireball_func_8038F01C(void) {
|
||||
chfinalboss_func_80386654(1.0f, D_80391B94, D_80391B84);
|
||||
}
|
||||
|
||||
void func_8038F050(void) {
|
||||
func_80386654(1.0f, D_80391B84, D_80391B94);
|
||||
void chSpellFireball_func_8038F050(void) {
|
||||
chfinalboss_func_80386654(1.0f, D_80391B84, D_80391B94);
|
||||
}
|
||||
|
||||
void func_8038F084(ActorMarker *marker){
|
||||
static f32 D_803928E8[3];
|
||||
void chSpellFireball_createExplosionParticles(ActorMarker *marker) {
|
||||
static f32 position[3];
|
||||
Actor *actor = marker_getActor(marker);
|
||||
ActorLocal_fight_87A0 *local = (ActorLocal_fight_87A0 *)&actor->local;
|
||||
ActorLocal_SpellFireball *local = (ActorLocal_SpellFireball *) &actor->local;
|
||||
|
||||
D_803928E8[0] = actor->position_x;
|
||||
D_803928E8[1] = actor->position_y;
|
||||
D_803928E8[2] = actor->position_z;
|
||||
|
||||
D_803928E8[1] += 120.0f;
|
||||
position[0] = actor->position_x;
|
||||
position[1] = actor->position_y;
|
||||
position[2] = actor->position_z;
|
||||
position[1] += 120.0f;
|
||||
|
||||
if(actor->state != 2){//L8038F39C
|
||||
if (actor->state != SPELLFIREBALL_STATE_2_DESPAWN) {
|
||||
FUNC_8030E8B4(SFX_148_GRUNTY_SPELL_LANDING, 1.0f, 32000, actor->position, 1000, 3500);
|
||||
timedFunc_set_0(0.0f, func_8038F01C);
|
||||
timedFunc_set_0(0.3f, func_8038F050);
|
||||
timedFunc_set_0(0.0f, chSpellFireball_func_8038F01C);
|
||||
timedFunc_set_0(0.3f, chSpellFireball_func_8038F050);
|
||||
actor->unk58_0 = 0;
|
||||
actor->scale *= 1.6;
|
||||
if(actor->marker->id != MARKER_280_GRUNTY_SPELL_GREEN_ATTACK){
|
||||
chSpellFireball_emitSparkles(actor->position, 4, ASSET_713_SPRITE_SPARKLE_YELLOW,
|
||||
D_80391C0C, D_80391C24, D_80391C3C,
|
||||
D_80391C54, D_80391C64, D_80391C74
|
||||
);
|
||||
chSpellFireball_emitSparkles(actor->position, 4, ASSET_715_SPRITE_SPARKLE_RED,
|
||||
D_80391C0C, D_80391C24, D_80391C3C,
|
||||
D_80391C54, D_80391C64, D_80391C74
|
||||
);
|
||||
chSpellFireball_emitSmoke(actor->position, 3, D_80391BFC);
|
||||
chSpellFireball_emitExplosion(D_803928E8, ASSET_4A0_SPRITE_EXPLOSION, 1, D_80391BA4, D_80391BE4,
|
||||
D_80391BAC, D_80391BBC, D_80391BDC
|
||||
|
||||
);
|
||||
D_803928E8[1] -= 50.0f;
|
||||
chSpellFireball_emitExplosion(D_803928E8, ASSET_6C1_SPRITE_SMOKE, 2, D_80391BA4, D_80391BE4,
|
||||
D_80391BAC, D_80391BBC, D_80391BDC
|
||||
|
||||
);
|
||||
}
|
||||
else{//L8038F304
|
||||
chSpellFireball_emitSparkles(actor->position, 4, ASSET_713_SPRITE_SPARKLE_YELLOW,
|
||||
D_80391C0C, D_80391C24, D_80391C3C,
|
||||
D_80391C54, D_80391BCC, D_80391C74
|
||||
);
|
||||
chSpellFireball_emitSmoke(actor->position, 3, D_80391BFC);
|
||||
func_8038CED8(actor->position, 0x558, 0.15f, 0.5f);
|
||||
actor->scale *= 1.6;
|
||||
if (actor->marker->id != MARKER_280_GRUNTY_SPELL_GREEN_ATTACK) {
|
||||
fight_createSpriteParticles(actor->position, 4, ASSET_713_SPRITE_SPARKLE_YELLOW, D_80391C0C, D_80391C24, D_80391C3C, D_80391C54, D_80391C64, D_80391C74);
|
||||
fight_createSpriteParticles(actor->position, 4, ASSET_715_SPRITE_SPARKLE_RED, D_80391C0C, D_80391C24, D_80391C3C, D_80391C54, D_80391C64, D_80391C74);
|
||||
fight_createSmokeParticles(actor->position, 3, D_80391BFC);
|
||||
fight_createAnimatedSpriteParticles(position, ASSET_4A0_SPRITE_EXPLOSION, 1, sFightExplosionStartFrameRange, sFightExplosionSpawnPositionRange, sFightExplosionScaleRange, sFightExplosionLifetimeRange, sFightExplosionFadeRange);
|
||||
position[1] -= 50.0f;
|
||||
fight_createAnimatedSpriteParticles(position, ASSET_6C1_SPRITE_SMOKE, 2, sFightExplosionStartFrameRange, sFightExplosionSpawnPositionRange, sFightExplosionScaleRange, sFightExplosionLifetimeRange, sFightExplosionFadeRange);
|
||||
} else {
|
||||
fight_createSpriteParticles(actor->position, 4, ASSET_713_SPRITE_SPARKLE_YELLOW, D_80391C0C, D_80391C24, D_80391C3C, D_80391C54, D_80391BCC, D_80391C74);
|
||||
fight_createSmokeParticles(actor->position, 3, D_80391BFC);
|
||||
fight_createBlastParticle(actor->position, ASSET_558_MODEL_GREEN_JINJO_BLAST, 0.15f, 0.5f);
|
||||
actor->position_y += 260.0f;
|
||||
chbossjinjo_spawnParticles(actor, 0x712, ASSET_6C3_SPRITE_SMOKE_GREEN, 1.6f);
|
||||
chbossjinjo_spawnParticlesAtFinalBoss(actor, 0x712, ASSET_6C3_SPRITE_SMOKE_GREEN, 1.6f);
|
||||
}
|
||||
local->unk0 = 0.66f;
|
||||
subaddie_set_state(actor, 2);
|
||||
}//L8038F39C
|
||||
}
|
||||
|
||||
void func_8038F3B4(ActorMarker *marker, ActorMarker *other){
|
||||
if( other->id == 0x276
|
||||
|| other->id == 0x27A
|
||||
|| other->id == 0x27F
|
||||
) return;
|
||||
|
||||
func_8038F084(marker);
|
||||
switch(volatileFlag_getN(VOLATILE_FLAG_23_FINAL_BOSS_PHASE, 3)){
|
||||
case 1: //8038F41C
|
||||
if(!fight_D_803928E0 && gcdialog_showText(randi2(0, 5) + 0x10f2, 0, 0, 0, 0, 0))
|
||||
fight_D_803928E0 = 1;
|
||||
break;
|
||||
case 2: //8038F468
|
||||
if(!D_803928E1 && gcdialog_showText(randi2(0, 5) + 0x110b, 0, 0, 0, 0, 0))
|
||||
D_803928E1 = 1;
|
||||
break;
|
||||
case 3: //8038F4B4
|
||||
if(!D_803928E2 && gcdialog_showText(randi2(0, 5) + 0x1122, 0, 0, 0, 0, 0))
|
||||
D_803928E2 = 1;
|
||||
break;
|
||||
case 4: //8038F500
|
||||
if( !D_803928E3
|
||||
&& func_8038C2A4()
|
||||
&& gcdialog_showText(randi2(0, 5) + 0x113b, 0, 0, 0, 0, 0)
|
||||
)
|
||||
D_803928E3 = 1;
|
||||
break;
|
||||
case 5:
|
||||
if( !D_803928E4
|
||||
&& func_8038C2B0()
|
||||
&& gcdialog_showText(randi2(0, 5) + 0x1154, 0, 0, 0, 0, 0)
|
||||
)
|
||||
D_803928E4 = 1;
|
||||
break;
|
||||
}//L8038F5B0
|
||||
|
||||
}
|
||||
|
||||
s32 func_8038F5BC(f32 *arg0, f32 arg1) {
|
||||
if (((arg0[0] * arg0[0]) + (arg0[2] * arg0[2])) < arg1) {
|
||||
return 1;
|
||||
|
||||
local->explosion_lifetime = 0.66f;
|
||||
subaddie_set_state(actor, SPELLFIREBALL_STATE_2_DESPAWN);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void func_8038F5F8(Actor *arg0) {
|
||||
void chSpellFireball_collisionDie(ActorMarker *marker, ActorMarker *other) {
|
||||
if ((other->id == MARKER_276_STONE_JINJO) ||
|
||||
(other->id == MARKER_27A_JINJO_STATUE_BASE) ||
|
||||
(other->id == MARKER_27F_JINJONATOR_STATUE_BASE))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
chSpellFireball_createExplosionParticles(marker);
|
||||
|
||||
switch(volatileFlag_getN(VOLATILE_FLAG_23_FINAL_BOSS_PHASE, 3)) {
|
||||
case FINALBOSS_PHASE_1_BROOMSTICK:
|
||||
if (!sFightPlayerHitBySpellInPhase1 && gcdialog_showText(randi2(0, 5) + ASSET_10F2_TEXT_FINALBOSS_PHASE_1_OPTION_1, 0, 0, 0, 0, 0))
|
||||
{
|
||||
sFightPlayerHitBySpellInPhase1 = TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
case FINALBOSS_PHASE_2_AIR:
|
||||
if (!sFightPlayerHitBySpellInPhase2 && gcdialog_showText(randi2(0, 5) + ASSET_110B_TEXT_FINALBOSS_PHASE_2_OPTION_1, 0, 0, 0, 0, 0))
|
||||
{
|
||||
sFightPlayerHitBySpellInPhase2 = TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
case FINALBOSS_PHASE_3_FLIGHT:
|
||||
if (!sFightPlayerHitBySpellInPhase3 && gcdialog_showText(randi2(0, 5) + ASSET_1122_TEXT_FINALBOSS_PHASE_3_OPTION_1, 0, 0, 0, 0, 0))
|
||||
{
|
||||
sFightPlayerHitBySpellInPhase3 = TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
case FINALBOSS_PHASE_4_JINJOS:
|
||||
if (!sFightPlayerHitBySpellInPhase4 &&
|
||||
chfinalboss_isJinjoSpawned() &&
|
||||
gcdialog_showText(randi2(0, 5) + ASSET_113B_TEXT_FINALBOSS_PHASE_4_OPTION_1, 0, 0, 0, 0, 0))
|
||||
{
|
||||
sFightPlayerHitBySpellInPhase4 = TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
case FINALBOSS_PHASE_5_JINJONATOR:
|
||||
if (!sFightPlayerHitBySpellInPhase5 &&
|
||||
chfinalboss_isJinjonatorSpawned() &&
|
||||
gcdialog_showText(randi2(0, 5) + ASSET_1154_TEXT_FINALBOSS_PHASE_5_OPTION_1, 0, 0, 0, 0, 0))
|
||||
{
|
||||
sFightPlayerHitBySpellInPhase5 = TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool chSpellFireball_isPositionOverThreshold(f32 *position, f32 distance) {
|
||||
if (((position[0] * position[0]) + (position[2] * position[2])) < distance) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void chSpellFireball_free(Actor *this) {
|
||||
func_80324D2C(0.0f, COMUSIC_43_ENTER_LEVEL_GLITTER);
|
||||
}
|
||||
|
||||
void func_8038F620(Actor *this){
|
||||
static f32 D_803928F8[3];
|
||||
void chSpellFireball_update(Actor *this) {
|
||||
static f32 old_position[3];
|
||||
static f32 D_80392908[3];
|
||||
static f32 D_80392914;
|
||||
static f32 scale_ratio;
|
||||
|
||||
ActorLocal_fight_87A0 * local = (ActorLocal_fight_87A0 *)&this->local;
|
||||
f32 sp40 = time_getDelta();
|
||||
ActorLocal_SpellFireball *local = (ActorLocal_SpellFireball *)&this->local;
|
||||
f32 time_delta = time_getDelta();
|
||||
|
||||
if(!this->volatile_initialized){
|
||||
if (!this->volatile_initialized) {
|
||||
this->volatile_initialized = TRUE;
|
||||
marker_setCollisionScripts(this->marker, NULL, NULL, func_8038F3B4);
|
||||
marker_setCollisionScripts(this->marker, NULL, NULL, chSpellFireball_collisionDie);
|
||||
this->marker->propPtr->unk8_3 = 0;
|
||||
actor_collisionOn(this);
|
||||
this->lifetime_value = 8.0f;
|
||||
this->scale = 0.1f;
|
||||
if( this->marker->id == MARKER_280_GRUNTY_SPELL_GREEN_ATTACK){
|
||||
|
||||
if (this->marker->id == MARKER_280_GRUNTY_SPELL_GREEN_ATTACK) {
|
||||
actor_collisionOff(this);
|
||||
marker_setFreeMethod(this->marker, func_8038F5F8);
|
||||
marker_setFreeMethod(this->marker, chSpellFireball_free);
|
||||
func_80324CFC(0.0f, COMUSIC_43_ENTER_LEVEL_GLITTER, 32000);
|
||||
timed_playSfx(0.0f, SFX_113_PAD_APPEARS, 1.0f, 32000);
|
||||
timed_playSfx(0.75f, 0x415, 1.0f, 32000);
|
||||
timed_playSfx(2.0f, 0x415, 1.0f, 32000);
|
||||
|
||||
|
||||
} else {
|
||||
func_80324D54(0.26f, SFX_14F_FIREWORK_WHISTLING, 1.0f, 0x61A8, this->position, 1000.0f, 7500.0f);
|
||||
func_80324D54(0.4f, SFX_14E_SOFT_EXPLOSION, 1.0f, 0x61A8, this->position, 500.0f, 4500.0f);
|
||||
}
|
||||
else{//L8038F738
|
||||
func_80324D54(0.26f, SFX_14F_FIREWORK_WHISTLING, 1.0f, 0x61A8,
|
||||
this->position, 1000.0f, 7500.0f
|
||||
);
|
||||
}
|
||||
|
||||
func_80324D54(0.4f, SFX_14E_SOFT_EXPLOSION, 1.0f, 0x61A8,
|
||||
this->position, 500.0f, 4500.0f
|
||||
);
|
||||
}
|
||||
}//L8038F79C
|
||||
if(D_803928E5 && this->marker->id == MARKER_280_GRUNTY_SPELL_GREEN_ATTACK){
|
||||
if (sFightLastSpellFired && this->marker->id == MARKER_280_GRUNTY_SPELL_GREEN_ATTACK) {
|
||||
ncStaticCamera_rotateToTarget(this->position);
|
||||
}//L8038F7D4
|
||||
}
|
||||
|
||||
switch(this->state){
|
||||
case 1://L8038F7F8
|
||||
D_80392914 = sp40*1.4;
|
||||
this->scale = (this->scale + D_80392914 < 1.0) ? this->scale + D_80392914 : 1.0f;
|
||||
switch(this->state) {
|
||||
case SPELLFIREBALL_STATE_1_ACTIVE:
|
||||
scale_ratio = time_delta * 1.4;
|
||||
this->scale = (this->scale + scale_ratio < 1.0) ? this->scale + scale_ratio : 1.0f;
|
||||
|
||||
switch(this->marker->id){
|
||||
case MARKER_25C_GRUNTY_SPELL_FIREBALL://L8038F8AC
|
||||
chSpellFireball_emitExplosion(this->position, ASSET_4A0_SPRITE_EXPLOSION, 1,
|
||||
D_80391CEC, D_80391D34,
|
||||
D_80391CF4, D_80391D04, D_80391D14
|
||||
);
|
||||
switch (this->marker->id) {
|
||||
case MARKER_25C_GRUNTY_SPELL_FIREBALL:
|
||||
fight_createAnimatedSpriteParticles(this->position, ASSET_4A0_SPRITE_EXPLOSION, 1, sFightExplosionStartFrameRange2, D_80391D34, D_80391CF4, D_80391D04, D_80391D14);
|
||||
break;
|
||||
case MARKER_280_GRUNTY_SPELL_GREEN_ATTACK://L8038F8C8
|
||||
chSpellFireball_emitExplosion(this->position, ASSET_6C9_SPRITE_GREEN_SPELL_ATTACK, 1,
|
||||
D_80391CEC, D_80391D34,
|
||||
D_80391CF4, D_80391D1C, D_80391D2C
|
||||
);
|
||||
|
||||
case MARKER_280_GRUNTY_SPELL_GREEN_ATTACK:
|
||||
fight_createAnimatedSpriteParticles(this->position, ASSET_6C9_SPRITE_GREEN_SPELL_ATTACK, 1, sFightExplosionStartFrameRange2, D_80391D34, D_80391CF4, D_80391D1C, D_80391D2C);
|
||||
globalTimer_getTime();
|
||||
break;
|
||||
}//L8038F918
|
||||
D_803928F8[0] = this->position[0];
|
||||
D_803928F8[1] = this->position[1];
|
||||
D_803928F8[2] = this->position[2];
|
||||
|
||||
this->position[0] += this->velocity_x*sp40;
|
||||
this->position[1] += this->velocity_y*sp40;
|
||||
this->position[2] += this->velocity_z*sp40;
|
||||
|
||||
this->velocity[0] += this->unk1C[0]*sp40;
|
||||
this->velocity[1] += this->unk1C[1]*sp40;
|
||||
this->velocity[2] += this->unk1C[2]*sp40;
|
||||
|
||||
this->pitch += 200.0f*sp40;
|
||||
this->yaw += 200.0f*sp40;
|
||||
|
||||
if( this->position_y < -2500.0f
|
||||
|| 5000.0f < this->position_y
|
||||
|| !func_8038F5BC(this->position, 100000000.0f)
|
||||
){
|
||||
marker_despawn(this->marker);
|
||||
}
|
||||
else{
|
||||
if(this->position_y < 300.0f
|
||||
&& func_8038F5BC(this->position, 16000000.0f)
|
||||
){
|
||||
if(func_80320C94(D_803928F8, this->position, func_8033229C(this->marker), D_80392908, 8, 0x40000000)){
|
||||
func_8038F084(this->marker);
|
||||
return;
|
||||
}
|
||||
|
||||
old_position[0] = this->position[0];
|
||||
old_position[1] = this->position[1];
|
||||
old_position[2] = this->position[2];
|
||||
|
||||
this->position[0] += this->velocity_x * time_delta;
|
||||
this->position[1] += this->velocity_y * time_delta;
|
||||
this->position[2] += this->velocity_z * time_delta;
|
||||
|
||||
this->velocity[0] += this->unk1C[0] * time_delta;
|
||||
this->velocity[1] += this->unk1C[1] * time_delta;
|
||||
this->velocity[2] += this->unk1C[2] * time_delta;
|
||||
|
||||
this->pitch += 200.0f * time_delta;
|
||||
this->yaw += 200.0f * time_delta;
|
||||
|
||||
if ((this->position_y < -2500.0f) ||
|
||||
(5000.0f < this->position_y) ||
|
||||
(!chSpellFireball_isPositionOverThreshold(this->position, 100000000.0f)))
|
||||
{
|
||||
marker_despawn(this->marker);
|
||||
} else {
|
||||
if ((this->position_y < 300.0f) &&
|
||||
(chSpellFireball_isPositionOverThreshold(this->position, 16000000.0f)) &&
|
||||
(func_80320C94(old_position, this->position, func_8033229C(this->marker), D_80392908, 8, 0x40000000)))
|
||||
{
|
||||
chSpellFireball_createExplosionParticles(this->marker);
|
||||
return;
|
||||
}
|
||||
}
|
||||
// L8038FABC
|
||||
if( this->marker->id != MARKER_280_GRUNTY_SPELL_GREEN_ATTACK
|
||||
&& func_8028F25C()
|
||||
){
|
||||
func_8038F084(this->marker);
|
||||
}
|
||||
else {
|
||||
if(0.0 <= this->lifetime_value){
|
||||
this->lifetime_value -= sp40;
|
||||
}else{
|
||||
func_8038F084(this->marker);
|
||||
|
||||
if ((this->marker->id != MARKER_280_GRUNTY_SPELL_GREEN_ATTACK) && func_8028F25C()) {
|
||||
chSpellFireball_createExplosionParticles(this->marker);
|
||||
} else {
|
||||
if (0.0 <= this->lifetime_value) {
|
||||
this->lifetime_value -= time_delta;
|
||||
} else {
|
||||
chSpellFireball_createExplosionParticles(this->marker);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case 2://L8038FB34
|
||||
if(local->unk0 < 0.0){
|
||||
|
||||
case SPELLFIREBALL_STATE_2_DESPAWN:
|
||||
if (local->explosion_lifetime < 0.0) {
|
||||
marker_despawn(this->marker);
|
||||
}else{
|
||||
local->unk0 -= sp40;
|
||||
} else {
|
||||
local->explosion_lifetime -= time_delta;
|
||||
}
|
||||
|
||||
break;
|
||||
}//L8038FB74
|
||||
}
|
||||
}
|
||||
|
||||
void fight_func_8038FB84(ActorMarker *arg0, f32 *arg1, f32 *arg2, f32 *arg3) {
|
||||
Actor *temp_v0 = marker_getActor(arg0);
|
||||
void chSpellFireball_func_8038FB84(ActorMarker *marker, f32 *position, f32 *velocity, f32 *arg3) {
|
||||
Actor *actor = marker_getActor(marker);
|
||||
|
||||
temp_v0->position_x = arg1[0];
|
||||
temp_v0->position_y = arg1[1];
|
||||
temp_v0->position_z = arg1[2];
|
||||
temp_v0->velocity_x = arg2[0];
|
||||
temp_v0->velocity_y = arg2[1];
|
||||
temp_v0->velocity_z = arg2[2];
|
||||
temp_v0->unk1C_x = arg3[0];
|
||||
temp_v0->unk1C_y = arg3[1];
|
||||
temp_v0->unk1C_z = arg3[2];
|
||||
actor->position_x = position[0];
|
||||
actor->position_y = position[1];
|
||||
actor->position_z = position[2];
|
||||
actor->velocity_x = velocity[0];
|
||||
actor->velocity_y = velocity[1];
|
||||
actor->velocity_z = velocity[2];
|
||||
actor->unk1C_x = arg3[0];
|
||||
actor->unk1C_y = arg3[1];
|
||||
actor->unk1C_z = arg3[2];
|
||||
}
|
||||
|
||||
void func_8038FC00(void) {
|
||||
fight_D_803928E0 = (u8)0;
|
||||
D_803928E1 = (u8)0;
|
||||
D_803928E2 = (u8)0;
|
||||
D_803928E3 = (u8)0;
|
||||
D_803928E4 = (u8)0;
|
||||
void chSpellFireball_resetSpellHits(void) {
|
||||
sFightPlayerHitBySpellInPhase1 = FALSE;
|
||||
sFightPlayerHitBySpellInPhase2 = FALSE;
|
||||
sFightPlayerHitBySpellInPhase3 = FALSE;
|
||||
sFightPlayerHitBySpellInPhase4 = FALSE;
|
||||
sFightPlayerHitBySpellInPhase5 = FALSE;
|
||||
}
|
||||
|
||||
void func_8038FC2C(s32 arg0) {
|
||||
D_803928E5 = arg0;
|
||||
void chSpellFireball_setLastSpellFired(bool value) {
|
||||
sFightLastSpellFired = value;
|
||||
}
|
||||
|
@@ -3,40 +3,28 @@
|
||||
#include "variables.h"
|
||||
#include "fight.h"
|
||||
|
||||
extern Actor *actorArray_findActorFromActorId();
|
||||
extern void subaddie_set_state_with_direction(Actor*, s32, f32, s32);
|
||||
extern f32 chbossjinjo_8038D268(void);
|
||||
|
||||
void chstonejinjo_update(Actor *);
|
||||
|
||||
/* .data */
|
||||
ActorAnimationInfo chStoneJinjo_AnimationInfo[] ={
|
||||
ActorAnimationInfo chStoneJinjoAnimationInfo[] = {
|
||||
{0, 0.0f},
|
||||
{0x265, 1e+8f},
|
||||
{0x265, 1e+8f},
|
||||
{0x265, 1e+8f},
|
||||
};
|
||||
ActorInfo chStoneJinjo = {
|
||||
MARKER_276_STONE_JINJO, ACTOR_3A1_STONE_JINJO, ASSET_545_MODEL_STONE_JINJO,
|
||||
0x1, chStoneJinjo_AnimationInfo,
|
||||
chstonejinjo_update, func_80326224, actor_draw,
|
||||
0, 0x800, 1.0f, 0
|
||||
};
|
||||
|
||||
/* .code */
|
||||
ActorInfo chStoneJinjo = { MARKER_276_STONE_JINJO, ACTOR_3A1_STONE_JINJO, ASSET_545_MODEL_STONE_JINJO, 1, chStoneJinjoAnimationInfo, chstonejinjo_update, actor_update_func_80326224, actor_draw, 0, 2048, 1.0f, 0 };
|
||||
|
||||
void chstonejinjo_spawnJinjo(ActorMarker *marker) {
|
||||
Actor *this;
|
||||
Actor *jinjo;
|
||||
Actor *actor_stonejinjo = marker_getActor(marker);
|
||||
Actor *actor_jinjo;
|
||||
|
||||
this = marker_getActor(marker);
|
||||
if (this->unkF4_8 == BOSSJINJO_JINJONATOR) {
|
||||
jinjo = spawn_child_actor(ACTOR_3AC_JINJONATOR, &this);
|
||||
if (actor_stonejinjo->unkF4_8 == BOSSJINJO_5_JINJONATOR) {
|
||||
actor_jinjo = spawn_child_actor(ACTOR_3AC_JINJONATOR, &actor_stonejinjo);
|
||||
} else {
|
||||
jinjo = spawn_child_actor((this->unkF4_8) + 0x3A4, &this);
|
||||
actor_jinjo = spawn_child_actor(ACTOR_3A4_BOSS_JINJO_BASE_IDX + actor_stonejinjo->unkF4_8, &actor_stonejinjo);
|
||||
}
|
||||
jinjo->unkF4_8 = this->unkF4_8;
|
||||
jinjo->lifetime_value = this->unk1C[0];
|
||||
jinjo->scale = this->scale;
|
||||
|
||||
actor_jinjo->unkF4_8 = actor_stonejinjo->unkF4_8;
|
||||
actor_jinjo->lifetime_value = actor_stonejinjo->unk1C[0];
|
||||
actor_jinjo->scale = actor_stonejinjo->scale;
|
||||
}
|
||||
|
||||
void chstonejinjo_update(Actor *this) {
|
||||
@@ -44,7 +32,8 @@ void chstonejinjo_update(Actor *this) {
|
||||
this->volatile_initialized = TRUE;
|
||||
this->marker->propPtr->unk8_3 = TRUE;
|
||||
actor_collisionOff(this);
|
||||
if (this->unkF4_8 == BOSSJINJO_JINJONATOR) {
|
||||
|
||||
if (this->unkF4_8 == BOSSJINJO_5_JINJONATOR) {
|
||||
this->marker->unk40_23 = TRUE;
|
||||
this->marker->unk40_20 = TRUE;
|
||||
this->unk1C[0] = 6.0f;
|
||||
@@ -54,86 +43,95 @@ void chstonejinjo_update(Actor *this) {
|
||||
this->scale *= 1.8;
|
||||
}
|
||||
}
|
||||
|
||||
switch (this->state) {
|
||||
case 1:
|
||||
animctrl_setAnimTimer(this->animctrl, 0.0f);
|
||||
break;
|
||||
case 2:
|
||||
if (this->unkF4_8 != BOSSJINJO_JINJONATOR) {
|
||||
if (actor_animationIsAt(this, 0.001f)) {
|
||||
FUNC_8030E8B4(SFX_D_EGGSHELL_BREAKING, 1.2f, 25000, this->position, 1000, 5000);
|
||||
func_8030E878(SFX_80_YUMYUM_CLACK, randf2(0.6f, 0.8f), 20000, this->position, 1000.0f, 5000.0f);
|
||||
case STONEJINJO_STATE_1_IDLE:
|
||||
animctrl_setAnimTimer(this->animctrl, 0.0f);
|
||||
break;
|
||||
|
||||
case STONEJINJO_STATE_2_BREAK_OPEN:
|
||||
if (this->unkF4_8 != BOSSJINJO_5_JINJONATOR) {
|
||||
if (actor_animationIsAt(this, 0.001f)) {
|
||||
FUNC_8030E8B4(SFX_D_EGGSHELL_BREAKING, 1.2f, 25000, this->position, 1000, 5000);
|
||||
func_8030E878(SFX_80_YUMYUM_CLACK, randf2(0.6f, 0.8f), 20000, this->position, 1000.0f, 5000.0f);
|
||||
}
|
||||
|
||||
if (actor_animationIsAt(this, 0.26f) ||
|
||||
actor_animationIsAt(this, 0.43f) ||
|
||||
actor_animationIsAt(this, 0.55f) ||
|
||||
actor_animationIsAt(this, 0.62f) ||
|
||||
actor_animationIsAt(this, 0.77f))
|
||||
{
|
||||
func_8030E878(SFX_80_YUMYUM_CLACK, randf2(0.6f, 0.8f), 20000, this->position, 1000.0f, 5000.0f);
|
||||
}
|
||||
} else {
|
||||
if (actor_animationIsAt(this, 0.001f))
|
||||
{
|
||||
FUNC_8030E8B4(SFX_D_EGGSHELL_BREAKING, 1.2f, 25000, this->position, 1000, 5000);
|
||||
func_8030E878(SFX_80_YUMYUM_CLACK, randf2(0.4f, 0.6f), 20000, this->position, 1000.0f, 5000.0f);
|
||||
}
|
||||
|
||||
if (actor_animationIsAt(this, 0.26f) ||
|
||||
actor_animationIsAt(this, 0.43f) ||
|
||||
actor_animationIsAt(this, 0.55f) ||
|
||||
actor_animationIsAt(this, 0.62f) ||
|
||||
actor_animationIsAt(this, 0.77f))
|
||||
{
|
||||
func_8030E878(SFX_80_YUMYUM_CLACK, randf2(0.4f, 0.6f), 20000, this->position, 1000.0f, 5000.0f);
|
||||
}
|
||||
|
||||
if (actor_animationIsAt(this, 0.1f) ||
|
||||
actor_animationIsAt(this, 0.23f) ||
|
||||
actor_animationIsAt(this, 0.34f) ||
|
||||
actor_animationIsAt(this, 0.45f) ||
|
||||
actor_animationIsAt(this, 0.55f) ||
|
||||
actor_animationIsAt(this, 0.65f) ||
|
||||
actor_animationIsAt(this, 0.78f) ||
|
||||
actor_animationIsAt(this, 0.83f) ||
|
||||
actor_animationIsAt(this, 0.9f) ||
|
||||
actor_animationIsAt(this, 0.98f))
|
||||
{
|
||||
func_8030E6A4(SFX_3_DULL_CANNON_SHOT, randf2(1.2f, 1.4f), 20000);
|
||||
}
|
||||
}
|
||||
if( actor_animationIsAt(this, 0.26f)
|
||||
|| actor_animationIsAt(this, 0.43f)
|
||||
|| actor_animationIsAt(this, 0.55f)
|
||||
|| actor_animationIsAt(this, 0.62f)
|
||||
|| actor_animationIsAt(this, 0.77f)
|
||||
) {
|
||||
func_8030E878(SFX_80_YUMYUM_CLACK, randf2(0.6f, 0.8f), 20000, this->position, 1000.0f, 5000.0f);
|
||||
|
||||
if (actor_animationIsAt(this, 0.999f)) {
|
||||
subaddie_set_state_with_direction(this, STONEJINJO_STATE_3_OPEN, 0.99999f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
func_80326310(this);
|
||||
}
|
||||
} else {
|
||||
if (actor_animationIsAt(this, 0.001f)) {
|
||||
FUNC_8030E8B4(SFX_D_EGGSHELL_BREAKING, 1.2f, 25000, this->position, 1000, 5000);
|
||||
func_8030E878(SFX_80_YUMYUM_CLACK, randf2(0.4f, 0.6f), 20000, this->position, 1000.0f, 5000.0f);
|
||||
}
|
||||
if( actor_animationIsAt(this, 0.26f)
|
||||
|| actor_animationIsAt(this, 0.43f)
|
||||
|| actor_animationIsAt(this, 0.55f)
|
||||
|| actor_animationIsAt(this, 0.62f)
|
||||
|| actor_animationIsAt(this, 0.77f)
|
||||
) {
|
||||
func_8030E878(SFX_80_YUMYUM_CLACK, randf2(0.4f, 0.6f), 20000, this->position, 1000.0f, 5000.0f);
|
||||
}
|
||||
if( actor_animationIsAt(this, 0.1f)
|
||||
|| actor_animationIsAt(this, 0.23f)
|
||||
|| actor_animationIsAt(this, 0.34f)
|
||||
|| actor_animationIsAt(this, 0.45f)
|
||||
|| actor_animationIsAt(this, 0.55f)
|
||||
|| actor_animationIsAt(this, 0.65f)
|
||||
|| actor_animationIsAt(this, 0.78f)
|
||||
|| actor_animationIsAt(this, 0.83f)
|
||||
|| actor_animationIsAt(this, 0.9f)
|
||||
|| actor_animationIsAt(this, 0.98f)
|
||||
) {
|
||||
func_8030E6A4(SFX_3_DULL_CANNON_SHOT, randf2(1.2f, 1.4f), 20000);
|
||||
}
|
||||
}
|
||||
if (actor_animationIsAt(this, 0.999f)) {
|
||||
subaddie_set_state_with_direction(this, 3, 0.99999f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
func_80326310(this);
|
||||
}
|
||||
break;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void chstonejinjo_breakOpen(ActorMarker *marker){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
s32 sp38;
|
||||
f32 sp34;
|
||||
f32 sp30;
|
||||
f32 sp24[3];
|
||||
void chstonejinjo_breakOpen(ActorMarker *marker) {
|
||||
Actor *actor_stonejinjo = marker_getActor(marker);
|
||||
s32 camera_node;
|
||||
f32 bossjinjo_wakeup_time;
|
||||
f32 camera_duration_time;
|
||||
f32 position_finalboss[3];
|
||||
|
||||
if(actor->state != 2){
|
||||
subaddie_set_state_with_direction(actor, 2, 0.0f, 1);
|
||||
actor_playAnimationOnce(actor);
|
||||
animctrl_setDuration(actor->animctrl, actor->unk1C[0]);
|
||||
SPAWNQUEUE_ADD_1(chstonejinjo_spawnJinjo, actor->marker);
|
||||
if(!fileProgressFlag_get(FILEPROG_D1_HAS_ACTIVATED_A_JINJO_STATUE_IN_FINAL_FIGHT) && actor->unkF4_8 != BOSSJINJO_JINJONATOR){
|
||||
sp38 = 0x30 + actor->unkF4_8*2;
|
||||
sp34 = chbossjinjo_8038D268();
|
||||
sp30 = actor->unk1C[0] + sp34;
|
||||
fight_func_8038C0DC(&sp24);
|
||||
func_8028F94C(2, &sp24);
|
||||
func_8038C27C(1);
|
||||
timed_setStaticCameraToNode(0 * sp30, sp38);
|
||||
timed_exitStaticCamera(1 * sp30);
|
||||
timed_setStaticCameraToNode(1 * sp30, sp38 + 1);
|
||||
if (actor_stonejinjo->state != STONEJINJO_STATE_2_BREAK_OPEN) {
|
||||
subaddie_set_state_with_direction(actor_stonejinjo, STONEJINJO_STATE_2_BREAK_OPEN, 0.0f, 1);
|
||||
actor_playAnimationOnce(actor_stonejinjo);
|
||||
animctrl_setDuration(actor_stonejinjo->animctrl, actor_stonejinjo->unk1C[0]);
|
||||
SPAWNQUEUE_ADD_1(chstonejinjo_spawnJinjo, actor_stonejinjo->marker);
|
||||
|
||||
if (!fileProgressFlag_get(FILEPROG_D1_HAS_ACTIVATED_A_JINJO_STATUE_IN_FINAL_FIGHT) && actor_stonejinjo->unkF4_8 != BOSSJINJO_5_JINJONATOR) {
|
||||
camera_node = 48 + actor_stonejinjo->unkF4_8 * 2;
|
||||
bossjinjo_wakeup_time = chbossjinjo_getWakeUpTime();
|
||||
camera_duration_time = actor_stonejinjo->unk1C[0] + bossjinjo_wakeup_time;
|
||||
chfinalboss_getPosition(position_finalboss);
|
||||
func_8028F94C(2, &position_finalboss);
|
||||
chfinalboss_setJinjoStatueActivated(TRUE);
|
||||
timed_setStaticCameraToNode(0 * camera_duration_time, camera_node);
|
||||
timed_exitStaticCamera(1 * camera_duration_time);
|
||||
timed_setStaticCameraToNode(1 * camera_duration_time, camera_node + 1);
|
||||
}
|
||||
}//L8038DF8C
|
||||
}
|
||||
}
|
||||
|
||||
f32 func_8038DFA0(void) {
|
||||
return actorArray_findActorFromActorId(ACTOR_3A1_STONE_JINJO)->unk1C_x;
|
||||
f32 chstonejinjo_getBreakUpTime(void) {
|
||||
return actorArray_findActorFromActorId(ACTOR_3A1_STONE_JINJO)->unk1C[0];
|
||||
}
|
||||
|
@@ -5,9 +5,9 @@
|
||||
#include "fight.h"
|
||||
#include "actor.h"
|
||||
|
||||
u8 pad_fight_80392740[0x10];
|
||||
u8 sFightPadding[0x10];
|
||||
|
||||
void fight_func_803863F0(void)
|
||||
void fight_addSpawnableActors(void)
|
||||
{
|
||||
spawnableActorList_add(&chSpellFireball, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15 | ACTOR_FLAG_UNKNOWN_20);
|
||||
spawnableActorList_add(&chGreenBlast, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15 | ACTOR_FLAG_UNKNOWN_20);
|
@@ -1,12 +1,71 @@
|
||||
#ifndef _FIGHT_INTERNAL_H_
|
||||
#define _FIGHT_INTERNAL_H_
|
||||
|
||||
enum bossjinjo_e{
|
||||
BOSSJINJO_ORANGE = 1,
|
||||
BOSSJINJO_GREEN,
|
||||
BOSSJINJO_PINK,
|
||||
BOSSJINJO_YELLOW,
|
||||
BOSSJINJO_JINJONATOR
|
||||
enum ch_bossjinjo_e {
|
||||
BOSSJINJO_0_UNKNOWN,
|
||||
BOSSJINJO_1_ORANGE,
|
||||
BOSSJINJO_2_GREEN,
|
||||
BOSSJINJO_3_PINK,
|
||||
BOSSJINJO_4_YELLOW,
|
||||
BOSSJINJO_5_JINJONATOR
|
||||
};
|
||||
|
||||
enum chBossJinjoBase_state_e {
|
||||
CHBOSSJINJOBASE_STATE_1_RAISE = 1,
|
||||
CHBOSSJINJOBASE_STATE_2_DEFAULT = 2,
|
||||
CHBOSSJINJOBASE_STATE_3_SPAWNED_BOSS_JINJO = 3
|
||||
};
|
||||
|
||||
enum ch_stonejinjo_state_e {
|
||||
STONEJINJO_STATE_0_UNKNOWN,
|
||||
STONEJINJO_STATE_1_IDLE,
|
||||
STONEJINJO_STATE_2_BREAK_OPEN,
|
||||
STONEJINJO_STATE_3_OPEN
|
||||
};
|
||||
|
||||
enum ch_bossjinjo_state_e {
|
||||
BOSSJINJO_STATE_0_UNKNOWN,
|
||||
BOSSJINJO_STATE_1_WAKE_UP,
|
||||
BOSSJINJO_STATE_2_YAWN,
|
||||
BOSSJINJO_STATE_3_SPIN_UP,
|
||||
BOSSJINJO_STATE_4_ATTACK,
|
||||
BOSSJINJO_STATE_5_HIT
|
||||
};
|
||||
|
||||
enum ch_jinjonator_state_e {
|
||||
JINJONATOR_STATE_0_UNKNOWN,
|
||||
JINJONATOR_STATE_1_RELEASE,
|
||||
JINJONATOR_STATE_2_WAKE_UP,
|
||||
JINJONATOR_STATE_3_MOVE_UPWARD,
|
||||
JINJONATOR_STATE_4_PREPARE_SPIN_UP,
|
||||
JINJONATOR_STATE_5_SPIN_UP,
|
||||
JINJONATOR_STATE_6_ATTACK,
|
||||
JINJONATOR_STATE_7_ATTACK_END,
|
||||
JINJONATOR_STATE_8,
|
||||
JINJONATOR_STATE_9_FINAL_ATTACK_POWER_UP,
|
||||
JINJONATOR_STATE_10_FINAL_ATTACK_PREPARE,
|
||||
JINJONATOR_STATE_11_FINAL_ATTACK,
|
||||
JINJONATOR_STATE_12_FINAL_ATTACK_END
|
||||
};
|
||||
|
||||
enum ch_finalboss_phase_e {
|
||||
FINALBOSS_PHASE_0_INTRO,
|
||||
FINALBOSS_PHASE_1_BROOMSTICK,
|
||||
FINALBOSS_PHASE_2_AIR,
|
||||
FINALBOSS_PHASE_3_FLIGHT,
|
||||
FINALBOSS_PHASE_4_JINJOS,
|
||||
FINALBOSS_PHASE_5_JINJONATOR
|
||||
};
|
||||
|
||||
enum ch_spellbarrier_state_e {
|
||||
SPELLBARRIER_STATE_0_UNKNOWN,
|
||||
SPELLBARRIER_STATE_1_UNKNOWN
|
||||
};
|
||||
|
||||
enum ch_spellfireball_state_e {
|
||||
SPELLFIREBALL_STATE_0_UNKNOWN,
|
||||
SPELLFIREBALL_STATE_1_ACTIVE,
|
||||
SPELLFIREBALL_STATE_2_DESPAWN
|
||||
};
|
||||
|
||||
extern ActorInfo chFightFlightPad;
|
||||
@@ -25,9 +84,175 @@ extern ActorInfo chGreenBlast;
|
||||
extern ActorInfo chJinjonator;
|
||||
extern ActorInfo chBossShadow;
|
||||
|
||||
extern void fight_func_803863F0(void);
|
||||
// fight.c
|
||||
extern void fight_addSpawnableActors(void);
|
||||
|
||||
extern Actor *chBossShadow_draw(ActorMarker *this, Gfx **gdl, Mtx **mptr, Vtx **vptr);
|
||||
// chfinalboss.c
|
||||
extern Actor *chfinalboss_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
extern void chfinalboss_func_80386600(ActorMarker *marker, s32 arg1);
|
||||
extern void chfinalboss_func_80386628(ActorMarker *marker, s32 arg1);
|
||||
extern void chfinalboss_func_80386654(f32 arg0, f32 arg1[4], f32 arg2[4]);
|
||||
extern void chfinalboss_func_80386698(f32 arg0);
|
||||
extern void chfinalboss_createBroomstickParticles(f32 position[3], enum asset_e model_id, s32 count);
|
||||
extern void chfinalboss_createSmokeParticles(f32 position[3], s32 count, f32 scale_ranges[4]);
|
||||
extern void chfinalboss_createGreenGlowParticle(f32 position[3], s32 color[3]);
|
||||
extern void chfinalboss_createSingleSpriteParticle(f32 position[3], enum asset_e sprite_id);
|
||||
extern void chfinalboss_spawnBroomstickGlowParticles(Actor *this);
|
||||
extern void chfinalboss_func_80386B54(f32 *arg0, f32 arg1);
|
||||
extern bool chfinalboss_func_80386BEC(Actor *this, f32 arg1);
|
||||
extern bool chfinalboss_func_80386C68(Actor *this, f32 arg1);
|
||||
extern void chfinalboss_func_80386CF8(Actor *actor);
|
||||
extern void __chfinalboss_dropHealth(ActorMarker *arg0);
|
||||
extern void chfinalboss_despawnFlightPad(void);
|
||||
extern void chfinalboss_spawnFlightPad(s32 arg0);
|
||||
extern void chfinalboss_func_80386EC0(s32 arg0);
|
||||
extern void chfinalboss_func_80386F5C(ActorMarker * arg0, f32 arg1[3], f32 arg2, f32 arg3);
|
||||
extern void chfinalboss_func_80386FD8(s32 arg0);
|
||||
extern void chfinalboss_func_80387074(s32 arg0);
|
||||
extern void chfinalboss_func_80387110(ActorMarker *marker, f32 arg1[3], f32 arg2, s32 arg3);
|
||||
extern void chfinalboss_func_803872F8(Actor *arg0);
|
||||
extern s32 chfinalboss_func_80387340(Actor *this, f32 arg1);
|
||||
extern void chfinalboss_func_803873DC(Actor *actor, f32 arg1, f32 arg2);
|
||||
extern bool chfinalboss_func_80387470(Actor *this, f32 arg1[3], f32 v_max, f32 arg3, f32 arg4, f32 arg5, f32 arg6);
|
||||
extern void chfinalboss_func_8038770C(Actor *actor);
|
||||
extern void chfinalboss_setPhase(ActorMarker *this, enum ch_finalboss_phase_e phase_id);
|
||||
extern void chfinalboss_func_80387ACC(Actor *arg0, f32 arg1);
|
||||
extern void chfinalboss_func_80387B00(Actor *this);
|
||||
extern void chfinalboss_func_80387BFC(Actor *this, f32 arg1);
|
||||
extern void chfinalboss_func_80387D4C(Actor *actor);
|
||||
extern void chfinalboss_func_80387E1C(Actor *this, f32 arg1[3]);
|
||||
extern void chfinalboss_func_80387F70(Actor *actor, f32 *arg1, f32 arg2);
|
||||
extern void chfinalboss_func_803880A0(Actor *actor, f32 arg1);
|
||||
extern void chfinalboss_func_803880E0(ActorMarker *marker, enum asset_e text_id, s32 arg2);
|
||||
extern void chfinalboss_func_80388110(ActorMarker *marker, enum asset_e text_id, s32 arg2);
|
||||
extern void chfinalboss_phase1_setState(Actor *this, s32 next_state);
|
||||
extern void chfinalboss_func_8038856C(Actor *actor, f32 *arg1);
|
||||
extern void chfinalboss_func_803885DC(Actor *this);
|
||||
extern s32 chfinalboss_func_8038871C(Actor *arg0, f32 arg1, f32 arg2);
|
||||
extern void chfinalboss_phase1_update(ActorMarker *marker);
|
||||
extern void chfinalboss_phase2_setState(Actor *this, s32 arg1);
|
||||
extern void chfinalboss_phase2_endTextCallback(ActorMarker *marker, enum asset_e text_id, s32 arg2);
|
||||
extern void chfinalboss_phase2_update(ActorMarker *marker);
|
||||
extern void __chfinalboss_spawnStatue(enum ch_bossjinjo_e statue_id);
|
||||
extern void chfinalboss_spawnStatue(s32 statue_id);
|
||||
extern void __chfinalboss_spawnSpellBarrier(ActorMarker *marker);
|
||||
extern void chfinalboss_spawnSpellBarrier(ActorMarker *arg0);
|
||||
extern void chfinalboss_phase3_endTextCallback(ActorMarker *marker, enum asset_e text_id, s32 arg2);
|
||||
extern void chfinalboss_phase3_setState(Actor *this, s32 arg1);
|
||||
extern void chfinalboss_dropHealth(ActorMarker *marker);
|
||||
extern void chfinalboss_phase3_update(ActorMarker *marker);
|
||||
extern void chfinalboss_func_80389F54(void);
|
||||
extern void chfinalboss_phase4_setState(Actor *this, s32 arg1);
|
||||
extern ActorMarker *chfinalboss_findCollidingJinjo(Actor *this, f32 arg1);
|
||||
extern void chfinalboss_phase4_update(ActorMarker *marker);
|
||||
extern void chfinalboss_func_8038AC50(ActorMarker *arg0);
|
||||
extern void chfinalboss_phase5_setState(Actor *this, s32 next_state);
|
||||
extern void chfinalboss_func_8038AF84(ActorMarker *arg0);
|
||||
extern void chfinalboss_func_8038AFB0(void);
|
||||
extern void chfinalboss_phase5_update(ActorMarker *marker);
|
||||
extern void chfinalboss_phase0_endTextCallback(ActorMarker *marker, enum asset_e text_id, s32 arg2);
|
||||
extern void chfinalboss_func_8038B780(ActorMarker *marker);
|
||||
extern void chfinalboss_phase0_update(ActorMarker *marker);
|
||||
extern bool chfinalboss_func_8038B834(ActorMarker *marker, ActorMarker *other_marker);
|
||||
extern void chfinalboss_collisionPassive(ActorMarker *marker, ActorMarker *other_marker);
|
||||
extern void chfinalboss_collisionActive(ActorMarker *marker, ActorMarker *other_marker);
|
||||
extern void chfinalboss_spawnShadow(ActorMarker *marker);
|
||||
extern void chfinalboss_update(Actor *this);
|
||||
extern void chfinalboss_getPosition(f32 position[3]);
|
||||
extern void chfinalboss_spellBarrierInactive();
|
||||
extern void chfinalboss_func_8038C10C(s32 arg0);
|
||||
extern void chfinalboss_func_8038C138();
|
||||
extern void chfinalboss_setBossDefeated(void);
|
||||
extern void chfinalboss_setJinjoStatueActivated(bool state);
|
||||
extern f32 chfinalboss_getScreamTime();
|
||||
extern s32 chfinalboss_func_8038C298();
|
||||
extern bool chfinalboss_isJinjoSpawned();
|
||||
extern bool chfinalboss_isJinjonatorSpawned();
|
||||
|
||||
// chbossjinfo.c
|
||||
extern void chbossjinjo_createSpriteParticles(f32 position[3], s32 count, enum asset_e sprite_id, f32 scale);
|
||||
extern void chbossjinjo_createNonShrinkingSpriteParticles(f32 position[3], s32 count, enum asset_e sprite_id, f32 scale);
|
||||
extern void chbossjinjo_func_8038C588(void);
|
||||
extern void chbossjinjo_func_8038C5BC(void);
|
||||
extern void chbossjinjo_spawnParticlesAtFinalBoss(Actor *this, enum asset_e sprite1_id, enum asset_e sprite2_id, f32 scale);
|
||||
extern void chbossjinjo_spawnAttackParticles(Actor *this);
|
||||
extern void chbossjinjo_rotateYaw(Actor *this, s16 angle);
|
||||
extern void chbossjinjo_func_8038C79C(Actor *this);
|
||||
extern void chBossJinjo_update(Actor *this);
|
||||
extern void fight_createBlastParticle(f32 position[3], enum asset_e model_id, f32 scale_ratio, f32 fade_in);
|
||||
extern void chBossJinjo_update2(Actor *this);
|
||||
extern void chbossjinjo_attack(ActorMarker *marker);
|
||||
extern f32 chbossjinjo_getWakeUpTime(void);
|
||||
|
||||
// chbossjinjobase.c
|
||||
extern void chbossjinjobase_spawnStoneJinjo(ActorMarker *marker);
|
||||
extern void chBossJinjoBase_createSmokeParticles(f32 position[3], s32 count);
|
||||
extern void chBossJinjoBase_func_8038D3DC(Actor *this, s32 arg1, f32 arg2, f32 arg3, f32 arg4);
|
||||
extern void chBossJinjoBase_getHitByEgg(ActorMarker *this, ActorMarker *other);
|
||||
extern void chBossJinjoBase_free(Actor *this);
|
||||
extern void chBossJinjoBase_update(Actor *this);
|
||||
|
||||
// chstonejinjo.c
|
||||
extern void chstonejinjo_spawnJinjo(ActorMarker *marker);
|
||||
extern void chstonejinjo_update(Actor *this);
|
||||
extern void chstonejinjo_breakOpen(ActorMarker *marker);
|
||||
extern f32 chstonejinjo_getBreakUpTime(void);
|
||||
|
||||
// chjinjonatorbase.c
|
||||
extern void chjinjonatorbase_spawnStoneJinjo(ActorMarker *marker);
|
||||
extern void chjinjonatorbase_createSmokeParticles(f32 position[3], s32 count);
|
||||
extern void chjinjonatorbase_func_8038E0D4(Actor *arg0, s32 arg1, f32 arg2, f32 arg3, f32 arg4);
|
||||
extern void chjinjonatorbase_getHitByEgg(ActorMarker *this, ActorMarker *other);
|
||||
extern void chjinjonatorbase_spawnActivator(ActorMarker *marker);
|
||||
extern void chjinjonatorbase_func_8038E2CC(ActorMarker *marker);
|
||||
extern void chjinjonatorbase_update(Actor *this);
|
||||
|
||||
// chspellbarrier.c
|
||||
extern void chspellbarrier_collisionPassive(ActorMarker *this, ActorMarker *other);
|
||||
extern void chspellbarrier_free(Actor *this);
|
||||
extern void chspellbarrier_update(Actor *this);
|
||||
|
||||
// chspellfireball.c
|
||||
extern void fight_setPositionWithDisplacement(ActorMarker *marker, f32 *position);
|
||||
extern void fight_createSpriteParticles(f32 position[3], s32 count, enum asset_e sprite, f32 position_range[6], f32 acceleration_range[6], f32 velocity_range[6], f32 scale_range[4], f32 lifetime_range[4], f32 fade[2]);
|
||||
extern void fight_createAnimatedSpriteParticles(f32 position[3], enum asset_e sprite, s32 count, s32 staring_frame_range[2], f32 position_range[6], f32 scale_range[4], f32 lifetime_range[4], f32 fade[2]);
|
||||
extern void fight_createSmokeParticles(f32 position[3], s32 count, f32 *lifetime_and_spawn_range);
|
||||
extern void chSpellFireball_func_8038F01C(void);
|
||||
extern void chSpellFireball_func_8038F050(void);
|
||||
extern void chSpellFireball_createExplosionParticles(ActorMarker *marker);
|
||||
extern void chSpellFireball_collisionDie(ActorMarker *marker, ActorMarker *other);
|
||||
extern bool chSpellFireball_isPositionOverThreshold(f32 *position, f32 distance);
|
||||
extern void chSpellFireball_free(Actor *this);
|
||||
extern void chSpellFireball_update(Actor *this);
|
||||
extern void chSpellFireball_func_8038FB84(ActorMarker *marker, f32 *position, f32 *velocity, f32 *arg3);
|
||||
extern void chSpellFireball_resetSpellHits(void);
|
||||
extern void chSpellFireball_setLastSpellFired(bool value);
|
||||
|
||||
// chgreenblast.c
|
||||
extern Actor *chGreenBlast_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
extern void chGreenBlast_func_8038FC88(void);
|
||||
extern void chGreenBlast_func_8038FCBC(void);
|
||||
extern void chGreenBlast_collisionDie(ActorMarker *marker, ActorMarker *other_marker);
|
||||
extern void chGreenBlast_update(Actor *this);
|
||||
extern void chGreenBlast_func_803900DC(ActorMarker *marker, f32 position[3], f32 arg2, f32 arg3);
|
||||
|
||||
// chjinjonator.c
|
||||
extern void chjinjonator_createSpriteParticles(f32 position[3], s32 count, enum asset_e sprite_id);
|
||||
extern void chjinjonator_spawnSparkleParticles(Actor *this);
|
||||
extern void chjinjonator_spawnAttackParticles(Actor *this, s32 hit_id);
|
||||
extern void chjinjonator_803903C4(Actor *this);
|
||||
extern void chjinjonator_8039040C(Actor *this);
|
||||
extern void chjinjonator_update(Actor *this);
|
||||
extern void chjinjonator_attack(ActorMarker *marker, s32 hit_count, bool mirrored);
|
||||
extern void chjinjonator_finalAttack(ActorMarker *marker);
|
||||
extern f32 chjinjonator_80391234(void);
|
||||
extern f32 chjinjonator_80391240(void);
|
||||
extern f32 chjinjonator_80391250(void);
|
||||
extern bool chjinjonator_8039125C(ActorMarker *marker);
|
||||
extern void chjinjonator_8039129C(f32 arg0[3]);
|
||||
|
||||
// chbossshadow.c
|
||||
extern Actor *chBossShadow_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
extern void chBossShadow_update(Actor *this);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user