Merge branch 'zret' of https://github.com/HarbourMasters/mm into zret

This commit is contained in:
RevoSucks 2023-11-04 12:47:18 -04:00
commit 7bcff4c78c
5 changed files with 481 additions and 356 deletions

View File

@ -17,4 +17,4 @@
<File Name="d2_fine_pal_static">
<Texture Name="gClearSkyboxTlue" OutName="clear_tlut" Format="rgba16" Width="16" Height="16" Offset="0x0"/>
</File>
</Root>
</Root>

18
spec
View File

@ -1538,7 +1538,7 @@ beginseg
name "ovl_Obj_Mure2"
compress
include "build/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.o"
include "build/data/ovl_Obj_Mure2/ovl_Obj_Mure2.reloc.o"
include "build/src/overlays/actors/ovl_Obj_Mure2/ovl_Obj_Mure2_reloc.o"
endseg
beginseg
@ -2308,7 +2308,7 @@ beginseg
name "ovl_Boss_05"
compress
include "build/src/overlays/actors/ovl_Boss_05/z_boss_05.o"
include "build/data/ovl_Boss_05/ovl_Boss_05.reloc.o"
include "build/src/overlays/actors/ovl_Boss_05/ovl_Boss_05_reloc.o"
endseg
beginseg
@ -2326,7 +2326,7 @@ beginseg
name "ovl_Boss_07"
compress
include "build/src/overlays/actors/ovl_Boss_07/z_boss_07.o"
include "build/data/ovl_Boss_07/ovl_Boss_07.reloc.o"
include "build/src/overlays/actors/ovl_Boss_07/ovl_Boss_07_reloc.o"
endseg
beginseg
@ -2851,8 +2851,11 @@ beginseg
name "ovl_En_Jso2"
compress
include "build/src/overlays/actors/ovl_En_Jso2/z_en_jso2.o"
//include "build/data/ovl_En_Jso2/ovl_En_Jso2.data.o"
#ifdef NON_MATCHING
include "build/src/overlays/actors/ovl_En_Jso2/ovl_En_Jso2_reloc.o"
#else
include "build/data/ovl_En_Jso2/ovl_En_Jso2.reloc.o"
#endif
endseg
beginseg
@ -3398,7 +3401,11 @@ beginseg
name "ovl_En_Wdhand"
compress
include "build/src/overlays/actors/ovl_En_Wdhand/z_en_wdhand.o"
#ifdef NON_MATCHING
include "build/src/overlays/actors/ovl_En_Wdhand/ovl_En_Wdhand_reloc.o"
#else
include "build/data/ovl_En_Wdhand/ovl_En_Wdhand.reloc.o"
#endif
endseg
beginseg
@ -4714,8 +4721,7 @@ beginseg
name "ovl_En_Bsb"
compress
include "build/src/overlays/actors/ovl_En_Bsb/z_en_bsb.o"
include "build/data/ovl_En_Bsb/ovl_En_Bsb.data.o"
include "build/data/ovl_En_Bsb/ovl_En_Bsb.reloc.o"
include "build/src/overlays/actors//ovl_En_Bsb/ovl_En_Bsb_reloc.o"
endseg
beginseg

View File

@ -6,6 +6,7 @@
#include "z_en_bsb.h"
#include "objects/object_bsb/object_bsb.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#include "z64rumble.h"
#include "z64shrink_window.h"
@ -51,7 +52,7 @@ void func_80C0E1C0(EnBsb* this, PlayState* play);
void func_80C0E480(EnBsb* this, PlayState* play);
void func_80C0E4FC(EnBsb* this, PlayState* play);
s32 func_80C0E9CC(EnBsb* this, PlayState* play);
void func_80C0B290(EnBsb* this, s32 arg0);
void func_80C0B290(EnBsb* this, s32 animIndex);
void func_80C0B31C(PlayState* play, EnBsb* this, Vec3f* pos);
s32 func_80C0B888(EnBsb* this, PlayState* play);
void func_80C0C32C(EnBsb* this);
@ -59,51 +60,106 @@ void func_80C0C430(EnBsb* this);
void func_80C0D00C(EnBsb* this);
void func_80C0E3B8(EnBsb* this);
void func_80C0E618(EnBsb* this, PlayState* play);
void func_80C0F544(EnBsb* this, Vec3f* pos, Vec3f* unk_02, Vec3f* unk3, f32 unk4, s16 unk5);
void func_80C0F544(EnBsb* this, Vec3f* pos, Vec3f* velocity, Vec3f* accel, f32 arg0, s16 arg1);
void func_80C0F640(EnBsb* this, PlayState* play);
void func_80C0F758(EnBsb* this, PlayState* play);
#if 0
// static ColliderJntSphElementInit sJntSphElementsInit[7] = {
static ColliderJntSphElementInit D_80C0F8D4[7] = {
f32 D_80C0F8D0 = 0.0f;
static ColliderJntSphElementInit sJntSphElementsInit[7] = {
{
{ ELEMTYPE_UNK0, { 0x00000000, 0x00, 0x00 }, { 0xF7CFFFFF, 0x00, 0x00 }, TOUCH_NONE | TOUCH_SFX_NORMAL, BUMP_ON, OCELEM_ON, },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0xF7CFFFFF, 0x00, 0x00 },
TOUCH_NONE | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 10, { { 1000, 400, 0 }, 40 }, 100 },
},
{
{ ELEMTYPE_UNK0, { 0xF7CFFFFF, 0x04, 0x08 }, { 0x00000000, 0x00, 0x00 }, TOUCH_ON | TOUCH_SFX_NORMAL, BUMP_ON, OCELEM_ON, },
{
ELEMTYPE_UNK0,
{ 0xF7CFFFFF, 0x04, 0x08 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 9, { { 0, 700, 200 }, 35 }, 100 },
},
{
{ ELEMTYPE_UNK0, { 0x00000000, 0x00, 0x00 }, { 0xF7CFFFFF, 0x00, 0x00 }, TOUCH_NONE | TOUCH_SFX_NORMAL, BUMP_ON, OCELEM_ON, },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0xF7CFFFFF, 0x00, 0x00 },
TOUCH_NONE | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 6, { { 100, 600, 0 }, 35 }, 100 },
},
{
{ ELEMTYPE_UNK0, { 0x00000000, 0x00, 0x00 }, { 0xF7CFFFFF, 0x00, 0x00 }, TOUCH_NONE | TOUCH_SFX_NORMAL, BUMP_ON, OCELEM_NONE, },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0xF7CFFFFF, 0x00, 0x00 },
TOUCH_NONE | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_NONE,
},
{ 3, { { 400, 200, 0 }, 40 }, 100 },
},
{
{ ELEMTYPE_UNK0, { 0x00000000, 0x00, 0x00 }, { 0xF7CFFFFF, 0x00, 0x00 }, TOUCH_NONE | TOUCH_SFX_NORMAL, BUMP_ON, OCELEM_ON, },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0xF7CFFFFF, 0x00, 0x00 },
TOUCH_NONE | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 13, { { 700, -100, 0 }, 35 }, 100 },
},
{
{ ELEMTYPE_UNK0, { 0x00000000, 0x00, 0x00 }, { 0xF7CFFFFF, 0x00, 0x00 }, TOUCH_NONE | TOUCH_SFX_NORMAL, BUMP_ON, OCELEM_ON, },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0xF7CFFFFF, 0x00, 0x00 },
TOUCH_NONE | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 16, { { 200, 300, 0 }, 30 }, 100 },
},
{
{ ELEMTYPE_UNK0, { 0x00000000, 0x00, 0x00 }, { 0xF7CFFFFF, 0x00, 0x00 }, TOUCH_NONE | TOUCH_SFX_NORMAL, BUMP_ON, OCELEM_ON, },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0xF7CFFFFF, 0x00, 0x00 },
TOUCH_NONE | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 19, { { 200, 300, 0 }, 30 }, 100 },
},
};
// static ColliderJntSphInit sJntSphInit = {
static ColliderJntSphInit D_80C0F9D0 = {
{ COLTYPE_HIT6, AT_ON | AT_TYPE_ENEMY, AC_ON | AC_TYPE_PLAYER, OC1_ON | OC1_TYPE_PLAYER, OC2_TYPE_1, COLSHAPE_JNTSPH, },
ARRAY_COUNT(sJntSphElementsInit), D_80C0F8D4, // sJntSphElementsInit,
static ColliderJntSphInit sJntSphInit = {
{
COLTYPE_HIT6,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_PLAYER,
OC2_TYPE_1,
COLSHAPE_JNTSPH,
},
ARRAY_COUNT(sJntSphElementsInit),
sJntSphElementsInit,
};
// static DamageTable sDamageTable = {
static DamageTable D_80C0F9E0 = {
static DamageTable sDamageTable = {
/* Deku Nut */ DMG_ENTRY(0, 0x1),
/* Deku Stick */ DMG_ENTRY(1, 0xD),
/* Horse trample */ DMG_ENTRY(0, 0x0),
@ -150,26 +206,29 @@ ActorInit En_Bsb_InitVars = {
/**/ EnBsb_Draw,
};
#endif
AnimationHeader* D_80C0FA20[] = {
&object_bsb_Anim_0086BC, &object_bsb_Anim_00CD88, &object_bsb_Anim_000400, &object_bsb_Anim_0065D8,
&object_bsb_Anim_000FF0, &object_bsb_Anim_000C50, &object_bsb_Anim_006C48, &object_bsb_Anim_001390,
&object_bsb_Anim_002AF4, &object_bsb_Anim_002590, &object_bsb_Anim_007120, &object_bsb_Anim_0043A4,
&object_bsb_Anim_007B18, &object_bsb_Anim_001CD8, &object_bsb_Anim_003E1C, &object_bsb_Anim_003238,
&object_bsb_Anim_00606C, &object_bsb_Anim_005440, &object_bsb_Anim_004E2C, &object_bsb_Anim_004894,
&object_bsb_Anim_004208, &object_bsb_Anim_00D3CC, &object_bsb_Anim_004510, &object_bsb_Anim_001F90,
&object_bsb_Anim_00C790,
};
extern ColliderJntSphElementInit D_80C0F8D4[7];
extern f32 D_80C0F8D0;
extern ColliderJntSphInit D_80C0F9D0;
extern DamageTable D_80C0F9E0;
extern Vec3f D_80C0FAA0;
extern Vec3f D_80C0FAAC;
extern Vec3s D_80C0FAB8;
extern Vec3s D_80C0FAC0;
u8 D_80C0FA84[] = {
2, 0, 2, 0, 0, 2, 0, 0, 2, 2, 0, 2, 0, 0, 2, 0, 2, 0, 2, 0, 0, 0, 2, 2, 2,
};
extern AnimationHeader D_06000C50[];
extern UNK_TYPE D_06004894;
extern Mtx D_0406AB30;
Vec3f D_80C0FAA0 = { 0.0f, 8.0f, 0.0f };
extern AnimationHeader* D_80C0FA20[];
extern u8 D_80C0FA84[];
Vec3f D_80C0FAAC = { 0.0f, -1.5f, 0.0f };
extern AnimationHeader D_060086BC;
extern SkeletonHeader D_0600C3E0;
Vec3s D_80C0FAB8 = { 0x2EE0, -0x2710, 0xB5C8 };
Vec3s D_80C0FAC0 = { -0x2710, 0x2710, -0x2710 };
Vec3f D_80C0FAC8[] = { { -80.0f, 475.0f, -2330.0f }, { 0.0f, 0.0f, 0.0f } };
void func_80C0B290(EnBsb* this, s32 animIndex) {
this->unk_02D8 = animIndex;
@ -198,7 +257,7 @@ void func_80C0B31C(PlayState* play, EnBsb* this, Vec3f* pos) {
sp9C.z = Rand_CenteredFloat(1.0f) * 0.5f;
spA8.y += (Rand_ZeroOne() - 0.5f) * 15.0f;
EffectSsHahen_Spawn(play, &spCC, &spA8, &sp9C, 0, ((Rand_ZeroOne() * 5.0f) + 10.0f), -1, 0xA, NULL);
EffectSsHahen_Spawn(play, &spCC, &spA8, &sp9C, 0, ((Rand_ZeroOne() * 5.0f) + 10.0f), -1, 10, NULL);
func_800BBFB0(play, &spCC, 20.0f, 1, 300, 10, 5);
if (this->unk_02AE == 0) {
@ -230,20 +289,21 @@ void EnBsb_Init(Actor* thisx, PlayState* play) {
Actor_SetScale(&this->actor, 0.04f);
this->unk_02CA = 0xFF;
this->actor.colChkInfo.mass = 0xFF;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
if (this->actor.params & 0x8000) {
SkelAnime_Init(play, &this->skelAnime, &D_0600C3E0, (AnimationHeader*)&D_06004894, this->unk_0188,
this->unk_0206, 0x15);
SkelAnime_Init(play, &this->skelAnime, &object_bsb_Skel_00C3E0, &object_bsb_Anim_004894, this->unk_0188,
this->unk_0206, 21);
this->unk_02B0 = this->actor.params & 0xFF;
func_80C0E3B8(this);
return;
}
this->actor.colChkInfo.damageTable = &D_80C0F9E0;
this->actor.colChkInfo.damageTable = &sDamageTable;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 0.0f);
SkelAnime_Init(play, &this->skelAnime, &D_0600C3E0, &D_060086BC, this->unk_0188, this->unk_0206, 0x15);
SkelAnime_Init(play, &this->skelAnime, &object_bsb_Skel_00C3E0, &object_bsb_Anim_0086BC, this->unk_0188,
this->unk_0206, 21);
this->unk_02B6 = (this->actor.params >> 7) & 0x1F;
this->unk_02B8 = this->actor.params & 0x7F;
@ -252,7 +312,7 @@ void EnBsb_Init(Actor* thisx, PlayState* play) {
this->actor.hintId = 0x21;
this->actor.gravity = -2.0f;
Collider_InitAndSetJntSph(play, &this->unk_0F34, &this->actor, &D_80C0F9D0, this->unk_0F54);
Collider_InitAndSetJntSph(play, &this->unk_0F34, &this->actor, &sJntSphInit, this->unk_0F54);
if (this->unk_02B6 == 0x1F) {
Actor_Kill(&this->actor);
@ -439,9 +499,10 @@ void func_80C0BFE8(EnBsb* this, PlayState* play) {
} else {
this->unk_0290 = 0;
}
if ((play->msgCtx.ocarinaMode == 3) && (play->msgCtx.lastPlayedSong == 0)) {
play->msgCtx.ocarinaMode = 4;
func_800BC154(play, &play->actorCtx, &this->actor, 9U);
func_800BC154(play, &play->actorCtx, &this->actor, 9);
func_80C0C0F4(this, play);
}
}
@ -642,7 +703,7 @@ void func_80C0C6A8(EnBsb* this, PlayState* play) {
}
if (this->unk_02D8 == 3) {
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 0x7D0, 0);
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 2000, 0);
if ((Animation_OnFrame(&this->skelAnime, 7.0f) != 0) || (Animation_OnFrame(&this->skelAnime, 15.0f) != 0)) {
Actor_PlaySfx(&this->actor, NA_SE_EN_KTIA_PAUSE_K);
}
@ -661,7 +722,7 @@ void func_80C0C86C(EnBsb* this) {
this->unk_02DC = 1;
this->actor.speed = 2.0f;
func_80C0B290(this, 4);
this->unk_0294 = Rand_S16Offset(0, 0x1E);
this->unk_0294 = Rand_S16Offset(0, 30);
WEEKEVENTREG(0x55) |= 0x40;
this->unk_02B4 = 4;
this->actionFunc = func_80C0C8EC;
@ -724,7 +785,7 @@ void func_80C0CB3C(EnBsb* this, PlayState* play) {
if ((fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < 40.0f) && (this->actor.xzDistToPlayer < 70.0f) &&
(player->invincibilityTimer == 0)) {
func_800B8D50(play, &this->actor, 2.0f, this->actor.yawTowardsPlayer, 5.0f, 0x10U);
func_800B8D50(play, &this->actor, 2.0f, this->actor.yawTowardsPlayer, 5.0f, 16);
}
if (this->actor.bgCheckFlags & 1) {
@ -737,7 +798,7 @@ void func_80C0CB3C(EnBsb* this, PlayState* play) {
}
void func_80C0CCCC(EnBsb* this) {
func_80C0B290(this, 0x17);
func_80C0B290(this, 23);
this->actionFunc = func_80C0CD04;
}
@ -747,9 +808,9 @@ void func_80C0CD04(EnBsb* this, PlayState* play) {
if ((this->unk_02D8 == 0x18) && (var_0 >= this->unk_02C4)) {
this->actor.flags &= 0xF7FFFFFF;
this->actor.gravity = -2.0f;
this->unk_0294 = 0xA;
this->unk_0294 = 10;
func_80C0C86C(this);
} else if (this->unk_02D8 == 0x17) {
} else if (this->unk_02D8 == 23) {
func_80C0B290(this, 0x18);
}
}
@ -803,7 +864,7 @@ void func_80C0CDE4(EnBsb* this, PlayState* play) {
void func_80C0CF4C(EnBsb* this) {
this->actor.speed = 0.0f;
this->unk_02A4 = 0;
Animation_Change(&this->skelAnime, &D_06000C50[0], -1.0f, this->skelAnime.curFrame - 1.0f, 0.0f, 2, 0.0f);
Animation_Change(&this->skelAnime, &object_bsb_Anim_000C50, -1.0f, this->skelAnime.curFrame - 1.0f, 0.0f, 2, 0.0f);
this->unk_0294 = 0xA;
Actor_PlaySfx(&this->actor, NA_SE_EN_KTIA_PAUSE_K);
this->unk_02B4 = 7;
@ -843,7 +904,7 @@ void func_80C0D00C(EnBsb* this) {
void func_80C0D10C(EnBsb* this, PlayState* play) {
f32 curFrame = this->skelAnime.curFrame;
if (((this->unk_0324 == 0xB) || (this->unk_0324 == 0xA)) && (this->unk_0322 != 0)) {
if (((this->unk_0324 == 11) || (this->unk_0324 == 10)) && (this->unk_0322 != 0)) {
Actor_SpawnIceEffects(play, &this->actor, this->unk_0330, 0x11, 2, this->unk_032C, 0.4f);
this->unk_0322 = 0;
this->unk_0324 = 0;
@ -853,7 +914,7 @@ void func_80C0D10C(EnBsb* this, PlayState* play) {
func_80C0B31C(play, this, &this->unk_02F8);
if (this->unk_02C4 <= curFrame) {
if ((this->actor.world.pos.z > -1300.0f) || ((s32)this->actor.colChkInfo.health < 0xA)) {
if ((this->actor.world.pos.z > -1300.0f) || (this->actor.colChkInfo.health < 10)) {
func_80C0CA28(this, play);
return;
}
@ -862,11 +923,11 @@ void func_80C0D10C(EnBsb* this, PlayState* play) {
}
void func_80C0D214(EnBsb* this) {
this->unk_0294 = 0x28;
this->unk_0294 = 40;
this->actor.speed = 0.0f;
Actor_SetColorFilter(&this->actor, 0, 120, 0, 40);
Actor_PlaySfx(&this->actor, NA_SE_EN_COMMON_FREEZE);
this->unk_02B4 = 0xA;
this->unk_02B4 = 10;
this->actionFunc = func_80C0D27C;
}
@ -878,7 +939,7 @@ void func_80C0D27C(EnBsb* this, PlayState* play) {
}
if (((this->unk_0324 == 0xB) || (this->unk_0324 == 0xA)) && (this->unk_0322 != 0)) {
Actor_SpawnIceEffects(play, &this->actor, this->unk_0330, 0x11, 2, this->unk_032C, 0.4f);
Actor_SpawnIceEffects(play, &this->actor, this->unk_0330, 17, 2, this->unk_032C, 0.4f);
this->unk_0322 = 0;
this->unk_0324 = 0;
}
@ -892,39 +953,36 @@ void func_80C0D334(EnBsb* this) {
this->actor.speed = 0.0f;
Actor_PlaySfx(&this->actor, NA_SE_EN_KITA_LAUGH_K);
func_80C0B290(this, 6);
this->unk_02B4 = 0xB;
this->unk_02B4 = 11;
this->actionFunc = func_80C0D384;
}
void func_80C0D384(EnBsb* this, PlayState* play) {
f32 var_v0 = this->skelAnime.curFrame;
f32 curFrame = this->skelAnime.curFrame;
if (this->unk_02C4 <= var_v0) {
if (this->unk_02C4 <= curFrame) {
func_80C0C86C(this);
}
}
void func_80C0D3C0(EnBsb* this, PlayState* play) {
Player* player = GET_PLAYER(play);
void* sp2C;
Audio_RestorePrevBgm();
this->unk_02A4 = 0;
this->unk_02A8 = 0;
this->unk_02AC = 0x4000;
this->actor.speed = 0.0f;
player->actor.world.rot.y = player->actor.shape.rot.y = this->actor.yawTowardsPlayer + 0x8000;
this->unk_1128.x = this->unk_1140.x = (Math_SinS(this->actor.yawTowardsPlayer) * 300.0f) + this->unk_02E0.x;
this->unk_1128.y = this->unk_1140.y = this->unk_02E0.y - 30.0f;
this->unk_1128.z = this->unk_1140.z = (Math_CosS(this->actor.yawTowardsPlayer) * 300.0f) + this->unk_02E0.z;
this->unk_1134.x = this->unk_114C.x = (Math_SinS(this->actor.yawTowardsPlayer) * 10.0f) + this->unk_02E0.x;
this->unk_1134.y = this->unk_114C.y = this->unk_02E0.y - 10.0f;
this->unk_1134.z = this->unk_114C.z = Math_CosS(this->actor.yawTowardsPlayer) * 10.0f + this->unk_02E0.z;
this->unk_1124 = 60.0f;
@ -1032,7 +1090,7 @@ void func_80C0D9B4(EnBsb* this, PlayState* play) {
}
void func_80C0DA58(EnBsb* this) {
this->unk_1118 = (this->unk_111C = 0);
this->unk_1118 = this->unk_111C = 0;
this->actor.speed = 0.0f;
this->unk_1120 = 0.0f;
this->unk_02A4 = 0;
@ -1099,7 +1157,7 @@ void func_80C0DB18(EnBsb* this, PlayState* play) {
switch (this->unk_1118) {
case 0:
Math_SmoothStepToS(&this->actor.world.rot.y, Math_Vec3f_Yaw(&this->actor.world.pos, &sp64), 1, 0x7D0, 0);
Math_SmoothStepToS(&this->actor.world.rot.y, Math_Vec3f_Yaw(&this->actor.world.pos, &sp64), 1, 2000, 0);
Math_ApproachF(&this->actor.world.pos.x, sp64.x, 0.5f, fabsf(Math_SinS(this->actor.world.rot.y) * 3.2f));
Math_ApproachF(&this->actor.world.pos.z, sp64.z, 0.5f, fabsf(Math_CosS(this->actor.world.rot.y) * 3.2f));
if (sqrtf(SQ(this->actor.world.pos.x - sp64.x) + SQ(this->actor.world.pos.z - sp64.z)) < 3.0f) {
@ -1114,7 +1172,7 @@ void func_80C0DB18(EnBsb* this, PlayState* play) {
case 1:
if ((Animation_OnFrame(&this->skelAnime, 7.0f) != 0) || (Animation_OnFrame(&this->skelAnime, 15.0f) != 0)) {
Actor_PlaySfx(&this->actor, 0x3AA3);
Actor_PlaySfx(&this->actor, NA_SE_EN_KTIA_PAUSE_K);
}
Math_SmoothStepToS(&this->actor.world.rot.y, Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk_02EC), 1,
@ -1132,11 +1190,11 @@ void func_80C0DB18(EnBsb* this, PlayState* play) {
case 2:
sp52 = Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk_1128);
Math_SmoothStepToS(&this->actor.world.rot.y, sp52, 1, 0x7D0, 0);
Math_SmoothStepToS(&this->actor.world.rot.y, sp52, 1, 2000, 0);
if (ABS_ALT((s16)(this->actor.world.rot.y - sp52)) < 0x100) {
Actor_PlaySfx(&this->actor, 0x3AA4);
func_80C0B290(this, 0x15);
Actor_PlaySfx(&this->actor, NA_SE_EN_KITA_LAUGH_K);
func_80C0B290(this, 21);
this->unk_1118++;
Message_StartTextbox(play, 0x1541, &this->actor);
}
@ -1153,13 +1211,13 @@ void func_80C0DB18(EnBsb* this, PlayState* play) {
case 4:
sp64.x = -100.0f;
sp52 = Math_Vec3f_Yaw(&this->actor.world.pos, &sp64);
Math_SmoothStepToS(&this->actor.world.rot.y, sp52, 1, 0x7D0, 0);
Math_SmoothStepToS(&this->actor.world.rot.y, sp52, 1, 2000, 0);
if (ABS_ALT((s16)(this->actor.world.rot.y - sp52)) < 0x100) {
Actor_PlaySfx(&this->actor, 0x386CU);
Actor_PlaySfx(&this->actor, NA_SE_EN_TEKU_JUMP);
this->actor.velocity.y = 20.0f;
this->actor.speed = 3.0f;
func_80C0B290(this, 0xB);
func_80C0B290(this, 11);
this->unk_1118++;
}
break;
@ -1167,10 +1225,10 @@ void func_80C0DB18(EnBsb* this, PlayState* play) {
case 5:
if (this->actor.world.pos.y < (this->actor.home.pos.y + 30.0f)) {
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos,
this->actor.shape.shadowScale - 20.0f, 0x14, 8.0f, 0x3E8, 0x64, 1);
this->actor.shape.shadowScale - 20.0f, 0x14, 8.0f, 1000, 100, 1);
this->actor.speed = 0.0f;
Actor_PlaySfx(&this->actor, 0x380DU);
Actor_RequestQuakeAndRumble(&this->actor, play, 4, 0xA);
Actor_PlaySfx(&this->actor, NA_SE_EN_GOMA_DOWN);
Actor_RequestQuakeAndRumble(&this->actor, play, 4, 10);
this->unk_1118++;
}
break;
@ -1183,7 +1241,7 @@ void func_80C0DB18(EnBsb* this, PlayState* play) {
sp64.x += Rand_CenteredFloat(40.0f);
sp64.z += Rand_CenteredFloat(40.0f);
Actor_SpawnFloorDustRing(play, &this->actor, &sp64, Rand_ZeroFloat(10.0f) + 5.0f, Rand_S16Offset(1, 3),
4.0f, 0x3E8, 0x64, 1);
4.0f, 1000, 100, 1);
}
Math_ApproachF(&this->actor.shape.yOffset, -7000.0f, 0.5f, 200.0f);
@ -1201,20 +1259,19 @@ void func_80C0E178(EnBsb* this) {
this->unk_02AE = 0;
this->unk_02A4 = 0;
this->actor.flags &= ~1;
this->unk_02B4 = 0xE;
this->unk_02B4 = 14;
this->actionFunc = func_80C0E1C0;
this->actor.speed = 0.0f;
}
void func_80C0E1C0(EnBsb* this, PlayState* play) {
EnBsb* newActor;
f32 curFrame = this->skelAnime.curFrame;
s32 i;
f32 curFrame = this->skelAnime.curFrame;
if (this->unk_02D8 == 16) {
if (Animation_OnFrame(&this->skelAnime, 30.0f) != 0) {
Actor_PlaySfx(&this->actor, NA_SE_EN_KITA_SALUTE);
} else if ((curFrame < 30.0f) && (((play->csCtx.curFrame == 472)) || (play->csCtx.curFrame == 487))) {
} else if ((curFrame < 30.0f) && ((play->csCtx.curFrame == 472) || (play->csCtx.curFrame == 487))) {
Actor_PlaySfx(&this->actor, NA_SE_EN_KTIA_WALK);
}
}
@ -1225,6 +1282,7 @@ void func_80C0E1C0(EnBsb* this, PlayState* play) {
if (this->unk_02A4 == 0) {
if (WEEKEVENTREG(0x17) & 4) {
EnBsb* newActor;
//! FAKE:
if (1) {}
@ -1265,11 +1323,11 @@ void func_80C0E3B8(EnBsb* this) {
this->actor.flags |= 0x08000000;
this->actor.flags &= ~1;
Animation_Change(&this->skelAnime, &object_bsb_Anim_004894, 1.0f, D_80C0F8D0, Animation_GetLastFrame(&D_06004894),
2, 0.0f);
Animation_Change(&this->skelAnime, &object_bsb_Anim_004894, 1.0f, D_80C0F8D0,
Animation_GetLastFrame(&object_bsb_Anim_004894), 2, 0.0f);
SkelAnime_Update(&this->skelAnime);
this->unk_02B4 = 0xF;
this->unk_02B4 = 15;
this->actionFunc = func_80C0E480;
}
@ -1492,8 +1550,10 @@ void EnBsb_Update(Actor* thisx, PlayState* play) {
(this->unk_02B0 == 0)) {
SkelAnime_Update(&this->skelAnime);
}
this->actionFunc(this, play);
Actor_MoveWithGravity(&this->actor);
if (this->unk_02B0 == 0) {
func_80C0E618(this, play);
if ((func_80C0E9CC(this, play) == 0) && (this->unk_02B4 != 0xE)) {
@ -1522,8 +1582,10 @@ void EnBsb_Update(Actor* thisx, PlayState* play) {
func_80C0B290(this, 0x13);
}
}
Actor_UpdateBgCheckInfo(play, &this->actor, 30.0f, 60.0f, 40.0f, 0x1DU);
Actor_UpdateBgCheckInfo(play, &this->actor, 30.0f, 60.0f, 40.0f, 0x1D);
func_80C0F640(this, play);
if (func_80C0E9CC(this, play) == 0) {
if ((this->unk_02B4 != 9) && (this->unk_02B4 != 0xE) && (this->unk_02B4 != 0xF)) {
CollisionCheck_SetAC(play, &play->colChkCtx, &this->unk_0F34.base);
@ -1660,7 +1722,7 @@ void EnBsb_Draw(Actor* thisx, PlayState* play) {
this->unk_032C = 0.8f;
}
Actor_DrawDamageEffects(play, &this->actor, this->unk_0330, 0x11, this->unk_0328, this->unk_032C, sp3C,
Actor_DrawDamageEffects(play, &this->actor, this->unk_0330, 17, this->unk_0328, this->unk_032C, sp3C,
this->unk_0324);
}
} else {
@ -1668,7 +1730,7 @@ void EnBsb_Draw(Actor* thisx, PlayState* play) {
Scene_SetRenderModeXlu(play, 1, 2);
gDPPipeSync(POLY_XLU_DISP++);
gDPSetEnvColor(POLY_XLU_DISP++, 0xFF, 0xFF, 0xFF, this->unk_02CA);
gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 255, this->unk_02CA);
POLY_XLU_DISP = SkelAnime_Draw(play, this->skelAnime.skeleton, this->skelAnime.jointTable, func_80C0F078, NULL,
&this->actor, POLY_XLU_DISP++);
@ -1743,7 +1805,7 @@ void func_80C0F758(EnBsb* this, PlayState* play) {
gDPSetEnvColor(POLY_OPA_DISP++, 255, 255, 255, 255);
gSPDisplayList(POLY_OPA_DISP++, &D_0406AB30);
gSPDisplayList(POLY_OPA_DISP++, gameplay_keep_DL_06AB30);
Matrix_Pop();
}

View File

@ -62,7 +62,7 @@ typedef struct EnBsb {
/* 0x0330 */ Vec3f unk_0330[17];
/* 0x03FC */ s32 unk_03FC[17];
/* 0x0440 */ s16 unk_0440;
/* 0x0444 */ EnBsbUnkStruct unk_0444[0x32];
/* 0x0444 */ EnBsbUnkStruct unk_0444[50];
/* 0x0F34 */ ColliderJntSph unk_0F34;
/* 0x0F54 */ ColliderJntSphElement unk_0F54[7];
/* 0x1114 */ u32 unk_1114;

View File

@ -17,7 +17,7 @@
void EnJso2_Init(Actor* thisx, PlayState* play);
void EnJso2_Destroy(Actor* thisx, PlayState* play);
void EnJso2_Update(Actor* thisx, PlayState* play);
void EnJso2_Draw(Actor* thisx, PlayState* play);
void EnJso2_Draw(Actor* thisx, PlayState* play2);
void func_80A776E0(EnJso2* this, s32 animIndex);
void func_80A778D8(EnJso2* this);
@ -176,18 +176,21 @@ static AnimationHeader* D_80A7B684[0x16] = {
&gGaroTrembleAnim, &gGaroTakeOutBombAnim,
};
static u8 D_80A7B6DC[] = { 2, 2, 0, 2, 0, 2, 0, 0, 0, 2, 2, 0, 0, 2, 0, 2, 2, 0, 2, 2, 0, 2, 0, 0 };
static u8 D_80A7B6DC[] = { 2, 2, 0, 2, 0, 2, 0, 0, 0, 2, 2, 0, 0, 2, 0, 2, 2, 0, 2, 2, 0, 2 };
static Vec3s D_80A7B6F4 = { 350, -20, -3430 };
static Vec3f D_80A7B6FC = { 0.0f, 0.0f, 0.0f };
static Vec3f D_80A7B708 = { 1600.0f, 0.0f, 0.0f };
static Vec3f D_80A7B714 = { 0.0f, 0.0f, 0.0f };
static Vec3f D_80A7B720 = { 1700.0f, 0.0f, 0.0f };
static Vec3f D_80A7B72C = { 0.0f, 0.0f, 0.0f };
static s16 D_80A7B738[] = { 128, 0, 0, 0, 0, 128, 0, 0, 0, 0, 128, 0, 0, 0, 0, 128, 0, 0, 0, 0 };
static s16 D_80A7B738[] = { 128, 0, 0, 0, 0, 128, 0, 0, 0, 0, 128, 0, 0, 0, 0, 128 };
#ifdef NON_MATCHING
void EnJso2_Init(Actor* thisx, PlayState* play) {
@ -329,254 +332,304 @@ void func_80A778D8(EnJso2* this) {
this->unk36C = 2;
this->actionFunc = func_80A778F8;
}
//#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Jso2/func_80A778F8.s")
extern Vec3s D_80A7B6F4;
#if 1
void func_80A778F8(EnJso2* this, PlayState* play) {
s32 i;
f32 curFrame;
Vec3f spawnPos;
Player* player;
player = GET_PLAYER(play);
curFrame = this->skelAnime.curFrame;
void func_80A778F8(EnJso2* this, PlayState* play) {
Player* player = GET_PLAYER(play);
f32 curFrame = this->skelAnime.curFrame;
Vec3f spawnPos;
s32 i;
switch (this->unk1046) {
case 0:
if (this->actor.xzDistToPlayer < 400.0f) {
Audio_SetMainBgmVolume(0U, 0xAU);
this->unk1046 += 1;
this->actor.gravity = 0.0f;
}
break;
case 1:
if (CutsceneManager_IsNext((s16) this->actor.csId) == 0) {
CutsceneManager_Queue((s16) this->actor.csId);
} else {
f32 temp;
CutsceneManager_StartWithPlayerCs((s16) this->actor.csId, &this->actor);
this->unk1048 = CutsceneManager_GetCurrentSubCamId((s16) this->actor.csId);
this->unk294 = 0.4f;
this->unk298 = 40.0f;
player->actor.world.pos.x = 420.0f;
player->actor.world.pos.z = -3430.0f;
this->actor.draw = EnJso2_Draw;
func_80A776E0(this, 0x11);
spawnPos.x = D_80A7B6F4.x;
spawnPos.y = D_80A7B6F4.y;
spawnPos.z = D_80A7B6F4.z;
this->actor.world.rot.y = Math_Vec3f_Yaw(&this->actor.world.pos, &spawnPos);
this->unk1050 = 60.0f;
this->unk104C = 60.0f;
case 0:
if (this->actor.xzDistToPlayer < 400.0f) {
Audio_SetMainBgmVolume(0, 10);
this->unk1046++;
this->actor.gravity = 0.0f;
}
break;
case 1:
if (CutsceneManager_IsNext(this->actor.csId) == 0) {
CutsceneManager_Queue(this->actor.csId);
} else {
f32 temp;
CutsceneManager_StartWithPlayerCs(this->actor.csId, &this->actor);
this->unk1048 = CutsceneManager_GetCurrentSubCamId(this->actor.csId);
this->unk294 = 0.4f;
this->unk298 = 40.0f;
player->actor.world.pos.x = 420.0f;
player->actor.world.pos.z = -3430.0f;
this->actor.draw = EnJso2_Draw;
func_80A776E0(this, 17);
spawnPos.x = D_80A7B6F4.x;
spawnPos.y = D_80A7B6F4.y;
spawnPos.z = D_80A7B6F4.z;
this->actor.world.rot.y = Math_Vec3f_Yaw(&this->actor.world.pos, &spawnPos);
this->unk1050 = 60.0f;
this->unk104C = 60.0f;
this->actor.world.pos.x = -285.0f;
this->actor.world.pos.y = 535.0f;
this->actor.world.pos.z = -3425.0f;
this->unk1078.x = 82.0f;
this->unk1078.z = 780.0f;
temp = -586.0f;
this->unk1084.y = this->unk1078.y = temp + 500.0f;
Math_Vec3f_Copy(&spawnPos, &this->unk1078);
OLib_Vec3fAdd(&this->actor.world, &spawnPos, &this->unk1078, 1);
this->unk1084.x = this->actor.world.pos.x - 90.0f;
this->unk1084.z = this->actor.world.pos.z + 100.0f;
Math_Vec3f_Copy(&this->unk1054, &this->unk1078);
Math_Vec3f_Copy(&this->unk1060, &this->unk1084);
func_800B7298(play, &this->actor, 6);
func_80122744(play, &this->unk_27C, 1, &D_80A7B6F4);
this->unk1046++;
break;
}
break;
case 2:
this->actor.world.pos.x = -285.0f;
this->actor.world.pos.y = 535.0f;
this->actor.world.pos.z = -3425.0f;
this->unk1078.x = 82.0f;
this->unk1078.z = 780.0f;
temp = -586.0f;
this->unk1084.y = this->unk1078.y = temp + 500.0f;Math_Vec3f_Copy(&spawnPos, &this->unk1078);
this->unk1078.y = -516.0f;
this->unk1078.z = 800.0f;
Math_Vec3f_Copy(&spawnPos, &this->unk1078);
OLib_Vec3fAdd(&this->actor.world, &spawnPos, &this->unk1078, 1);
this->unk1084.x = this->actor.world.pos.x - 90.0f;
this->unk1084.y = this->actor.world.pos.y - 591.0f;
this->unk1084.z = this->actor.world.pos.z + 100.0f;
Math_Vec3f_Copy(&this->unk1054, &this->unk1078);
Math_Vec3f_Copy(&this->unk1060, &this->unk1084);
func_800B7298(play, &this->actor, 6U);
func_80122744(play, &this->unk_27C, 1U, &D_80A7B6F4);
this->unk1046 += 1;
break;
}
break;
case 2:
this->actor.world.pos.x = -285.0f;
this->actor.world.pos.y = 535.0f;
this->actor.world.pos.z = -3425.0f;
this->unk1078.x = 82.0f;
this->unk1078.y = -516.0f;
this->unk1078.z = 800.0f;
Math_Vec3f_Copy(&spawnPos, &this->unk1078);
OLib_Vec3fAdd(&this->actor.world, &spawnPos, &this->unk1078, 1);
this->unk1084.x = this->actor.world.pos.x - 90.0f;
this->unk1084.y = this->actor.world.pos.y - 591.0f;
this->unk1084.z = this->actor.world.pos.z + 100.0f;
Math_Vec3f_Copy(&this->unk1054, &this->unk1078);
Math_Vec3f_Copy(&this->unk1060, &this->unk1084);
if (func_80122760(play, &this->unk_27C, 60.0f) != 0) {
func_800B7298(play, NULL, 0x13U);
this->unk1044 = 0xA;
this->unk1046 += 1;
}
break;
case 3: {
Vec3f unk1078Copy;
s32 i = 0;
if (this->unk1044 == 1) {
for (i = 0; i < 2; i++) {
Math_Vec3f_Copy(&unk1078Copy, &this->actor.home.pos);
unk1078Copy.x += Rand_CenteredFloat(80.0f);
unk1078Copy.y = this->actor.world.pos.y + (i * 120.0f);
unk1078Copy.z += Rand_CenteredFloat(80.0f);
Actor_Spawn(&play->actorCtx, play, 0x1D9, unk1078Copy.x, unk1078Copy.y, unk1078Copy.z, 0, this->actor.world.rot.y, 0, 2);
if (func_80122760(play, &this->unk_27C, 60.0f) != 0) {
func_800B7298(play, NULL, 19);
this->unk1044 = 10;
this->unk1046++;
}
this->unk1044 = 0x19;
this->unk1046 += 1;
}
}
break;
case 4:
if (this->unk1044 == 0) {
func_800B7298(play, NULL, 4U);
this->unk1044 = 0x14;
this->unk1046 += 1;
}
break;
case 5:
if (this->unk1044 == 0) {
this->unk1044 = 0x14;
this->unk1046++;
}
break;
case 6:
this->unk1078.x = 82.0f;
this->unk1078.y = -533.0f;
this->unk1078.z = 800.0f;
Math_Vec3f_Copy(&spawnPos, &this->unk1078); // Try new variable and scoping
OLib_Vec3fAdd(&this->actor.world, &spawnPos, &this->unk1078, 1);
this->unk1084.x = this->actor.focus.pos.x - 80.0f;
this->unk1084.y = this->actor.focus.pos.y - 360.0f;
this->unk1084.z = this->actor.focus.pos.z + 100.0f;
if (this->unk1044 == 0) {
this->unk1044 = 5;
this->unk1046 += 1;
}
break;
case 7:
if (this->unk1044 == 0) {
Actor_PlaySfx(&this->actor, 0x3AC6U);
this->unk1044 = 0x2D;
this->unk1046 += 1;
}
break;
case 8:
if (this->unk1044 == 0) {
this->actor.speed = 3.0f;
this->actor.velocity.y = 10.0f;
this->actor.gravity = -1.0f;
func_80A776E0(this, 0x10);
this->unk294 = 0.4f;
this->unk298 = 40.0f;
Actor_PlaySfx(&this->actor, 0x38EEU);
Math_Vec3f_Copy(&this->unk_2B8, &this->unk1054);
this->unk1044 = 0x19;
this->unk1046 += 1;
}
break;
case 9:{
//s32 i2;
this->unk_38C += 1;
if (this->unk_38C >= 0x14) {
this->unk_38C = 0;
}
if (this->unk_388 < 0x13) {
this->unk_388++;
}
Math_Vec3f_Copy(&this->unk_390[this->unk_38C], &this->actor.world.pos);
Math_Vec3s_Copy(&this->unk_480[this->unk_38C], &this->actor.world.rot);
this->unk_390[this->unk_38C].y += 40.0f;
for (i = 0; i < 20; i++) {
this->unk_4F8[this->unk_38C][i] = this->jointTable[i];
}
Math_ApproachF(&this->actor.shape.shadowScale, 17.0f, 0.4f, 4.0f);
if (this->unk1044 == 0) {
this->unk1078.x = this->unk_2B8.x - 490.0f;
this->unk1078.y = this->unk_2B8.y;
this->unk1078.z = this->unk_2B8.z + 100.0f;
}
this->unk1084.x = this->actor.focus.pos.x - 80.0f;
this->unk1084.y = this->actor.focus.pos.y - 130.0f;
this->unk1084.z = this->actor.focus.pos.z;
if (this->actor.bgCheckFlags & 1) {
Actor_PlaySfx(&this->actor, 0x3AD9U);
this->actor.gravity = 0.0f;
this->actor.velocity.y = 0.0f;
this->actor.speed = 0.0f;
func_80A776E0(this, 0xF);
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale, 0xA, 4.0f, (s16) 0x1F4, (s16) 0x32, (u8) 1);
this->unk1044 = 1;
Actor_PlaySfx(&this->actor, 0x387BU);
this->unk1046++;
}
}
break;
case 10:
this->unk_38C++;
if (this->unk_38C >= 0x14) {
this->unk_38C = 0;
}
if (this->unk_388 < 0x13) {
this->unk_388++;
}
Math_Vec3f_Copy(&this->unk_390[this->unk_38C], &this->actor.world.pos);
Math_Vec3s_Copy(&this->unk_480[this->unk_38C], &this->actor.world.rot);
this->unk_390[this->unk_38C].y += 40.0f;
for (i = 0; i < 20; i++) {
this->unk_4F8[this->unk_38C][i] = this->jointTable[i];
}
if (this->unk1044 == 0) {
this->unk1078.x = this->unk_2B8.x - 518.0f;
this->unk1078.y = this->unk_2B8.y - 11.0f;
this->unk1078.z = this->unk_2B8.z + 100.0f;
}
this->unk1084.x = this->actor.focus.pos.x + 20.0f;
this->unk1084.y = this->actor.focus.pos.y - 50.0f;
this->unk1084.z = this->actor.focus.pos.z;
if (this->unk374 <= curFrame) {
this->unk_388 = 0;
this->unk_38C = 0;
this->unk1044 = 0x14;
func_80A776E0(this, 0x12);
this->unk1046++;
}
break;
case 11:
if (Animation_OnFrame(&this->skelAnime, 17.0f) != 0) {
Actor_PlaySfx(&this->actor, 0x39C7U);
Actor_PlaySfx(&this->actor, 0x2822U);
this->unk36C = 0;
Audio_SetMainBgmVolume(0x7FU, 0U);
Audio_PlayBgm_StorePrevBgm(0x38U);
}
if (this->unk1044 == 0) {
//s32 i;
this->unk1078.x = this->unk_2B8.x - 470.0f;
this->unk1078.y = this->unk_2B8.y - 10.0f;
this->unk1078.z = this->unk_2B8.z + 100.0f;
break;
case 3: {
Vec3f unk1078Copy;
s32 i;
if (this->unk1044 == 1) {
for (i = 0; i < 2; i++) {
Math_Vec3f_Copy(&unk1078Copy, &this->actor.home.pos);
unk1078Copy.x += Rand_CenteredFloat(80.0f);
unk1078Copy.y = this->actor.world.pos.y + (i * 120.0f);
unk1078Copy.z += Rand_CenteredFloat(80.0f);
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_COL_MAN, unk1078Copy.x, unk1078Copy.y, unk1078Copy.z, 0,
this->actor.world.rot.y, 0, 2);
}
this->unk1044 = 25;
this->unk1046++;
}
} break;
case 4:
if (this->unk1044 == 0) {
func_800B7298(play, NULL, 4);
this->unk1044 = 20;
this->unk1046++;
}
break;
case 5:
if (this->unk1044 == 0) {
this->unk1044 = 20;
this->unk1046++;
}
break;
case 6:
this->unk1078.x = 82.0f;
this->unk1078.y = -533.0f;
this->unk1078.z = 800.0f;
Math_Vec3f_Copy(&spawnPos, &this->unk1078);
OLib_Vec3fAdd(&this->actor.world, &spawnPos, &this->unk1078, 1);
this->unk1084.x = this->actor.focus.pos.x - 80.0f;
this->unk1084.y = this->actor.focus.pos.y - 30.0f;
this->unk1084.y = this->actor.focus.pos.y - 360.0f;
this->unk1084.z = this->actor.focus.pos.z + 100.0f;
if (this->unk1044 == 0) {
this->unk1044 = 5;
this->unk1046++;
}
break;
case 7:
if (this->unk1044 == 0) {
Actor_PlaySfx(&this->actor, NA_SE_EN_ANSATSUSYA_LAUGH);
this->unk1044 = 0x2D;
this->unk1046++;
}
break;
case 8:
if (this->unk1044 == 0) {
this->actor.speed = 3.0f;
this->actor.velocity.y = 10.0f;
this->actor.gravity = -1.0f;
func_80A776E0(this, 16);
this->unk294 = 0.4f;
this->unk298 = 40.0f;
Actor_PlaySfx(&this->actor, NA_SE_EN_PO_ROLL);
Math_Vec3f_Copy(&this->unk_2B8, &this->unk1054);
this->unk1044 = 25;
this->unk1046++;
}
break;
case 9: {
this->unk_38C++;
if (this->unk_38C >= 20) {
this->unk_38C = 0;
}
if (this->unk_388 < 19) {
this->unk_388++;
}
Math_Vec3f_Copy(&this->unk_390[this->unk_38C], &this->actor.world.pos);
Math_Vec3s_Copy(&this->unk_480[this->unk_38C], &this->actor.world.rot);
this->unk_390[this->unk_38C].y += 40.0f;
for (i = 0; i < 20; i++) {
this->unk_4F8[this->unk_38C][i] = this->jointTable[i];
}
Math_ApproachF(&this->actor.shape.shadowScale, 17.0f, 0.4f, 4.0f);
if (this->unk1044 == 0) {
this->unk1078.x = this->unk_2B8.x - 490.0f;
this->unk1078.y = this->unk_2B8.y;
this->unk1078.z = this->unk_2B8.z + 100.0f;
}
this->unk1084.x = this->actor.focus.pos.x - 80.0f;
this->unk1084.y = this->actor.focus.pos.y - 130.0f;
this->unk1084.z = this->actor.focus.pos.z;
if (this->unk36C == 0) {
for (i = 0; i < ARRAY_COUNT(D_80A7B510); i++) {
Math_ApproachF(&this->unk_EAC[i].x, D_80A7B510[i].x, 0.3f, 0.0005f);
this->unk_EAC[i].y = this->unk_EAC[i].x;
this->unk_EAC[i].z = this->unk_EAC[i].x;
if (this->actor.bgCheckFlags & 1) {
Actor_PlaySfx(&this->actor, NA_SE_EN_ANSATSUSYA_ONGND);
this->actor.gravity = 0.0f;
this->actor.velocity.y = 0.0f;
this->actor.speed = 0.0f;
func_80A776E0(this, 15);
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale, 0xA,
4.0f, 500, 50, 1);
this->unk1044 = 1;
Actor_PlaySfx(&this->actor, NA_SE_EN_EYEGOLE_ATTACK);
this->unk1046++;
}
} break;
case 10:
this->unk_38C++;
if (this->unk_38C >= 0x14) {
this->unk_38C = 0;
}
if (this->unk_388 < 0x13) {
this->unk_388++;
}
Math_Vec3f_Copy(&this->unk_390[this->unk_38C], &this->actor.world.pos);
Math_Vec3s_Copy(&this->unk_480[this->unk_38C], &this->actor.world.rot);
this->unk_390[this->unk_38C].y += 40.0f;
for (i = 0; i < 20; i++) {
this->unk_4F8[this->unk_38C][i] = this->jointTable[i];
}
if (this->unk1044 == 0) {
this->unk1078.x = this->unk_2B8.x - 518.0f;
this->unk1078.y = this->unk_2B8.y - 11.0f;
this->unk1078.z = this->unk_2B8.z + 100.0f;
}
this->unk1084.x = this->actor.focus.pos.x + 20.0f;
this->unk1084.y = this->actor.focus.pos.y - 50.0f;
this->unk1084.z = this->actor.focus.pos.z;
if (this->unk374 <= curFrame) {
this->unk_388 = 0;
this->unk_38C = 0;
this->unk1044 = 0x14;
func_80A776E0(this, 0x12);
this->unk1046++;
}
break;
case 11:
if (Animation_OnFrame(&this->skelAnime, 17.0f) != 0) {
Actor_PlaySfx(&this->actor, NA_SE_EN_ANSATSUSYA_SWORD);
Actor_PlaySfx(&this->actor, NA_SE_EV_FLAME_IGNITION);
this->unk36C = 0;
Audio_SetMainBgmVolume(127, 0);
Audio_PlayBgm_StorePrevBgm(0x38);
}
if (this->unk1044 == 0) {
this->unk1078.x = this->unk_2B8.x - 470.0f;
this->unk1078.y = this->unk_2B8.y - 10.0f;
this->unk1078.z = this->unk_2B8.z + 100.0f;
this->unk1084.x = this->actor.focus.pos.x - 80.0f;
this->unk1084.y = this->actor.focus.pos.y - 30.0f;
this->unk1084.z = this->actor.focus.pos.z;
if (this->unk36C == 0) {
for (i = 0; i < ARRAY_COUNT(D_80A7B510); i++) {
Math_ApproachF(&this->unk_EAC[i].x, D_80A7B510[i].x, 0.3f, 0.0005f);
this->unk_EAC[i].y = this->unk_EAC[i].x;
this->unk_EAC[i].z = this->unk_EAC[i].x;
}
}
}
}
if (this->unk374 <= curFrame) {
CutsceneManager_Stop(this->actor.csId);
this->unk1048 = 0;
this->actor.flags &= ~ACTOR_FLAG_100000;
this->actor.gravity = -3.0f;
this->actor.flags &= ~ACTOR_FLAG_CANT_LOCK_ON;
this->actor.flags |= ACTOR_FLAG_TARGETABLE;
func_80A787FC(this, play);
}
break;
if (this->unk374 <= curFrame) {
CutsceneManager_Stop(this->actor.csId);
this->unk1048 = 0;
this->actor.flags &= ~ACTOR_FLAG_100000;
this->actor.gravity = -3.0f;
this->actor.flags &= ~ACTOR_FLAG_CANT_LOCK_ON;
this->actor.flags |= ACTOR_FLAG_TARGETABLE;
func_80A787FC(this, play);
}
break;
}
this->actor.shape.yOffset = 960.0f;
func_80A77790(this, play);
}
#endif
void func_80A78588(EnJso2* this) {
this->unk36C = 2;
@ -595,7 +648,7 @@ void func_80A785E4(EnJso2* this, PlayState* play) {
switch (this->unk1046) {
case 0:
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale, 1, 8.0f,
0x1F4, 0xA, 1);
500, 10, 1);
Audio_SetMainBgmVolume(0, 10);
Actor_PlaySfx(&this->actor, NA_SE_EN_ANSATSUSYA_ENTRY);
this->unk1046++;
@ -604,7 +657,7 @@ void func_80A785E4(EnJso2* this, PlayState* play) {
case 1:
if (Animation_OnFrame(&this->skelAnime, 18.0f) != 0) {
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale, 1,
8.0f, 0x1F4, 0xA, 1);
8.0f, 500, 10, 1);
}
Math_ApproachF(&this->actor.shape.shadowScale, 17.0f, 0.4f, 4.0f);
@ -721,7 +774,7 @@ void func_80A78B04(EnJso2* this) {
void func_80A78B70(EnJso2* this, PlayState* play) {
this->actor.world.rot.x += 0x1770;
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 0xA, 0xFA0, (s16)0x14);
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 10, 4000, 20);
if (!(this->actor.velocity.y > 0.0f) && (this->actor.bgCheckFlags & 1)) {
this->actor.world.rot.x = 0;
this->actor.velocity.y = 0.0f;
@ -733,7 +786,7 @@ void func_80A78B70(EnJso2* this, PlayState* play) {
}
void func_80A78C08(EnJso2* this) {
this->unk28A = 0x28;
this->unk28A = 40;
this->unkEF4.base.acFlags |= AC_HARD;
this->actor.speed = 15.0f;
this->actor.velocity.y = 13.0f;
@ -788,7 +841,7 @@ void func_80A78C7C(EnJso2* this, PlayState* play) {
void func_80A78E8C(EnJso2* this) {
func_80A776E0(this, 0);
this->unk28A = 0x14;
this->unk28A = 20;
this->actor.speed = 0.0f;
this->actor.gravity = 0.0f;
this->actor.velocity.y = 10.0f;
@ -815,7 +868,7 @@ void func_80A78F80(EnJso2* this, PlayState* play) {
this->actor.velocity.y = 0.0f;
this->actor.gravity = BREG(0x35) + -3.0f;
Actor_PlaySfx(&this->actor, NA_SE_EN_ANSATSUSYA_FALL);
this->unk284 = 0x10;
this->unk284 = 16;
this->actionFunc = func_80A79038;
}
@ -833,8 +886,8 @@ void func_80A79038(EnJso2* this, PlayState* play) {
void func_80A790E4(EnJso2* this, PlayState* play) {
func_80A776E0(this, 1);
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale, 1, 8.0f, 0x1F4,
0xA, 1);
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale, 1, 8.0f, 500,
10, 1);
Math_ApproachZeroF(&this->actor.speed, 0.3f, 3.0f);
this->unk371 = 0;
Actor_PlaySfx(&this->actor, NA_SE_IT_SWORD_SWING_HARD);
@ -849,7 +902,7 @@ void func_80A7919C(EnJso2* this, PlayState* play) {
Math_ApproachZeroF(&this->actor.speed, 0.5f, 5.0f);
if (!(play->gameplayFrames & 7)) {
if (!(play->gameplayFrames % 8)) {
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale, 1, 8.0f,
500, 10, 1);
}
@ -888,8 +941,8 @@ void func_80A79300(EnJso2* this) {
void func_80A79364(EnJso2* this, PlayState* play) {
this->actor.shape.rot.y -= 0x1770;
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale, 1, 4.0f, 0x12C,
5, 1);
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale, 1, 4.0f, 300, 5,
1);
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 4000, 20);
if ((this->unk28E == 0) || ((this->unkF40.base.atFlags & AT_HIT) != 0) ||
@ -981,7 +1034,7 @@ void func_80A796BC(EnJso2* this, PlayState* play) {
Matrix_MultVecZ(-20.0f, &vec);
Math_Vec3f_Copy(&this->unkE58, &vec);
if (((this->unk2A2 == 0xB) || (this->unk2A2 == 0xA)) && (this->unk2A0 != 0)) {
if (((this->unk2A2 == 11) || (this->unk2A2 == 10)) && (this->unk2A0 != 0)) {
Actor_SpawnIceEffects(play, &this->actor, this->unk2D4, 0xC, 2, 0.7f, 0.4f);
this->unk2A0 = 0;
this->unk2A2 = 0;
@ -1060,7 +1113,7 @@ void func_80A7998C(EnJso2* this, PlayState* play) {
}
void func_80A79A84(EnJso2* this, PlayState* play) {
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 0xA, 0xFA0, 0x14);
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 10, 4000, 20);
if ((this->unk2A2 == 0xB) || (this->unk2A2 == 0xA)) {
if (this->unk2A0 != 0) {
@ -1212,7 +1265,7 @@ void func_80A7A0D0(EnJso2* this) {
this->unk1044 = 0;
Audio_SetMainBgmVolume(0, 10);
func_80A776E0(this, 19);
this->unk284 = 0xE;
this->unk284 = 14;
this->actionFunc = func_80A7A124;
}
@ -1221,16 +1274,16 @@ void func_80A7A124(EnJso2* this, PlayState* play) {
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 0xA, 0xFA0, 0x14);
if ((this->unk1040 == 0x13) && (this->unk374 <= curFrame)) {
if ((this->unk1040 == 19) && (this->unk374 <= curFrame)) {
this->unk104A = 0;
func_80A776E0(this, 20);
}
if ((this->unk1040 == 0x14) && (this->unk374 <= curFrame)) {
this->unk104A += 1;
if ((this->unk1040 == 20) && (this->unk374 <= curFrame)) {
this->unk104A++;
if (this->unk104A >= 2) {
this->unk104A = 0;
func_80A776E0(this, 0x15);
func_80A776E0(this, 21);
}
}
@ -1238,7 +1291,7 @@ void func_80A7A124(EnJso2* this, PlayState* play) {
if (this->unk2D0 == NULL) {
this->unk2D0 = Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_COL_MAN, this->unk2C4.x,
this->unk2C4.y, this->unk2C4.z, 0, 0, 0, 4);
} else if (this->unk104A >= 0xA) {
} else if (this->unk104A >= 10) {
if (this->unk2D0 != NULL) {
this->unk2D0->world.rot.z = 1;
this->unk2B4 = 1;
@ -1269,7 +1322,7 @@ void func_80A7A2EC(EnJso2* this, PlayState* play) {
void func_80A7A360(EnJso2* this, PlayState* play) {
s32 var_a3 = false;
if ((this->unk284 != 0xB) && (this->unk284 != 0xC) && (this->unk284 != 0xD) && (this->unk284 != 0xE) &&
if ((this->unk284 != 11) && (this->unk284 != 12) && (this->unk284 != 13) && (this->unk284 != 14) &&
this->unkEF4.base.acFlags & AT_HIT) {
this->unkEF4.base.acFlags &= ~(AT_HIT);
if ((this->actor.colChkInfo.damageEffect == 1) || (this->actor.colChkInfo.damageEffect == 5)) {
@ -1305,7 +1358,7 @@ void func_80A7A360(EnJso2* this, PlayState* play) {
break;
case 4:
if (((this->unk2A2 != 0xB) && (this->unk2A2 != 0xA)) || (this->unk2A0 == 0)) {
if (((this->unk2A2 != 11) && (this->unk2A2 != 10)) || (this->unk2A0 == 0)) {
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->actor.focus.pos.x,
this->actor.focus.pos.y, this->actor.focus.pos.z, 0, 0, 0, 4);
this->unk2A0 = 20;
@ -1369,21 +1422,23 @@ void EnJso2_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
Actor_SetFocus(&this->actor, 80.0f);
Actor_MoveWithGravity(&this->actor);
if (this->actor.bgCheckFlags & 1) {
this->actor.world.pos.x += this->unkE58.x;
this->actor.world.pos.z += this->unkE58.z;
Math_ApproachZeroF(&this->unkE58.x, 1.0f, 2.0f);
Math_ApproachZeroF(&this->unkE58.z, 1.0f, 2.0f);
}
Actor_UpdateBgCheckInfo(play, &this->actor, 35.0f, 60.0f, 60.0f, 0x1D);
if ((this->unk284 == 5) || (this->unk284 == 6) || (this->unk284 == 0xF) || (this->unk284 == 0x10)) {
if ((this->unk284 == 5) || (this->unk284 == 6) || (this->unk284 == 15) || (this->unk284 == 16)) {
this->unk_38C++;
if (this->unk_38C >= 0x14) {
if (this->unk_38C >= 20) {
this->unk_38C = 0;
}
if (this->unk_388 < 0x13) {
if (this->unk_388 < 19) {
this->unk_388++;
}
Math_Vec3f_Copy(&this->unk_390[this->unk_38C], &this->actor.world.pos);
@ -1397,6 +1452,7 @@ void EnJso2_Update(Actor* thisx, PlayState* play) {
} else if (this->unk284 != 0) {
this->unk_388 = 0;
}
if ((this->unk284 != 3) && (this->unk284 != 5) && (this->unk284 != 0xB) && (this->unk284 != 8) &&
(this->unk284 != 0xF) && (this->unk284 != 0xC)) {
this->actor.shape.rot.y = this->actor.world.rot.y;
@ -1413,7 +1469,7 @@ void EnJso2_Update(Actor* thisx, PlayState* play) {
CollisionCheck_SetAC(play, &play->colChkCtx, &this->unkEF4.base);
}
}
if (((this->unk284 == 7) || (this->unk284 == 0x10) || (this->unk284 == 6) || (this->unk284 == 8)) &&
if (((this->unk284 == 7) || (this->unk284 == 16) || (this->unk284 == 6) || (this->unk284 == 8)) &&
(this->unk371 == 0) && (this->unk36C == 0)) {
CollisionCheck_SetAT(play, &play->colChkCtx, &this->unkF40.base);
CollisionCheck_SetAT(play, &play->colChkCtx, &this->unkFC0.base);
@ -1424,7 +1480,7 @@ s32 func_80A7AA48(PlayState* play, s32 arg1, Gfx** dList, Vec3f* pos, Vec3s* rot
EnJso2* this = THIS;
if (this->unk36C == 2) {
if ((arg1 == 4) && (this->unk284 != 0xE)) {
if ((arg1 == 4) && (this->unk284 != 14)) {
*dList = NULL;
}
if (arg1 == 6) {
@ -1461,7 +1517,7 @@ void func_80A7AA9C(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Acto
Matrix_MultVec3f(&D_80A7B570, &this->unk_E64[2]);
}
if (((this->unk284 == 7) || (this->unk284 == 8) || (this->unk284 == 6) || (this->unk284 == 0x10)) &&
if (((this->unk284 == 7) || (this->unk284 == 8) || (this->unk284 == 6) || (this->unk284 == 16)) &&
(this->unk368 == 0)) {
EffectBlure_AddVertex(Effect_GetByIndex(this->unk384), &sp68, &sp5C);
} else if (this->unk368 == 1) {
@ -1506,9 +1562,9 @@ void func_80A7AA9C(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Acto
Matrix_MultVec3f(&sp50, &this->unk2C4);
}
if ((this->unk284 != 0xE) && ((limbIndex == 4) || (limbIndex == 6) || (limbIndex == 7) || (limbIndex == 8) ||
(limbIndex == 9) || (limbIndex == 10) || (limbIndex == 11) || (limbIndex == 12) ||
(limbIndex == 14) || (limbIndex == 16) || (limbIndex == 17) || (limbIndex == 19))) {
if ((this->unk284 != 14) && ((limbIndex == 4) || (limbIndex == 6) || (limbIndex == 7) || (limbIndex == 8) ||
(limbIndex == 9) || (limbIndex == 10) || (limbIndex == 11) || (limbIndex == 12) ||
(limbIndex == 14) || (limbIndex == 16) || (limbIndex == 17) || (limbIndex == 19))) {
Matrix_MultZero(&this->unk2D4[this->unk364]);
@ -1520,6 +1576,7 @@ void func_80A7AA9C(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Acto
if (limbIndex == 12) {
Matrix_Push();
Matrix_Scale(1.0f, 1.0f, 1.0f, MTXMODE_APPLY);
OPEN_DISPS(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
@ -1621,4 +1678,4 @@ void EnJso2_Draw(Actor* thisx, PlayState* play2) {
}
CLOSE_DISPS(play->state.gfxCtx);
}
}