Cleanup SubCameras (#936)

* Cleanup SubCameras

* Add small bit of docs, remove comments

* Fix merge from master, missed test7
This commit is contained in:
engineer124
2022-07-22 10:24:37 -04:00
committed by GitHub
parent 5f6c3df4ce
commit f2b628241d
47 changed files with 732 additions and 730 deletions
+2 -2
View File
@@ -1449,7 +1449,7 @@ s16 ActorCutscene_GetAdditionalCutscene(s16 index);
s16 ActorCutscene_GetLength(s16 index);
s32 func_800F2138(s8 arg0);
s32 func_800F2178(s16 arg0);
s16 ActorCutscene_GetCurrentCamera(s16 index);
s16 ActorCutscene_GetCurrentSubCamId(s16 index);
s16 func_800F21CC(void);
s32 func_800F22C4(s16 param_1, Actor* actor);
void ActorCutscene_SetReturnCamera(s16 index);
@@ -2623,7 +2623,7 @@ s32 Play_CreateSubCamera(PlayState* play);
s32 Play_GetActiveCamId(PlayState* play);
void Play_CameraChangeStatus(PlayState* play, s16 camId, s16 status);
void Play_ClearCamera(PlayState* play, s16 camId);
Camera* Play_GetCamera(PlayState* play, s16 index);
Camera* Play_GetCamera(PlayState* play, s16 camId);
s32 Play_CameraSetAtEye(PlayState* play, s16 camId, Vec3f* at, Vec3f* eye);
void Play_CameraSetAtEyeUp(PlayState* play, s16 camId, Vec3f* at, Vec3f* eye, Vec3f* up);
void Play_CameraSetFov(PlayState* play, s16 camId, f32 fov);
+1 -1
View File
@@ -178,7 +178,7 @@ typedef struct {
/* 0x0C */ f32 unk_0C;
/* 0x10 */ u16 frames;
/* 0x12 */ u16 currentCsIndex;
/* 0x14 */ s32 csCamId;
/* 0x14 */ s32 subCamId;
/* 0x18 */ u16 unk_18;
/* 0x1A */ u8 unk_1A;
/* 0x1B */ u8 unk_1B;
+2 -2
View File
@@ -1475,8 +1475,8 @@ void func_800EDA84(PlayState* play, CutsceneContext* csCtx) {
Audio_SetCutsceneFlag(true);
csCtx->frames = 0xFFFF;
csCtx->csCamId = ActorCutscene_GetCurrentCamera(0x7F);
func_8016119C(Play_GetCamera(play, csCtx->csCamId), &sCutsceneCameraInfo);
csCtx->subCamId = ActorCutscene_GetCurrentSubCamId(0x7F);
func_8016119C(Play_GetCamera(play, csCtx->subCamId), &sCutsceneCameraInfo);
csCtx->unk_18 = 0xFFFF;
if (gSaveContext.cutsceneTrigger == 0) {
+1 -1
View File
@@ -42,7 +42,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eventmgr/func_800F2178.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eventmgr/ActorCutscene_GetCurrentCamera.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eventmgr/ActorCutscene_GetCurrentSubCamId.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eventmgr/func_800F21CC.s")
@@ -123,14 +123,14 @@ s32 func_80953BEC(BgIngate* this) {
}
s32 func_80953DA8(BgIngate* this, PlayState* play) {
Camera* camera = Play_GetCamera(play, CAM_ID_MAIN);
Camera* mainCam = Play_GetCamera(play, CAM_ID_MAIN);
if (gSaveContext.eventInf[3] & 0x20) {
func_800B7298(play, &this->dyna.actor, 7);
} else {
gSaveContext.eventInf[4] |= 2;
}
Camera_ChangeSetting(camera, CAM_SET_BOAT_CRUISE);
Camera_ChangeSetting(mainCam, CAM_SET_BOAT_CRUISE);
play->unk_1887C = 0x63;
return false;
@@ -178,7 +178,7 @@ void func_80953F8C(BgIngate* this, PlayState* play) {
void func_80953F9C(BgIngate* this, PlayState* play) {
Player* player = GET_PLAYER(play);
Camera* camera = Play_GetCamera(play, CAM_ID_MAIN);
Camera* mainCam = Play_GetCamera(play, CAM_ID_MAIN);
if (!(gSaveContext.eventInf[4] & 1)) {
@@ -214,11 +214,11 @@ void func_80953F9C(BgIngate* this, PlayState* play) {
}
if (ActorCutscene_GetCurrentIndex() != this->unk16E) {
if (ActorCutscene_GetCurrentIndex() != -1) {
Camera_ChangeSetting(camera, CAM_SET_NORMAL0);
Camera_ChangeSetting(mainCam, CAM_SET_NORMAL0);
player->stateFlags1 |= 0x20;
play->actorCtx.unk5 &= ~0x4;
} else {
Camera_ChangeSetting(camera, CAM_SET_BOAT_CRUISE);
Camera_ChangeSetting(mainCam, CAM_SET_BOAT_CRUISE);
player->stateFlags1 &= ~0x20;
}
}
+74 -74
View File
@@ -556,8 +556,8 @@ void Boss02_Init(Actor* thisx, PlayState* play) {
}
this->actor.targetMode = 10;
this->unk_1D3C.z = this->unk_1D3C.x = 0.0f;
this->unk_1D3C.y = 1.0f;
this->subCamUp.z = this->subCamUp.x = 0.0f;
this->subCamUp.y = 1.0f;
if (this->actor.params == TWINMOLD_STATIC) {
sTwinmoldStatic = this;
play->specialEffects = (void*)sEffects;
@@ -936,7 +936,7 @@ void func_809DAB78(Boss02* this, PlayState* play) {
this->unk_0146[0] = 20;
this->unk_0152 = 0;
sTwinmoldStatic->unk_1D20 = 102;
sTwinmoldStatic->unk_1D5C = 0.0f;
sTwinmoldStatic->subCamAtVel = 0.0f;
play_sound(NA_SE_EN_INBOSS_DEAD_PRE2_OLD);
} else if (!(this->unk_0146[1] & 0xF) && (Rand_ZeroOne() < 0.5f)) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_INBOSS_DAMAGE_OLD);
@@ -1633,12 +1633,12 @@ void func_809DD934(Boss02* this, PlayState* play) {
case 0:
if (player->stateFlags1 & 0x100) {
Cutscene_Start(play, &play->csCtx);
this->unk_1D22 = Play_CreateSubCamera(play);
this->subCamId = Play_CreateSubCamera(play);
Play_CameraChangeStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_CameraChangeStatus(play, this->unk_1D22, CAM_STATUS_ACTIVE);
Play_CameraChangeStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
func_8016566C(150);
this->unk_1D14 = 0;
this->unk_1D5C = 0.0f;
this->subCamAtVel = 0.0f;
this->unk_1D58 = 0.0f;
if (!sIsInGiantMode) {
this->unk_1D18 = 1;
@@ -1674,11 +1674,11 @@ void func_809DD934(Boss02* this, PlayState* play) {
if (this->unk_1D14 == (u32)(BREG(43) + 60)) {
play_sound(NA_SE_PL_TRANSFORM_GIANT);
}
Math_ApproachF(&this->unk_1D64, 200.0f, 0.1f, this->unk_1D5C * 640.0f);
Math_ApproachF(&this->unk_1D6C, 273.0f, 0.1f, this->unk_1D5C * 150.0f);
Math_ApproachF(&this->unk_1D70, 0.1f, 0.2f, this->unk_1D5C * 0.1f);
Math_ApproachF(&this->unk_1D74, -100.0f, 1.0f, this->unk_1D5C * 100.0f);
Math_ApproachF(&this->unk_1D5C, 1.0f, 1.0f, 0.001f);
Math_ApproachF(&this->unk_1D64, 200.0f, 0.1f, this->subCamAtVel * 640.0f);
Math_ApproachF(&this->unk_1D6C, 273.0f, 0.1f, this->subCamAtVel * 150.0f);
Math_ApproachF(&this->unk_1D70, 0.1f, 0.2f, this->subCamAtVel * 0.1f);
Math_ApproachF(&this->unk_1D74, -100.0f, 1.0f, this->subCamAtVel * 100.0f);
Math_ApproachF(&this->subCamAtVel, 1.0f, 1.0f, 0.001f);
} else {
Math_ApproachF(&this->unk_1D64, 30.0f, 0.1f, 1.0f);
}
@@ -1725,11 +1725,11 @@ void func_809DD934(Boss02* this, PlayState* play) {
if (this->unk_1D14 == (u32)(BREG(44) + 10)) {
play_sound(NA_SE_PL_TRANSFORM_NORAML);
}
Math_ApproachF(&this->unk_1D64, 60.0f, 0.1f, this->unk_1D5C * 640.0f);
Math_ApproachF(&this->unk_1D6C, 23.0f, 0.1f, this->unk_1D5C * 150.0f);
Math_ApproachF(&this->unk_1D64, 60.0f, 0.1f, this->subCamAtVel * 640.0f);
Math_ApproachF(&this->unk_1D6C, 23.0f, 0.1f, this->subCamAtVel * 150.0f);
Math_ApproachF(&this->unk_1D70, 0.01f, 0.1f, 0.003f);
Math_ApproachF(&this->unk_1D74, 0.0f, 1.0f, this->unk_1D5C * 100.0f);
Math_ApproachF(&this->unk_1D5C, 2.0f, 1.0f, 0.01f);
Math_ApproachF(&this->unk_1D74, 0.0f, 1.0f, this->subCamAtVel * 100.0f);
Math_ApproachF(&this->subCamAtVel, 2.0f, 1.0f, 0.01f);
}
if (this->unk_1D14 == 42) {
@@ -1750,8 +1750,8 @@ void func_809DD934(Boss02* this, PlayState* play) {
block_38:
case 20:
this->unk_1D18 = 0;
func_80169AFC(play, this->unk_1D22, 0);
this->unk_1D22 = 0;
func_80169AFC(play, this->subCamId, 0);
this->subCamId = SUB_CAM_ID_DONE;
Cutscene_End(play, &play->csCtx);
this->actor.flags |= ACTOR_FLAG_1;
player->stateFlags1 &= ~0x100;
@@ -2017,22 +2017,22 @@ void func_809DD934(Boss02* this, PlayState* play) {
break;
}
if ((this->unk_1D18 != 0) && (this->unk_1D22 != 0)) {
if ((this->unk_1D18 != 0) && (this->subCamId != SUB_CAM_ID_DONE)) {
Matrix_RotateYS(player->actor.shape.rot.y, MTXMODE_NEW);
Matrix_MultVecZ(this->unk_1D64, &sp58);
this->unk_1D24.x = player->actor.world.pos.x + sp58.x;
this->unk_1D24.y = player->actor.world.pos.y + sp58.y + this->unk_1D68;
this->unk_1D24.z = player->actor.world.pos.z + sp58.z;
this->subCamEye.x = player->actor.world.pos.x + sp58.x;
this->subCamEye.y = player->actor.world.pos.y + sp58.y + this->unk_1D68;
this->subCamEye.z = player->actor.world.pos.z + sp58.z;
this->unk_1D30.x = player->actor.world.pos.x;
this->unk_1D30.y = player->actor.world.pos.y + this->unk_1D6C;
this->unk_1D30.z = player->actor.world.pos.z;
this->subCamAt.x = player->actor.world.pos.x;
this->subCamAt.y = player->actor.world.pos.y + this->unk_1D6C;
this->subCamAt.z = player->actor.world.pos.z;
this->unk_1D54 = Math_SinS(this->unk_1D14 * 1512) * this->unk_1D58;
Matrix_RotateZF(this->unk_1D54, MTXMODE_APPLY);
Matrix_MultVecY(1.0f, &this->unk_1D3C);
Play_CameraSetAtEyeUp(play, this->unk_1D22, &this->unk_1D30, &this->unk_1D24, &this->unk_1D3C);
Matrix_MultVecY(1.0f, &this->subCamUp);
Play_CameraSetAtEyeUp(play, this->subCamId, &this->subCamAt, &this->subCamEye, &this->subCamUp);
ShrinkWindow_SetLetterboxTarget(27);
}
}
@@ -2040,7 +2040,7 @@ void func_809DD934(Boss02* this, PlayState* play) {
void func_809DEAC4(Boss02* this, PlayState* play) {
Player* player = GET_PLAYER(play);
Boss02* sp68;
Vec3f sp5C;
Vec3f subCamEye;
f32 sp58 = 0.0f;
this->unk_1D1C++;
@@ -2059,22 +2059,22 @@ void func_809DEAC4(Boss02* this, PlayState* play) {
break;
}
Cutscene_Start(play, &play->csCtx);
this->unk_1D22 = Play_CreateSubCamera(play);
this->subCamId = Play_CreateSubCamera(play);
Play_CameraChangeStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_CameraChangeStatus(play, this->unk_1D22, CAM_STATUS_ACTIVE);
Play_CameraChangeStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
this->unk_1D20 = 2;
this->unk_1D1C = 0;
case 2:
player->actor.shape.rot.y = -0x8000;
player->actor.world.rot.y = player->actor.shape.rot.y;
this->unk_1D24.x = player->actor.world.pos.x - 20.0f;
this->unk_1D24.y = (Player_GetHeight(player) + player->actor.world.pos.y) - 29.0f;
this->unk_1D24.z = player->actor.world.pos.z - 50;
this->subCamEye.x = player->actor.world.pos.x - 20.0f;
this->subCamEye.y = (Player_GetHeight(player) + player->actor.world.pos.y) - 29.0f;
this->subCamEye.z = player->actor.world.pos.z - 50;
this->unk_1D30.x = player->actor.world.pos.x;
this->unk_1D30.y = (Player_GetHeight(player) + player->actor.world.pos.y) - 17.0f;
this->unk_1D30.z = player->actor.world.pos.z;
this->subCamAt.x = player->actor.world.pos.x;
this->subCamAt.y = (Player_GetHeight(player) + player->actor.world.pos.y) - 17.0f;
this->subCamAt.z = player->actor.world.pos.z;
if (this->unk_1D1C >= 30) {
if (this->unk_1D1C == 30) {
Rumble_Override(0.0f, 50, 200, 1);
@@ -2082,7 +2082,7 @@ void func_809DEAC4(Boss02* this, PlayState* play) {
this->unk_0150 += 0x4000;
sp58 = (Math_SinS(this->unk_0150) * (BREG(19) + 5)) * 0.1f;
Matrix_RotateZF(Math_SinS(this->unk_1D1C * 0x3000) * ((KREG(28) * 0.001f) + 0.017f), MTXMODE_NEW);
Matrix_MultVecY(1.0f, &this->unk_1D3C);
Matrix_MultVecY(1.0f, &this->subCamUp);
func_8019F128(NA_SE_EV_EARTHQUAKE_LAST - SFX_FLAG);
}
@@ -2116,18 +2116,18 @@ void func_809DEAC4(Boss02* this, PlayState* play) {
case 10:
if (this->unk_1D1C < 310) {
this->unk_1D48 = sp68->actor.world.pos;
this->unk_1D24.x = (sp68->actor.world.pos.x * 50.0f) * 0.001f;
this->unk_1D24.y = (sp68->actor.world.pos.y * 50.0f) * 0.001f;
if (this->unk_1D24.y < 100.0f) {
this->unk_1D24.y = 100.0f;
this->subCamAtNext = sp68->actor.world.pos;
this->subCamEye.x = (sp68->actor.world.pos.x * 50.0f) * 0.001f;
this->subCamEye.y = (sp68->actor.world.pos.y * 50.0f) * 0.001f;
if (this->subCamEye.y < 100.0f) {
this->subCamEye.y = 100.0f;
}
this->unk_1D24.z = (sp68->actor.world.pos.z * 100) * 0.001f;
this->subCamEye.z = (sp68->actor.world.pos.z * 100) * 0.001f;
}
Math_ApproachF(&this->unk_1D30.x, this->unk_1D48.x, 0.1f, 3000.0f);
Math_ApproachF(&this->unk_1D30.y, this->unk_1D48.y, 0.1f, 3000.0f);
Math_ApproachF(&this->unk_1D30.z, this->unk_1D48.z, 0.1f, 3000.0f);
Math_ApproachF(&this->subCamAt.x, this->subCamAtNext.x, 0.1f, 3000.0f);
Math_ApproachF(&this->subCamAt.y, this->subCamAtNext.y, 0.1f, 3000.0f);
Math_ApproachF(&this->subCamAt.z, this->subCamAtNext.z, 0.1f, 3000.0f);
if (this->unk_1D1C == 100) {
sBlueTwinmold->unk_0144 = 11;
@@ -2141,8 +2141,8 @@ void func_809DEAC4(Boss02* this, PlayState* play) {
}
if (this->unk_1D1C == (u32)(BREG(27) + 335)) {
func_80169AFC(play, this->unk_1D22, 0);
this->unk_1D22 = 0;
func_80169AFC(play, this->subCamId, 0);
this->subCamId = SUB_CAM_ID_DONE;
Cutscene_End(play, &play->csCtx);
func_800B7298(play, &this->actor, 6);
this->actor.flags |= ACTOR_FLAG_1;
@@ -2156,13 +2156,13 @@ void func_809DEAC4(Boss02* this, PlayState* play) {
case 100:
if (ActorCutscene_GetCurrentIndex() == -1) {
Cutscene_Start(play, &play->csCtx);
this->unk_1D22 = Play_CreateSubCamera(play);
this->subCamId = Play_CreateSubCamera(play);
Play_CameraChangeStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_CameraChangeStatus(play, this->unk_1D22, CAM_STATUS_ACTIVE);
Play_CameraChangeStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
this->unk_1D20 = 101;
this->unk_1D1C = 0;
this->unk_1D5C = 1.0f;
this->unk_1D30 = sp68->actor.world.pos;
this->subCamAtVel = 1.0f;
this->subCamAt = sp68->actor.world.pos;
} else {
break;
}
@@ -2171,30 +2171,30 @@ void func_809DEAC4(Boss02* this, PlayState* play) {
case 102:
case_10x:
if ((this->unk_1D20 == 101) || (this->unk_1D20 == 103)) {
this->unk_1D48 = sp68->actor.world.pos;
this->subCamAtNext = sp68->actor.world.pos;
} else {
this->unk_1D48 = sp68->unk_147C[sp68->unk_1678];
this->subCamAtNext = sp68->unk_147C[sp68->unk_1678];
}
this->unk_1D24.x = player->actor.world.pos.x;
this->unk_1D24.y = player->actor.world.pos.y + 100.0f;
this->subCamEye.x = player->actor.world.pos.x;
this->subCamEye.y = player->actor.world.pos.y + 100.0f;
if (!sIsInGiantMode) {
if (this->unk_1D24.y < 100.0f) {
this->unk_1D24.y = 100.0f;
if (this->subCamEye.y < 100.0f) {
this->subCamEye.y = 100.0f;
}
} else if (this->unk_1D24.y < 3160.0f) {
this->unk_1D24.y = 3160.0f;
} else if (this->subCamEye.y < 3160.0f) {
this->subCamEye.y = 3160.0f;
}
if (this->unk_1D48.y < (100.0f * D_809DF5B0)) {
this->unk_1D48.y = (100.0f * D_809DF5B0);
if (this->subCamAtNext.y < (100.0f * D_809DF5B0)) {
this->subCamAtNext.y = (100.0f * D_809DF5B0);
}
this->unk_1D24.z = player->actor.world.pos.z;
Math_ApproachF(&this->unk_1D30.x, this->unk_1D48.x, 0.3f, this->unk_1D5C * 500.0f);
Math_ApproachF(&this->unk_1D30.y, this->unk_1D48.y, 0.3f, this->unk_1D5C * 500.0f);
Math_ApproachF(&this->unk_1D30.z, this->unk_1D48.z, 0.3f, this->unk_1D5C * 500.0f);
Math_ApproachF(&this->unk_1D5C, 1.0f, 1.0f, 0.02f);
this->subCamEye.z = player->actor.world.pos.z;
Math_ApproachF(&this->subCamAt.x, this->subCamAtNext.x, 0.3f, this->subCamAtVel * 500.0f);
Math_ApproachF(&this->subCamAt.y, this->subCamAtNext.y, 0.3f, this->subCamAtVel * 500.0f);
Math_ApproachF(&this->subCamAt.z, this->subCamAtNext.z, 0.3f, this->subCamAtVel * 500.0f);
Math_ApproachF(&this->subCamAtVel, 1.0f, 1.0f, 0.02f);
break;
case 103:
@@ -2202,8 +2202,8 @@ void func_809DEAC4(Boss02* this, PlayState* play) {
sp58 = Math_SinS(this->unk_0150);
sp58 = (sp58 * this->unk_0146[0]) * 1.5f;
if (this->unk_1D1C == 30) {
func_80169AFC(play, this->unk_1D22, 0);
this->unk_1D22 = 0;
func_80169AFC(play, this->subCamId, 0);
this->subCamId = SUB_CAM_ID_DONE;
Cutscene_End(play, &play->csCtx);
func_800B7298(play, &this->actor, 6);
this->unk_1D20 = 0;
@@ -2235,12 +2235,12 @@ void func_809DEAC4(Boss02* this, PlayState* play) {
goto case_10x;
}
if ((this->unk_1D20 != 0) && (this->unk_1D22 != 0)) {
sp5C = this->unk_1D24;
sp5C.y += sp58 * D_809DF5B0;
Play_CameraSetAtEyeUp(play, this->unk_1D22, &this->unk_1D30, &sp5C, &this->unk_1D3C);
this->unk_1D3C.z = this->unk_1D3C.x = 0.0f;
this->unk_1D3C.y = 1.0f;
if ((this->unk_1D20 != 0) && (this->subCamId != SUB_CAM_ID_DONE)) {
subCamEye = this->subCamEye;
subCamEye.y += sp58 * D_809DF5B0;
Play_CameraSetAtEyeUp(play, this->subCamId, &this->subCamAt, &subCamEye, &this->subCamUp);
this->subCamUp.z = this->subCamUp.x = 0.0f;
this->subCamUp.y = 1.0f;
ShrinkWindow_SetLetterboxTarget(27);
}
}
+6 -6
View File
@@ -88,14 +88,14 @@ typedef struct Boss02 {
/* 0x1D1A */ s16 unk_1D1A;
/* 0x1D1C */ u32 unk_1D1C;
/* 0x1D20 */ s16 unk_1D20;
/* 0x1D22 */ s16 unk_1D22;
/* 0x1D24 */ Vec3f unk_1D24;
/* 0x1D30 */ Vec3f unk_1D30;
/* 0x1D3C */ Vec3f unk_1D3C;
/* 0x1D48 */ Vec3f unk_1D48;
/* 0x1D22 */ s16 subCamId;
/* 0x1D24 */ Vec3f subCamEye;
/* 0x1D30 */ Vec3f subCamAt;
/* 0x1D3C */ Vec3f subCamUp;
/* 0x1D48 */ Vec3f subCamAtNext;
/* 0x1D54 */ f32 unk_1D54;
/* 0x1D58 */ f32 unk_1D58;
/* 0x1D5C */ f32 unk_1D5C;
/* 0x1D5C */ f32 subCamAtVel;
/* 0x1D60 */ UNK_TYPE1 unk1D60[0x4];
/* 0x1D64 */ f32 unk_1D64;
/* 0x1D68 */ f32 unk_1D68;
+95 -96
View File
@@ -1150,9 +1150,9 @@ void Boss03_IntroCutscene(Boss03* this, PlayState* play) {
if (player->actor.world.pos.y < 1350.0f) {
Cutscene_Start(play, &play->csCtx);
func_800B7298(play, &this->actor, 7);
this->csCamId = Play_CreateSubCamera(play);
this->subCamId = Play_CreateSubCamera(play);
Play_CameraChangeStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_CameraChangeStatus(play, this->csCamId, CAM_STATUS_ACTIVE);
Play_CameraChangeStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
this->actor.world.rot.y = -0x7B30;
this->prevPlayerPos.y = 1850.0f;
@@ -1165,34 +1165,34 @@ void Boss03_IntroCutscene(Boss03* this, PlayState* play) {
player->actor.world.pos.y = 1850.0f;
player->actor.world.rot.y = player->actor.shape.rot.y;
this->csCamAt.y = player->actor.world.pos.y + 30.0f;
this->subCamAt.y = player->actor.world.pos.y + 30.0f;
this->csState = 1;
this->csTimer = 0;
this->actor.flags &= ~ACTOR_FLAG_1;
this->unk_2D5 = true;
this->cameraFov = KREG(14) + 60.0f;
this->subCamFov = KREG(14) + 60.0f;
case 1:
player->actor.world.pos.z = 0.0f;
player->actor.world.pos.x = 0.0f;
player->actor.speedXZ = 0.0f;
this->csCamEye.x = 100.0f;
this->csCamEye.y = 540.0f;
this->subCamEye.x = 100.0f;
this->subCamEye.y = 540.0f;
this->csCamEye.z = player->actor.world.pos.z + 100.0f;
this->csCamAt.x = player->actor.world.pos.x;
this->subCamEye.z = player->actor.world.pos.z + 100.0f;
this->subCamAt.x = player->actor.world.pos.x;
Math_ApproachF(&this->csCamAt.y, player->actor.world.pos.y + 30.0f, 0.5f, 100.0f);
this->csCamAt.z = player->actor.world.pos.z;
Math_ApproachF(&this->subCamAt.y, player->actor.world.pos.y + 30.0f, 0.5f, 100.0f);
this->subCamAt.z = player->actor.world.pos.z;
if (this->csTimer > 105) {
this->csState = 2;
this->csTimer = 0;
this->unk_240 = 0;
func_8016566C(0x96);
this->cameraFov = 80.0f;
this->subCamFov = 80.0f;
case 2:
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_KONB_DEMO_MOVE_OLD - SFX_FLAG);
@@ -1263,20 +1263,20 @@ void Boss03_IntroCutscene(Boss03* this, PlayState* play) {
func_800B7298(play, &this->actor, 8);
}
this->csCamEye.x = player->actor.world.pos.x + 30.0f;
this->csCamEye.y = player->actor.world.pos.y + Player_GetHeight(player) - 4.0f + BREG(17);
this->csCamEye.z = player->actor.world.pos.z - 30.0f;
this->subCamEye.x = player->actor.world.pos.x + 30.0f;
this->subCamEye.y = player->actor.world.pos.y + Player_GetHeight(player) - 4.0f + BREG(17);
this->subCamEye.z = player->actor.world.pos.z - 30.0f;
this->csCamAt.x = player->actor.world.pos.x;
this->csCamAt.y = player->actor.world.pos.y + Player_GetHeight(player) - 18.0f + 6.0f + BREG(18);
this->csCamAt.z = player->actor.world.pos.z;
this->subCamAt.x = player->actor.world.pos.x;
this->subCamAt.y = player->actor.world.pos.y + Player_GetHeight(player) - 18.0f + 6.0f + BREG(18);
this->subCamAt.z = player->actor.world.pos.z;
if (player->transformation == PLAYER_FORM_FIERCE_DEITY) {
this->csCamEye.y -= 60.0f;
this->csCamAt.y -= 35.0f;
this->subCamEye.y -= 60.0f;
this->subCamAt.y -= 35.0f;
}
this->cameraFov = 60.0f;
this->subCamFov = 60.0f;
if (this->csTimer == 16) {
this->csState = 5;
this->csTimer = 0;
@@ -1293,13 +1293,13 @@ void Boss03_IntroCutscene(Boss03* this, PlayState* play) {
player->actor.shape.rot.y = -0x1470;
player->actor.world.rot.y = player->actor.shape.rot.y;
this->csCamEye.x = player->actor.world.pos.x + 30.0f - 90.0f + 300.0f;
this->csCamEye.y = player->actor.world.pos.y + 40.0f + 10.0f;
this->csCamEye.z = player->actor.world.pos.z - 30.0f + 160.0f + 300.0f;
this->subCamEye.x = player->actor.world.pos.x + 30.0f - 90.0f + 300.0f;
this->subCamEye.y = player->actor.world.pos.y + 40.0f + 10.0f;
this->subCamEye.z = player->actor.world.pos.z - 30.0f + 160.0f + 300.0f;
this->csCamAt.x = this->actor.world.pos.x;
this->csCamAt.y = this->actor.world.pos.y - 100.0f;
this->csCamAt.z = this->actor.world.pos.z;
this->subCamAt.x = this->actor.world.pos.x;
this->subCamAt.y = this->actor.world.pos.y - 100.0f;
this->subCamAt.z = this->actor.world.pos.z;
if (this->csTimer == 10) {
this->actor.velocity.y = 30.0f;
@@ -1345,34 +1345,34 @@ void Boss03_IntroCutscene(Boss03* this, PlayState* play) {
Boss03_SpawnEffectDroplet(play, &effectPos);
}
this->csCamTargetAt.x = this->actor.world.pos.x;
this->csCamTargetAt.y = this->actor.world.pos.y - 100.0f;
this->csCamTargetAt.z = this->actor.world.pos.z;
this->subCamAtNext.x = this->actor.world.pos.x;
this->subCamAtNext.y = this->actor.world.pos.y - 100.0f;
this->subCamAtNext.z = this->actor.world.pos.z;
}
} else {
Math_ApproachF(&this->csCamEye.x, player->actor.world.pos.x + 30.0f - 90.0f + 300.0f - 90.0f, 0.05f,
Math_ApproachF(&this->subCamEye.x, player->actor.world.pos.x + 30.0f - 90.0f + 300.0f - 90.0f, 0.05f,
3.0f);
Math_ApproachF(&this->csCamEye.y, player->actor.world.pos.y + 40.0f + 10.0f + 90.0f, 0.05f, 3.0f);
Math_ApproachF(&this->csCamEye.z, player->actor.world.pos.z - 30.0f + 160.0f + 300.0f - 90.0f, 0.05f,
Math_ApproachF(&this->subCamEye.y, player->actor.world.pos.y + 40.0f + 10.0f + 90.0f, 0.05f, 3.0f);
Math_ApproachF(&this->subCamEye.z, player->actor.world.pos.z - 30.0f + 160.0f + 300.0f - 90.0f, 0.05f,
3.0f);
Math_ApproachF(&this->unk_568, 90.0f, 0.05f, 3.0f);
}
Math_ApproachF(&this->csCamAt.x, this->csCamTargetAt.x, 0.5f, 100.0f);
Math_ApproachF(&this->csCamAt.y, this->csCamTargetAt.y + this->unk_568, 0.5f, 100.0f);
Math_ApproachF(&this->csCamAt.z, this->csCamTargetAt.z, 0.5f, 100.0f);
Math_ApproachF(&this->subCamAt.x, this->subCamAtNext.x, 0.5f, 100.0f);
Math_ApproachF(&this->subCamAt.y, this->subCamAtNext.y + this->unk_568, 0.5f, 100.0f);
Math_ApproachF(&this->subCamAt.z, this->subCamAtNext.z, 0.5f, 100.0f);
if (this->csTimer == 145) {
Camera* camera = Play_GetCamera(play, CAM_ID_MAIN);
Camera* mainCam = Play_GetCamera(play, CAM_ID_MAIN);
camera->eye = this->csCamEye;
camera->eyeNext = this->csCamEye;
camera->at = this->csCamAt;
mainCam->eye = this->subCamEye;
mainCam->eyeNext = this->subCamEye;
mainCam->at = this->subCamAt;
func_80169AFC(play, this->csCamId, 0);
func_80169AFC(play, this->subCamId, 0);
Cutscene_End(play, &play->csCtx);
func_800B7298(play, &this->actor, 6);
this->csCamId = 0;
this->subCamId = SUB_CAM_ID_DONE;
func_809E344C(this, play);
this->workTimer[WORK_TIMER_UNK1_A] = 50;
@@ -1395,22 +1395,22 @@ void Boss03_IntroCutscene(Boss03* this, PlayState* play) {
Matrix_RotateYS(this->actor.world.rot.y, MTXMODE_APPLY);
Matrix_RotateYF(sp5C, MTXMODE_APPLY);
Matrix_RotateXS(this->actor.world.rot.x, MTXMODE_APPLY);
Matrix_MultVecZ(100.0f, &this->csCamAt);
Matrix_MultVecZ(100.0f, &this->subCamAt);
this->csCamEye = this->actor.world.pos;
this->subCamEye = this->actor.world.pos;
for (i = 0; i < bubblesToSpawnNum; i++) {
effectPos.x = randPlusMinusPoint5Scaled(100.0f) + this->csCamAt.x;
effectPos.y = (randPlusMinusPoint5Scaled(100.0f) + this->csCamAt.y) - 150.0f;
effectPos.z = randPlusMinusPoint5Scaled(100.0f) + this->csCamAt.z;
effectPos.x = randPlusMinusPoint5Scaled(100.0f) + this->subCamAt.x;
effectPos.y = (randPlusMinusPoint5Scaled(100.0f) + this->subCamAt.y) - 150.0f;
effectPos.z = randPlusMinusPoint5Scaled(100.0f) + this->subCamAt.z;
Boss03_SpawnEffectBubble(play, &effectPos);
}
}
if (this->csCamId != 0) {
Play_CameraSetAtEye(play, this->csCamId, &this->csCamAt, &this->csCamEye);
Play_CameraSetFov(play, this->csCamId, this->cameraFov);
if (this->subCamId != SUB_CAM_ID_DONE) {
Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye);
Play_CameraSetFov(play, this->subCamId, this->subCamFov);
}
}
@@ -1435,7 +1435,7 @@ void Boss03_DeathCutscene(Boss03* this, PlayState* play) {
s32 pad;
f32 pad2;
f32 sp64;
Camera* camera = Play_GetCamera(play, CAM_ID_MAIN);
Camera* mainCam = Play_GetCamera(play, CAM_ID_MAIN);
Player* player;
f32 sp4C;
@@ -1450,9 +1450,9 @@ void Boss03_DeathCutscene(Boss03* this, PlayState* play) {
if (ActorCutscene_GetCurrentIndex() == -1) {
Cutscene_Start(play, &play->csCtx);
func_800B7298(play, &this->actor, 1);
this->csCamId = Play_CreateSubCamera(play);
this->subCamId = Play_CreateSubCamera(play);
Play_CameraChangeStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_CameraChangeStatus(play, this->csCamId, CAM_STATUS_ACTIVE);
Play_CameraChangeStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
this->unk_2BE = Math_FAtan2F(this->actor.world.pos.z, this->actor.world.pos.x);
// Player is above water && Player is standing on ground
@@ -1464,15 +1464,15 @@ void Boss03_DeathCutscene(Boss03* this, PlayState* play) {
case 1:
this->csTimer = 0;
this->csState = 2;
this->csCamEye.x = camera->eye.x;
this->csCamEye.y = camera->eye.y;
this->csCamEye.z = camera->eye.z;
this->csCamAt.x = camera->at.x;
this->csCamAt.y = camera->at.y;
this->csCamAt.z = camera->at.z;
this->subCamEye.x = mainCam->eye.x;
this->subCamEye.y = mainCam->eye.y;
this->subCamEye.z = mainCam->eye.z;
this->subCamAt.x = mainCam->at.x;
this->subCamAt.y = mainCam->at.y;
this->subCamAt.z = mainCam->at.z;
aux = this->csCamEye.x - this->actor.world.pos.x;
this->unk_568 = Math_Acot2F(this->csCamEye.z - this->actor.world.pos.z, aux);
aux = this->subCamEye.x - this->actor.world.pos.x;
this->unk_568 = Math_Acot2F(this->subCamEye.z - this->actor.world.pos.z, aux);
this->unk_570 = 0.0f;
this->unk_56C = 0.0f;
@@ -1482,26 +1482,26 @@ void Boss03_DeathCutscene(Boss03* this, PlayState* play) {
sp90.y = (50.0f * sp64) + 150.0f;
sp90.z = (400.0f * sp64) + 300.0f;
this->csCamTargetAt.x = this->actor.world.pos.x;
this->csCamTargetAt.y = this->actor.world.pos.y;
this->csCamTargetAt.z = this->actor.world.pos.z;
this->subCamAtNext.x = this->actor.world.pos.x;
this->subCamAtNext.y = this->actor.world.pos.y;
this->subCamAtNext.z = this->actor.world.pos.z;
this->unk_568 += this->unk_56C;
Matrix_RotateYF(this->unk_568, MTXMODE_NEW);
Matrix_MultVec3f(&sp90, &this->csCamTargetEye);
Matrix_MultVec3f(&sp90, &this->subCamEyeNext);
this->csCamTargetEye.x += this->actor.world.pos.x;
this->csCamTargetEye.y += this->waterHeight;
this->csCamTargetEye.z += this->actor.world.pos.z;
this->subCamEyeNext.x += this->actor.world.pos.x;
this->subCamEyeNext.y += this->waterHeight;
this->subCamEyeNext.z += this->actor.world.pos.z;
sp4C = 40.0f + aux2;
Math_ApproachF(&this->csCamEye.x, this->csCamTargetEye.x, 0.1f, sp4C);
Math_ApproachF(&this->csCamEye.y, this->csCamTargetEye.y, 0.1f, sp4C);
Math_ApproachF(&this->csCamEye.z, this->csCamTargetEye.z, 0.1f, sp4C);
Math_ApproachF(&this->subCamEye.x, this->subCamEyeNext.x, 0.1f, sp4C);
Math_ApproachF(&this->subCamEye.y, this->subCamEyeNext.y, 0.1f, sp4C);
Math_ApproachF(&this->subCamEye.z, this->subCamEyeNext.z, 0.1f, sp4C);
sp4C = 70.0f + aux2;
Math_ApproachF(&this->csCamAt.x, this->csCamTargetAt.x, 0.1f, sp4C);
Math_ApproachF(&this->csCamAt.y, this->csCamTargetAt.y, 0.1f, sp4C);
Math_ApproachF(&this->csCamAt.z, this->csCamTargetAt.z, 0.1f, sp4C);
Math_ApproachF(&this->subCamAt.x, this->subCamAtNext.x, 0.1f, sp4C);
Math_ApproachF(&this->subCamAt.y, this->subCamAtNext.y, 0.1f, sp4C);
Math_ApproachF(&this->subCamAt.z, this->subCamAtNext.z, 0.1f, sp4C);
}
break;
}
@@ -1622,12 +1622,12 @@ void Boss03_DeathCutscene(Boss03* this, PlayState* play) {
case 2:
Math_ApproachZeroF(&this->unk_56C, 1.0f, 0.0005f);
if (this->csTimer == 60) {
camera = Play_GetCamera(play, CAM_ID_MAIN);
camera->eye = this->csCamEye;
camera->eyeNext = this->csCamEye;
camera->at = this->csCamAt;
func_80169AFC(play, this->csCamId, 0);
this->csCamId = 0;
mainCam = Play_GetCamera(play, CAM_ID_MAIN);
mainCam->eye = this->subCamEye;
mainCam->eyeNext = this->subCamEye;
mainCam->at = this->subCamAt;
func_80169AFC(play, this->subCamId, 0);
this->subCamId = SUB_CAM_ID_DONE;
Cutscene_End(play, &play->csCtx);
func_800B7298(play, &this->actor, 6);
this->csState = 3;
@@ -1642,8 +1642,8 @@ void Boss03_DeathCutscene(Boss03* this, PlayState* play) {
break;
}
if (this->csCamId != 0) {
Play_CameraSetAtEye(play, this->csCamId, &this->csCamAt, &this->csCamEye);
if (this->subCamId != SUB_CAM_ID_DONE) {
Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye);
}
}
@@ -1664,9 +1664,9 @@ void Boss03_SpawnSmallFishesCutscene(Boss03* this, PlayState* play) {
if (ActorCutscene_GetCurrentIndex() == -1) {
Cutscene_Start(play, &play->csCtx);
func_800B7298(play, &this->actor, 1);
this->csCamId = Play_CreateSubCamera(play);
this->subCamId = Play_CreateSubCamera(play);
Play_CameraChangeStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_CameraChangeStatus(play, this->csCamId, CAM_STATUS_ACTIVE);
Play_CameraChangeStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
this->csState = 1;
this->unk_2BE = 0xBB8;
@@ -1691,11 +1691,11 @@ void Boss03_SpawnSmallFishesCutscene(Boss03* this, PlayState* play) {
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
MTXMODE_NEW);
Matrix_RotateYS(this->actor.shape.rot.y + this->unk_2BE, MTXMODE_APPLY);
Matrix_MultVecZ(340.0f, &this->csCamEye);
Matrix_MultVecZ(340.0f, &this->subCamEye);
this->csCamAt.x = this->actor.world.pos.x;
this->csCamAt.y = this->actor.world.pos.y;
this->csCamAt.z = this->actor.world.pos.z;
this->subCamAt.x = this->actor.world.pos.x;
this->subCamAt.y = this->actor.world.pos.y;
this->subCamAt.z = this->actor.world.pos.z;
Math_ApproachS(&this->unk_2BE, -4000, 10, 70);
@@ -1715,15 +1715,14 @@ void Boss03_SpawnSmallFishesCutscene(Boss03* this, PlayState* play) {
}
if (this->csTimer >= 150) {
Camera* camera;
Camera* mainCam = Play_GetCamera(play, CAM_ID_MAIN);
camera = Play_GetCamera(play, CAM_ID_MAIN);
camera->eye = this->csCamEye;
camera->eyeNext = this->csCamEye;
camera->at = this->csCamAt;
mainCam->eye = this->subCamEye;
mainCam->eyeNext = this->subCamEye;
mainCam->at = this->subCamAt;
func_80169AFC(play, this->csCamId, 0);
this->csCamId = 0;
func_80169AFC(play, this->subCamId, 0);
this->subCamId = SUB_CAM_ID_DONE;
Cutscene_End(play, &play->csCtx);
func_800B7298(play, &this->actor, 6);
@@ -1734,8 +1733,8 @@ void Boss03_SpawnSmallFishesCutscene(Boss03* this, PlayState* play) {
break;
}
if (this->csCamId != 0) {
Play_CameraSetAtEye(play, this->csCamId, &this->csCamAt, &this->csCamEye);
if (this->subCamId != SUB_CAM_ID_DONE) {
Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye);
}
}
+6 -6
View File
@@ -92,16 +92,16 @@ typedef struct Boss03 {
/* 0x52C */ f32 floppingAnimLastFrame;
/* 0x530 */ u32 csTimer;
/* 0x534 */ s16 csState;
/* 0x536 */ s16 csCamId;
/* 0x538 */ Vec3f csCamEye;
/* 0x544 */ Vec3f csCamAt;
/* 0x550 */ Vec3f csCamTargetEye;
/* 0x55C */ Vec3f csCamTargetAt;
/* 0x536 */ s16 subCamId;
/* 0x538 */ Vec3f subCamEye;
/* 0x544 */ Vec3f subCamAt;
/* 0x550 */ Vec3f subCamEyeNext;
/* 0x55C */ Vec3f subCamAtNext;
/* 0x568 */ f32 unk_568;
/* 0x56C */ f32 unk_56C;
/* 0x570 */ f32 unk_570; // set but not used
/* 0x574 */ UNK_TYPE1 unk_574[0x04];
/* 0x578 */ f32 cameraFov;
/* 0x578 */ f32 subCamFov;
} Boss03; // size = 0x57C
#define GYORG_PARAM_DEFAULT (0)
+40 -40
View File
@@ -259,19 +259,19 @@ void func_809EC568(Boss04* this, PlayState* play) {
this->unk_708 = 10;
this->unk_704 = 0;
Cutscene_Start(play, &play->csCtx);
this->unk_70A = Play_CreateSubCamera(play);
this->subCamId = Play_CreateSubCamera(play);
Play_CameraChangeStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_CameraChangeStatus(play, this->unk_70A, CAM_STATUS_ACTIVE);
Play_CameraChangeStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
func_800B7298(play, &this->actor, 7);
player->actor.world.pos.x = this->unk_6E8;
player->actor.world.pos.z = this->unk_6F0 + 410.0f;
player->actor.shape.rot.y = 0x7FFF;
player->actor.world.rot.y = player->actor.shape.rot.y;
Math_Vec3f_Copy(&this->unk_70C, &player->actor.world.pos);
this->unk_70C.y += 100.0f;
Math_Vec3f_Copy(&this->unk_718, &this->actor.world.pos);
Math_Vec3f_Copy(&this->subCamEye, &player->actor.world.pos);
this->subCamEye.y += 100.0f;
Math_Vec3f_Copy(&this->subCamAt, &this->actor.world.pos);
func_8016566C(150);
this->unk_744 = 60.0f;
this->subCamFov = 60.0f;
boss = play->actorCtx.actorLists[ACTORCAT_BOSS].first;
while (boss != NULL) {
@@ -293,7 +293,7 @@ void func_809EC568(Boss04* this, PlayState* play) {
}
this->unk_2D0 = 10000.0f;
this->unk_2C8 = 300;
Math_ApproachF(&this->unk_744, 20.0f, 0.3f, 11.0f);
Math_ApproachF(&this->subCamFov, 20.0f, 0.3f, 11.0f);
if (this->unk_704 == 40) {
this->unk_708 = 11;
this->unk_704 = 0;
@@ -319,9 +319,9 @@ void func_809EC568(Boss04* this, PlayState* play) {
case 12:
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_ME_ATTACK - SFX_FLAG);
Math_ApproachF(&this->unk_718.x, this->actor.world.pos.x, 0.5f, 1000.0f);
Math_ApproachF(&this->unk_718.y, this->actor.world.pos.y, 0.5f, 1000.0f);
Math_ApproachF(&this->unk_718.z, this->actor.world.pos.z, 0.5f, 1000.0f);
Math_ApproachF(&this->subCamAt.x, this->actor.world.pos.x, 0.5f, 1000.0f);
Math_ApproachF(&this->subCamAt.y, this->actor.world.pos.y, 0.5f, 1000.0f);
Math_ApproachF(&this->subCamAt.z, this->actor.world.pos.z, 0.5f, 1000.0f);
if (this->actor.bgCheckFlags & 2) {
play_sound(NA_SE_IT_BIG_BOMB_EXPLOSION);
this->unk_6F4 = 15;
@@ -331,22 +331,22 @@ void func_809EC568(Boss04* this, PlayState* play) {
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->actor.world.pos.x, this->actor.world.pos.y,
this->actor.world.pos.z, 0, 0, 0, CLEAR_TAG_SPLASH);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_KONB_JUMP_LEV_OLD - SFX_FLAG);
this->unk_748 = 20;
this->subCamAtOscillator = 20;
}
break;
case 1:
player->actor.shape.rot.y = 0x7FFF;
player->actor.world.rot.y = player->actor.shape.rot.y;
Matrix_MultVecZ(-100.0f, &this->unk_70C);
Matrix_MultVecZ(-100.0f, &this->subCamEye);
this->unk_70C.x += player->actor.world.pos.x;
this->unk_70C.y = Player_GetHeight(player) + player->actor.world.pos.y + 36.0f;
this->unk_70C.z += player->actor.world.pos.z;
this->subCamEye.x += player->actor.world.pos.x;
this->subCamEye.y = Player_GetHeight(player) + player->actor.world.pos.y + 36.0f;
this->subCamEye.z += player->actor.world.pos.z;
this->unk_718.x = player->actor.world.pos.x;
this->unk_718.y = (Player_GetHeight(player) + player->actor.world.pos.y) - 4.0f;
this->unk_718.z = player->actor.world.pos.z;
this->subCamAt.x = player->actor.world.pos.x;
this->subCamAt.y = (Player_GetHeight(player) + player->actor.world.pos.y) - 4.0f;
this->subCamAt.z = player->actor.world.pos.z;
if (this->unk_704 >= 35) {
this->unk_704 = 0;
@@ -357,13 +357,13 @@ void func_809EC568(Boss04* this, PlayState* play) {
case 2:
case 3:
Matrix_MultVecZ(500.0f, &this->unk_70C);
this->unk_70C.x += this->actor.world.pos.x;
this->unk_70C.y += this->actor.world.pos.y - 50.0f;
this->unk_70C.z += this->actor.world.pos.z;
this->unk_718.x = this->actor.world.pos.x;
this->unk_718.z = this->actor.world.pos.z;
this->unk_718.y = (this->actor.world.pos.y - 70.0f) + this->unk_728;
Matrix_MultVecZ(500.0f, &this->subCamEye);
this->subCamEye.x += this->actor.world.pos.x;
this->subCamEye.y += this->actor.world.pos.y - 50.0f;
this->subCamEye.z += this->actor.world.pos.z;
this->subCamAt.x = this->actor.world.pos.x;
this->subCamAt.z = this->actor.world.pos.z;
this->subCamAt.y = (this->actor.world.pos.y - 70.0f) + this->unk_728;
Math_ApproachZeroF(&this->unk_728, 0.05f, this->unk_73C);
Math_ApproachF(&this->unk_73C, 3.0f, 1.0f, 0.05f);
if (this->unk_704 == 20) {
@@ -379,15 +379,15 @@ void func_809EC568(Boss04* this, PlayState* play) {
}
if (this->unk_704 > 140) {
Camera* sp5C = Play_GetCamera(play, CAM_ID_MAIN);
Camera* mainCam = Play_GetCamera(play, CAM_ID_MAIN);
this->unk_708 = 0;
func_809ECD00(this, play);
sp5C->eye = this->unk_70C;
sp5C->eyeNext = this->unk_70C;
sp5C->at = this->unk_718;
func_80169AFC(play, this->unk_70A, 0);
this->unk_70A = 0;
mainCam->eye = this->subCamEye;
mainCam->eyeNext = this->subCamEye;
mainCam->at = this->subCamAt;
func_80169AFC(play, this->subCamId, 0);
this->subCamId = SUB_CAM_ID_DONE;
Cutscene_End(play, &play->csCtx);
func_800B7298(play, &this->actor, 6);
func_80165690();
@@ -396,18 +396,18 @@ void func_809EC568(Boss04* this, PlayState* play) {
break;
}
if (this->unk_70A != 0) {
Vec3f sp50;
if (this->subCamId != SUB_CAM_ID_DONE) {
Vec3f subCamAt;
ShrinkWindow_SetLetterboxTarget(27);
if (this->unk_748 != 0) {
this->unk_748--;
if (this->subCamAtOscillator != 0) {
this->subCamAtOscillator--;
}
Math_Vec3f_Copy(&sp50, &this->unk_718);
sp50.y += Math_SinS(this->unk_748 * 0x4000) * this->unk_748 * 1.5f;
Play_CameraSetAtEye(play, this->unk_70A, &sp50, &this->unk_70C);
Play_CameraSetFov(play, this->unk_70A, this->unk_744);
Math_ApproachF(&this->unk_744, 60.0f, 0.1f, 1.0f);
Math_Vec3f_Copy(&subCamAt, &this->subCamAt);
subCamAt.y += Math_SinS(this->subCamAtOscillator * 0x4000) * this->subCamAtOscillator * 1.5f;
Play_CameraSetAtEye(play, this->subCamId, &subCamAt, &this->subCamEye);
Play_CameraSetFov(play, this->subCamId, this->subCamFov);
Math_ApproachF(&this->subCamFov, 60.0f, 0.1f, 1.0f);
}
this->actor.shape.rot.y = this->actor.yawTowardsPlayer;
x = player->actor.world.pos.x - this->actor.world.pos.x;
+5 -5
View File
@@ -63,16 +63,16 @@ typedef struct Boss04 {
/* 0x700 */ f32 unk_700;
/* 0x704 */ u32 unk_704;
/* 0x708 */ s16 unk_708;
/* 0x70A */ s16 unk_70A;
/* 0x70C */ Vec3f unk_70C;
/* 0x718 */ Vec3f unk_718;
/* 0x70A */ s16 subCamId;
/* 0x70C */ Vec3f subCamEye;
/* 0x718 */ Vec3f subCamAt;
/* 0x724 */ UNK_TYPE1 unk_724[4];
/* 0x728 */ f32 unk_728;
/* 0x72C */ UNK_TYPE1 unk_72C[0x10];
/* 0x73C */ f32 unk_73C;
/* 0x740 */ UNK_TYPE1 unk_740[4];
/* 0x744 */ f32 unk_744;
/* 0x748 */ s16 unk_748;
/* 0x744 */ f32 subCamFov;
/* 0x748 */ s16 subCamAtOscillator;
/* 0x74A */ u8 unk_74A;
} Boss04; // size = 0x74C
+37 -37
View File
@@ -200,9 +200,9 @@ void func_809F24C8(Boss06* this, PlayState* play) {
Cutscene_Start(play, &play->csCtx);
func_800B7298(play, &this->actor, 7);
this->unk_A00 = Play_CreateSubCamera(play);
this->subCamId = Play_CreateSubCamera(play);
Play_CameraChangeStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_CameraChangeStatus(play, this->unk_A00, CAM_STATUS_ACTIVE);
Play_CameraChangeStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
D_809F4970->unk_151 = 1;
this->unk_1C9 = 1;
this->unk_1C8 = 1;
@@ -244,26 +244,26 @@ void func_809F24C8(Boss06* this, PlayState* play) {
player->actor.world.rot.y = player->actor.shape.rot.y;
}
this->unk_A04.x = player->actor.world.pos.x + 20.0f;
this->unk_A04.y = player->actor.world.pos.y + 20.0f;
this->unk_A04.z = player->actor.world.pos.z + 30.0f;
this->subCamEye.x = player->actor.world.pos.x + 20.0f;
this->subCamEye.y = player->actor.world.pos.y + 20.0f;
this->subCamEye.z = player->actor.world.pos.z + 30.0f;
this->unk_A10.x = player->actor.world.pos.x;
this->unk_A10.y = player->actor.world.pos.y + 26.0f;
this->unk_A10.z = player->actor.world.pos.z;
this->subCamAt.x = player->actor.world.pos.x;
this->subCamAt.y = player->actor.world.pos.y + 26.0f;
this->subCamAt.z = player->actor.world.pos.z;
if (this->unk_1CA >= 75) {
temp_v0_2 = play->actorCtx.actorLists[ACTORCAT_BOSS].first;
while (temp_v0_2 != NULL) {
if ((temp_v0_2->id == ACTOR_EN_KNIGHT) && (&D_809F4970->actor == temp_v0_2) &&
(D_809F4970->unk_680 != 0)) {
this->unk_A04.x = 1307.0f;
this->unk_A04.y = 142.0f;
this->unk_A04.z = 2897.0f;
this->subCamEye.x = 1307.0f;
this->subCamEye.y = 142.0f;
this->subCamEye.z = 2897.0f;
this->unk_A10.x = 1376.0f;
this->unk_A10.y = 132.0f;
this->unk_A10.z = 2860.0f;
this->subCamAt.x = 1376.0f;
this->subCamAt.y = 132.0f;
this->subCamAt.z = 2860.0f;
if (this->unk_1CA == 75) {
D_809F4970->unk_148 = 1;
@@ -291,25 +291,25 @@ void func_809F24C8(Boss06* this, PlayState* play) {
this->actor.world.pos.y - 200.0f, this->actor.world.pos.z - 170.0f, 15, 0, 0, 1);
if (ENBOSS06_GET_PARAMS(&this->actor) == 0) {
this->unk_A04.x = this->actor.world.pos.x - 200.0f;
this->subCamEye.x = this->actor.world.pos.x - 200.0f;
} else {
this->unk_A04.x = this->actor.world.pos.x + 200.0f;
this->subCamEye.x = this->actor.world.pos.x + 200.0f;
}
this->unk_A04.y = (this->actor.world.pos.y - 200.0f) + 100.0f;
this->unk_A04.z = this->actor.world.pos.z - 200.0f;
this->subCamEye.y = (this->actor.world.pos.y - 200.0f) + 100.0f;
this->subCamEye.z = this->actor.world.pos.z - 200.0f;
this->unk_A10.x = this->actor.world.pos.x;
this->unk_A10.y = this->actor.world.pos.y + 80.0f;
this->unk_A10.z = this->actor.world.pos.z;
this->subCamAt.x = this->actor.world.pos.x;
this->subCamAt.y = this->actor.world.pos.y + 80.0f;
this->subCamAt.z = this->actor.world.pos.z;
}
} else {
this->unk_A10.z = this->actor.world.pos.z;
this->unk_A04.y = this->actor.world.pos.y + 60.0f;
this->unk_A04.x = this->actor.world.pos.x;
this->subCamEye.x = this->actor.world.pos.x;
this->subCamEye.y = this->actor.world.pos.y + 60.0f;
this->subCamEye.z = this->actor.world.pos.z - 210.0f;
this->unk_A04.z = this->actor.world.pos.z - 210.0f;
this->unk_A10.y = this->actor.world.pos.y + 80.0f;
this->unk_A10.x = this->actor.world.pos.x;
this->subCamAt.x = this->actor.world.pos.x;
this->subCamAt.y = this->actor.world.pos.y + 80.0f;
this->subCamAt.z = this->actor.world.pos.z;
}
break;
@@ -317,20 +317,20 @@ void func_809F24C8(Boss06* this, PlayState* play) {
child = this->actor.child;
if (this->unk_1CA == 1) {
this->unk_A1C.x = fabsf(this->unk_A10.x - child->world.pos.x);
this->unk_A1C.y = fabsf(this->unk_A10.y - child->world.pos.y);
this->unk_A1C.z = fabsf(this->unk_A10.z - child->world.pos.z);
this->unk_A1C.x = fabsf(this->subCamAt.x - child->world.pos.x);
this->unk_A1C.y = fabsf(this->subCamAt.y - child->world.pos.y);
this->unk_A1C.z = fabsf(this->subCamAt.z - child->world.pos.z);
}
Math_ApproachF(&this->unk_A10.x, child->world.pos.x, 0.15f, this->unk_A1C.x * this->unk_A28);
Math_ApproachF(&this->unk_A10.y, child->world.pos.y, 0.15f, this->unk_A1C.y * this->unk_A28);
Math_ApproachF(&this->unk_A10.z, child->world.pos.z, 0.15f, this->unk_A1C.z * this->unk_A28);
Math_ApproachF(&this->subCamAt.x, child->world.pos.x, 0.15f, this->unk_A1C.x * this->unk_A28);
Math_ApproachF(&this->subCamAt.y, child->world.pos.y, 0.15f, this->unk_A1C.y * this->unk_A28);
Math_ApproachF(&this->subCamAt.z, child->world.pos.z, 0.15f, this->unk_A1C.z * this->unk_A28);
Math_ApproachF(&this->unk_A28, 1.0f, 1.0f, 0.001f);
if (this->unk_1CA > 80) {
func_809F2ED0(this, play);
func_80169AFC(play, this->unk_A00, 0);
this->unk_A00 = 0;
func_80169AFC(play, this->subCamId, 0);
this->subCamId = SUB_CAM_ID_DONE;
Cutscene_End(play, &play->csCtx);
func_800B7298(play, &this->actor, 6);
D_809F4970->unk_151 = 0;
@@ -338,9 +338,9 @@ void func_809F24C8(Boss06* this, PlayState* play) {
break;
}
if (this->unk_A00 != 0) {
if (this->subCamId != SUB_CAM_ID_DONE) {
ShrinkWindow_SetLetterboxTarget(27);
Play_CameraSetAtEye(play, this->unk_A00, &this->unk_A10, &this->unk_A04);
Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye);
}
}
#else
+3 -3
View File
@@ -42,9 +42,9 @@ typedef struct Boss06 {
/* 0x1FE */ u8 unk_1FE;
/* 0x1FF */ u8 unk_1FF;
/* 0x200 */ u8 unk_200[0x800];
/* 0xA00 */ s16 unk_A00;
/* 0xA04 */ Vec3f unk_A04;
/* 0xA10 */ Vec3f unk_A10;
/* 0xA00 */ s16 subCamId;
/* 0xA04 */ Vec3f subCamEye;
/* 0xA10 */ Vec3f subCamAt;
/* 0xA1C */ Vec3f unk_A1C;
/* 0xA28 */ f32 unk_A28;
/* 0xA2C */ f32 unk_A2C;
@@ -608,7 +608,7 @@ void func_808A1B48(DoorShutter* this, PlayState* play) {
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, 45.0f, 10, 8.0f, 500, 10, 0);
}
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_BIGWALL_BOUND);
quake = Quake_Add(Play_GetCamera(play, 0), 3);
quake = Quake_Add(Play_GetCamera(play, CAM_ID_MAIN), 3);
Quake_SetSpeed(quake, -32536);
Quake_SetQuakeValues(quake, 2, 0, 0, 0);
Quake_SetCountdown(quake, 10);
+2 -2
View File
@@ -332,7 +332,7 @@ s32 func_80BDE7FC(EnAl* this, PlayState* play) {
case 6:
case 8:
if ((this->actor.child != NULL) && (this->actor.child->update != NULL)) {
Camera_SetTargetActor(Play_GetCamera(play, ActorCutscene_GetCurrentCamera(sp2A)), this->actor.child);
Camera_SetTargetActor(Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(sp2A)), this->actor.child);
}
this->unk_4E6++;
sp20 = true;
@@ -342,7 +342,7 @@ s32 func_80BDE7FC(EnAl* this, PlayState* play) {
case 3:
case 5:
case 7:
Camera_SetTargetActor(Play_GetCamera(play, ActorCutscene_GetCurrentCamera(sp2A)), &this->actor);
Camera_SetTargetActor(Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(sp2A)), &this->actor);
this->unk_4E6++;
sp20 = true;
break;
+1 -1
View File
@@ -308,7 +308,7 @@ void EnAni_Update(Actor* thisx, PlayState* play) {
} else if (ActorCutscene_GetCanPlayNext(this->actor.cutscene)) {
ActorCutscene_StartAndSetUnkLinkFields(this->actor.cutscene, &this->actor);
this->actor.cutscene = ActorCutscene_GetAdditionalCutscene(this->actor.cutscene);
Camera_SetToTrackActor(Play_GetCamera(play, ActorCutscene_GetCurrentCamera(this->actor.cutscene)),
Camera_SetToTrackActor(Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(this->actor.cutscene)),
&this->actor);
} else {
ActorCutscene_SetIntentToPlay(this->actor.cutscene);
@@ -113,9 +113,9 @@ void EnBigokuta_Init(Actor* thisx, PlayState* play) {
EnBigokuta_SetupIdle(this);
}
this->camAt.x = (Math_SinS(this->actor.home.rot.y) * 66.0f) + this->actor.world.pos.x;
this->camAt.y = (this->actor.home.pos.y - 49.5f) + 42.899998f;
this->camAt.z = (Math_CosS(this->actor.home.rot.y) * 66.0f) + this->actor.world.pos.z;
this->subCamAt.x = (Math_SinS(this->actor.home.rot.y) * 66.0f) + this->actor.world.pos.x;
this->subCamAt.y = (this->actor.home.pos.y - 49.5f) + 42.899998f;
this->subCamAt.z = (Math_CosS(this->actor.home.rot.y) * 66.0f) + this->actor.world.pos.z;
this->unkFunc = func_80AC2B4C; // set but never called
}
@@ -127,40 +127,40 @@ void EnBigokuta_Destroy(Actor* thisx, PlayState* play) {
Collider_DestroyCylinder(play, &this->bodyCollider);
}
void EnBigokuta_SetupCutsceneCamera(EnBigokuta* this, PlayState* play, Vec3f* at, Vec3f* eye) {
void EnBigokuta_SetupCutsceneCamera(EnBigokuta* this, PlayState* play, Vec3f* subCamAt, Vec3f* subCamEye) {
s16 angle;
ActorCutscene_Start(this->actor.cutscene, &this->actor);
this->camId = ActorCutscene_GetCurrentCamera(this->actor.cutscene);
Play_CameraSetAtEye(play, this->camId, at, eye);
this->subCamId = ActorCutscene_GetCurrentSubCamId(this->actor.cutscene);
Play_CameraSetAtEye(play, this->subCamId, subCamAt, subCamEye);
angle = BINANG_SUB(Actor_YawToPoint(&this->actor, eye), this->actor.home.rot.y);
angle = BINANG_SUB(Actor_YawToPoint(&this->actor, subCamEye), this->actor.home.rot.y);
if (angle > 0) {
angle = BINANG_ADD(this->actor.home.rot.y, 0x1800);
} else {
angle = BINANG_SUB(this->actor.home.rot.y, 0x1800);
}
this->camEye.x = (Math_SinS(angle) * 250.0f) + this->camAt.x;
this->camEye.y = this->camAt.y + 100.0f;
this->camEye.z = (Math_CosS(angle) * 250.0f) + this->camAt.z;
this->subCamEye.x = (Math_SinS(angle) * 250.0f) + this->subCamAt.x;
this->subCamEye.y = this->subCamAt.y + 100.0f;
this->subCamEye.z = (Math_CosS(angle) * 250.0f) + this->subCamAt.z;
}
void EnBigokuta_MoveCamera(EnBigokuta* this, PlayState* play) {
Camera* camera = Play_GetCamera(play, this->camId);
Camera* subCam = Play_GetCamera(play, this->subCamId);
Math_Vec3f_StepTo(&camera->eye, &this->camEye, 20.0f);
Math_Vec3f_StepTo(&camera->at, &this->camAt, 20.0f);
Play_CameraSetAtEye(play, this->camId, &camera->at, &camera->eye);
Math_Vec3f_StepTo(&subCam->eye, &this->subCamEye, 20.0f);
Math_Vec3f_StepTo(&subCam->at, &this->subCamAt, 20.0f);
Play_CameraSetAtEye(play, this->subCamId, &subCam->at, &subCam->eye);
}
void EnBigokuta_ResetCamera(EnBigokuta* this, PlayState* play) {
Camera* camera;
Camera* subCam;
if (this->camId != 0) {
camera = Play_GetCamera(play, this->camId);
Play_CameraSetAtEye(play, 0, &camera->at, &camera->eye);
this->camId = 0;
if (this->subCamId != SUB_CAM_ID_DONE) {
subCam = Play_GetCamera(play, this->subCamId);
Play_CameraSetAtEye(play, CAM_ID_MAIN, &subCam->at, &subCam->eye);
this->subCamId = SUB_CAM_ID_DONE;
ActorCutscene_Stop(this->actor.cutscene);
}
}
@@ -267,12 +267,12 @@ void EnBigokuta_IdleAboveWater(EnBigokuta* this, PlayState* play) {
void EnBigokuta_UpdateOrSetupCam(EnBigokuta* this, PlayState* play) {
if (this->actor.cutscene != -1) {
if (this->camId != 0) {
if (this->subCamId != SUB_CAM_ID_DONE) {
EnBigokuta_MoveCamera(this, play);
} else if (ActorCutscene_GetCanPlayNext(this->actor.cutscene)) {
Camera* camera = Play_GetCamera(play, 0);
Camera* mainCam = Play_GetCamera(play, CAM_ID_MAIN);
EnBigokuta_SetupCutsceneCamera(this, play, &camera->at, &camera->eye);
EnBigokuta_SetupCutsceneCamera(this, play, &mainCam->at, &mainCam->eye);
} else {
ActorCutscene_SetIntentToPlay(this->actor.cutscene);
}
@@ -39,7 +39,7 @@ typedef struct EnBigokuta {
/* 0x18C */ EnBigokutaActionFunc actionFunc;
/* 0x190 */ u8 drawDmgEffType;
/* 0x192 */ s16 timer;
/* 0x194 */ s16 camId;
/* 0x194 */ s16 subCamId;
/* 0x196 */ s16 cutscene;
/* 0x198 */ Vec3s jointTable[BIGOKUTA_LIMB_MAX];
/* 0x210 */ Vec3s morphTable[BIGOKUTA_LIMB_MAX];
@@ -48,8 +48,8 @@ typedef struct EnBigokuta {
/* 0x290 */ f32 drawDmgEffFrozenSteamScale; // only affects DRAWEFFECT_ICE
/* 0x294 */ Vec3f playerPos;
/* 0x2A0 */ Vec3f playerHoldPos;
/* 0x2AC */ Vec3f camAt;
/* 0x2B8 */ Vec3f camEye;
/* 0x2AC */ Vec3f subCamAt;
/* 0x2B8 */ Vec3f subCamEye;
/* 0x2C4 */ Vec3f limbPos[13];
/* 0x360 */ ColliderCylinder shellCollider;
/* 0x3AC */ ColliderCylinder bodyCollider;
+10 -11
View File
@@ -271,14 +271,14 @@ void EnBigpo_UpdateSpin(EnBigpo* this) {
void EnBigpo_LowerCutsceneSubCamera(EnBigpo* this, PlayState* play) {
Camera* subCam;
if (this->cutsceneSubCamId != CAM_ID_MAIN) {
subCam = Play_GetCamera(play, this->cutsceneSubCamId);
if (this->subCamId != SUB_CAM_ID_DONE) {
subCam = Play_GetCamera(play, this->subCamId);
subCam->eye.y -= this->actor.velocity.y;
if (this->actor.velocity.y > 0.0f) {
subCam->eye.x -= 1.5f * Math_SinS(this->actor.yawTowardsPlayer);
subCam->eye.z -= 1.5f * Math_CosS(this->actor.yawTowardsPlayer);
}
Play_CameraSetAtEye(play, this->cutsceneSubCamId, &this->actor.focus.pos, &subCam->eye);
Play_CameraSetAtEye(play, this->subCamId, &this->actor.focus.pos, &subCam->eye);
}
}
@@ -303,7 +303,7 @@ void EnBigpo_WaitCutsceneQueue(EnBigpo* this, PlayState* play) {
if (ActorCutscene_GetCanPlayNext(this->actor.cutscene)) {
ActorCutscene_Start(this->actor.cutscene, &this->actor);
func_800B724C(play, &this->actor, 7);
this->cutsceneSubCamId = ActorCutscene_GetCurrentCamera(this->actor.cutscene);
this->subCamId = ActorCutscene_GetCurrentSubCamId(this->actor.cutscene);
if (this->actor.params == ENBIGPO_REGULAR) { // and SUMMONED, got switched earlier
EnBigpo_SpawnCutsceneStage1(this, play);
} else { // ENBIGPO_REVEALEDFIRE
@@ -332,13 +332,13 @@ void EnBigpo_SpawnCutsceneStage1(EnBigpo* this, PlayState* play) {
this->actor.scale.y = 0.015f;
this->actor.scale.z = 0.0f;
if (this->cutsceneSubCamId != CAM_ID_MAIN) {
if (this->subCamId != SUB_CAM_ID_DONE) {
Vec3f subCamEye;
subCamEye.x = ((this->actor.world.pos.x - this->fires[0].pos.x) * 1.8f) + this->actor.world.pos.x;
subCamEye.y = this->actor.world.pos.y + 150.0f;
subCamEye.z = ((this->actor.world.pos.z - this->fires[0].pos.z) * 1.8f) + this->actor.world.pos.z;
Play_CameraSetAtEye(play, this->cutsceneSubCamId, &this->actor.focus.pos, &subCamEye);
Play_CameraSetAtEye(play, this->subCamId, &this->actor.focus.pos, &subCamEye);
}
this->actionFunc = EnBigpo_SpawnCutsceneStage2;
}
@@ -459,9 +459,9 @@ void EnBigpo_SpawnCutsceneStage8(EnBigpo* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
this->idleTimer--;
if (this->idleTimer == 0) {
subCam = Play_GetCamera(play, this->cutsceneSubCamId);
subCam = Play_GetCamera(play, this->subCamId);
Play_CameraSetAtEye(play, CAM_ID_MAIN, &subCam->at, &subCam->eye);
this->cutsceneSubCamId = CAM_ID_MAIN;
this->subCamId = SUB_CAM_ID_DONE;
if (this->actor.params == ENBIGPO_SUMMONED) {
dampe = SubS_FindActor(play, NULL, ACTORCAT_NPC, ACTOR_EN_TK);
if (dampe != NULL) {
@@ -953,12 +953,11 @@ void EnBigpo_SetupFlameCirclePositions(EnBigpo* this, PlayState* play) {
EnBigpo_SetupFlameCircleCutscene(firePo);
}
// Setup sub camera
if (this->cutsceneSubCamId != CAM_ID_MAIN) {
if (this->subCamId != SUB_CAM_ID_DONE) {
subCamEye.x = (Math_SinS(this->actor.yawTowardsPlayer) * 360.0f) + this->actor.world.pos.x;
subCamEye.y = this->actor.world.pos.y + 150.0f;
subCamEye.z = (Math_CosS(this->actor.yawTowardsPlayer) * 360.0f) + this->actor.world.pos.z;
Play_CameraSetAtEye(play, this->cutsceneSubCamId, &this->actor.focus.pos, &subCamEye);
Play_CameraSetAtEye(play, this->subCamId, &this->actor.focus.pos, &subCamEye);
}
this->actionFunc = EnBigpo_DoNothing;
@@ -35,7 +35,7 @@ typedef struct EnBigpo {
/* 0x208 */ s16 unk208; // facing rotY?
/* 0x20A */ s16 rotVelocity;
/* 0x20C */ s16 unk20C; // is this counting the number of frames the player is ztargeting them?
/* 0x20E */ s16 cutsceneSubCamId;
/* 0x20E */ s16 subCamId;
/* 0x210 */ s16 switchFlags;
/* 0x212 */ s16 hoverHeightCycleTimer; // sin wave up and down bobbing
/* 0x214 */ f32 fireRadius; // distance from center during conjunction cutscene
@@ -842,10 +842,10 @@ void EnBigslime_UpdateCameraFormingBigslime(EnBigslime* this, PlayState* play) {
void EnBigslime_EndCutscene(EnBigslime* this, PlayState* play) {
Camera* subCam;
if (this->subCamId != CAM_ID_MAIN) {
if (this->subCamId != SUB_CAM_ID_DONE) {
subCam = Play_GetCamera(play, this->subCamId);
Play_CameraSetAtEye(play, CAM_ID_MAIN, &subCam->at, &subCam->eye);
this->subCamId = CAM_ID_MAIN;
this->subCamId = SUB_CAM_ID_DONE;
ActorCutscene_Stop(this->cutscene);
this->cutscene = ActorCutscene_GetAdditionalCutscene(this->actor.cutscene);
func_800B724C(play, &this->actor, 6);
@@ -1018,7 +1018,7 @@ void EnBigslime_SetupMoveOnCeiling(EnBigslime* this) {
this->actor.gravity = 0.0f;
this->actor.velocity.y = 20.0f;
if (this->subCamId != CAM_ID_MAIN) {
if (this->subCamId != SUB_CAM_ID_DONE) {
this->actor.speedXZ = 0.0f;
this->ceilingMoveTimer = 20;
} else {
@@ -1042,7 +1042,7 @@ void EnBigslime_MoveOnCeiling(EnBigslime* this, PlayState* play) {
EnBigslime_Scale(this, pitch, 0.04f, 0.04f);
EnBigslime_UpdateWavySurface(this);
if (this->subCamId != CAM_ID_MAIN) {
if (this->subCamId != SUB_CAM_ID_DONE) {
if (this->ceilingMoveTimer == 0) {
EnBigslime_EndCutscene(this, play);
this->ceilingMoveTimer = 320;
@@ -2545,7 +2545,7 @@ void EnBigslime_PlayCutscene(EnBigslime* this, PlayState* play) {
func_800B724C(play, &this->actor, 7);
}
this->subCamId = ActorCutscene_GetCurrentCamera(this->cutscene);
this->subCamId = ActorCutscene_GetCurrentSubCamId(this->cutscene);
if (this->actor.colChkInfo.health == 0) {
EnBigslime_SetupCutsceneDefeat(this, play);
} else if ((this->actionFuncStored == EnBigslime_DamageGekko) ||
@@ -248,7 +248,7 @@ void func_809C4DA4(EnBomBowlMan* this, PlayState* play) {
case 0:
this->unk_2C0 = 1;
D_809C6104 = 1;
Camera_SetTargetActor(Play_GetCamera(play, ActorCutscene_GetCurrentCamera(this->unk_2D0)),
Camera_SetTargetActor(Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(this->unk_2D0)),
&this->unk_2D8[0]->actor);
this->unk_2D4 = 0;
this->unk_2BC = 10;
@@ -550,7 +550,7 @@ void func_809C5BA0(EnBomBowlMan* this) {
void func_809C5BF4(EnBomBowlMan* this, PlayState* play) {
f32 sp2C = this->skelAnime.curFrame;
s32 sp28;
s32 subCam;
if ((D_809C6104 != 0) && (this->unk_2F8 != 15)) {
func_809C493C(this, 15, 1.0f);
@@ -571,13 +571,13 @@ void func_809C5BF4(EnBomBowlMan* this, PlayState* play) {
}
if (this->unk_2F4 == 0) {
sp28 = Play_GetCamera(play, ActorCutscene_GetCurrentCamera(this->unk_2D2));
subCam = Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(this->unk_2D2));
if (D_809C6100 > 5) {
Player* player = GET_PLAYER(play);
func_801477B4(play);
Camera_SetTargetActor(sp28, &this->unk_2D8[0]->actor);
Camera_SetTargetActor(subCam, &this->unk_2D8[0]->actor);
func_809C493C(this, 13, 1.0f);
D_809C6100 = 0;
if (player->transformation == PLAYER_FORM_HUMAN) {
@@ -592,7 +592,7 @@ void func_809C5BF4(EnBomBowlMan* this, PlayState* play) {
} else {
s32 idx = D_809C6100 - 1;
Camera_SetTargetActor(sp28, &this->unk_2D8[1 + idx]->actor);
Camera_SetTargetActor(subCam, &this->unk_2D8[1 + idx]->actor);
}
}
}
@@ -588,13 +588,13 @@ void EnClearTag_UpdateCamera(EnClearTag* this, PlayState* play) {
Cutscene_End(play, &play->csCtx);
func_800B7298(play, &this->actor, 6);
this->cameraState = 0;
this->subCamId = CAM_ID_MAIN;
this->subCamId = SUB_CAM_ID_DONE;
this->activeTimer = 20;
}
break;
}
if (this->subCamId != CAM_ID_MAIN) {
if (this->subCamId != SUB_CAM_ID_DONE) {
Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye);
}
}
@@ -362,11 +362,11 @@ void func_8089A9B0(EnDinofos* this, PlayState* play) {
}
void func_8089ABF4(EnDinofos* this, PlayState* play) {
if (this->subCamId != CAM_ID_MAIN) {
if (this->subCamId != SUB_CAM_ID_DONE) {
Camera* subCam = Play_GetCamera(play, this->subCamId);
Play_CameraSetAtEye(play, CAM_ID_MAIN, &subCam->at, &subCam->eye);
this->subCamId = CAM_ID_MAIN;
this->subCamId = SUB_CAM_ID_DONE;
ActorCutscene_Stop(this->actor.cutscene);
if (this->actor.colChkInfo.health == 0) {
func_800B724C(play, &this->actor, 6);
@@ -1210,7 +1210,7 @@ void func_8089D318(EnDinofos* this, PlayState* play) {
} else {
ActorCutscene_StartAndSetUnkLinkFields(this->actor.cutscene, &this->actor);
}
this->subCamId = ActorCutscene_GetCurrentCamera(this->actor.cutscene);
this->subCamId = ActorCutscene_GetCurrentSubCamId(this->actor.cutscene);
if (this->actor.colChkInfo.health == 0) {
subCamEye.x = (Math_SinS(this->actor.shape.rot.y) * 150.0f) + this->actor.focus.pos.x;
subCamEye.y = this->actor.focus.pos.y;
+41 -40
View File
@@ -445,11 +445,11 @@ void EnDragon_Extend(EnDragon* this, PlayState* play) {
}
}
void EnDragon_CameraSetAtEye(EnDragon* this, PlayState* play, Vec3f eye, Vec3f at) {
this->cameraId = ActorCutscene_GetCurrentCamera(this->actor.cutscene);
Math_Vec3f_Copy(&this->cameraEye, &eye);
Math_Vec3f_Copy(&this->cameraAt, &at);
Play_CameraSetAtEye(play, this->cameraId, &this->cameraAt, &this->cameraEye);
void EnDragon_SetSubCamEyeAt(EnDragon* this, PlayState* play, Vec3f subCamEye, Vec3f subCamAt) {
this->subCamId = ActorCutscene_GetCurrentSubCamId(this->actor.cutscene);
Math_Vec3f_Copy(&this->subCamEye, &subCamEye);
Math_Vec3f_Copy(&this->subCamAt, &subCamAt);
Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye);
}
void EnDragon_SetupGrab(EnDragon* this, PlayState* play) {
@@ -476,12 +476,12 @@ void EnDragon_SetupGrab(EnDragon* this, PlayState* play) {
}
}
static Vec3f sCameraEyePerPython[] = {
static Vec3f sSubCamEyePerPython[] = {
{ 1600.0f, 0.0f, 1400.0f }, { 1400.0f, 0.0f, 400.0f }, { 1800.0f, 0.0f, 1400.f }, { 1100.0f, -200.0f, 1500.0f },
{ 2000.0f, 0.0f, 1500.0f }, { 1900.0f, 0.0f, 1800.0f }, { 1700.0f, 0.0f, 1100.0f }, { 1700.0f, 0.0f, 1100.0f },
};
static Vec3f sCameraAtPerPython[] = {
static Vec3f sSubCamAtPerPython[] = {
{ 300.0f, -100.0f, 1300.0f }, { 1500.0f, 0.0f, 2400.0f }, { 300.0f, -100.0f, 1300.0f }, { 1900.0f, 500.0f, 600.0f },
{ -1000.0f, 0.0f, 1000.0f }, { 1200.0f, 0.0f, 1500.0f }, { 1100.0f, 0.0f, 2000.0f }, { 1100.0f, 0.0f, 2000.0f },
};
@@ -492,10 +492,10 @@ static s32 sMaxGrabTimerPerPython[] = { 5, 5, 5, 4, 5, 8, 5, 5 };
void EnDragon_Grab(EnDragon* this, PlayState* play) {
Player* player = GET_PLAYER(play);
Vec3f sp50; // used as both the extended position and the camera eye
Vec3f at;
Vec3f pos; // used as both the extended position and the camera eye
Vec3f subCamAt;
this->cameraId = ActorCutscene_GetCurrentCamera(this->actor.cutscene);
this->subCamId = ActorCutscene_GetCurrentSubCamId(this->actor.cutscene);
SkelAnime_Update(&this->skelAnime);
if (this->grabTimer == 0) {
@@ -507,10 +507,10 @@ void EnDragon_Grab(EnDragon* this, PlayState* play) {
Math_Vec3f_Copy(&player->actor.world.pos, &this->playerGrabPositionTemp);
}
Math_Vec3f_Copy(&sp50, &this->burrowEntrancePos);
sp50.x += Math_SinS(this->actor.world.rot.y) * -930.0f;
sp50.z += Math_CosS(this->actor.world.rot.y) * -930.0f;
Math_Vec3f_Copy(&this->actor.world.pos, &sp50);
Math_Vec3f_Copy(&pos, &this->burrowEntrancePos);
pos.x += Math_SinS(this->actor.world.rot.y) * -930.0f;
pos.z += Math_CosS(this->actor.world.rot.y) * -930.0f;
Math_Vec3f_Copy(&this->actor.world.pos, &pos);
this->jawZRotation = 0x1450;
this->actor.speedXZ = 60.0f;
}
@@ -519,17 +519,18 @@ void EnDragon_Grab(EnDragon* this, PlayState* play) {
Math_SmoothStepToS(&this->actor.shape.rot.z, sZRotPerPython[this->pythonIndex], 0xA, 0x1F4, 0x14);
EnDragon_SpawnBubbles(this, play, this->jawPos);
Math_Vec3f_Copy(&sp50, &this->burrowEntrancePos);
sp50.x += Math_SinS(this->actor.world.rot.y) * sCameraEyePerPython[this->pythonIndex].x;
sp50.y += sCameraEyePerPython[this->pythonIndex].y;
sp50.z += Math_CosS(this->actor.world.rot.y) * sCameraEyePerPython[this->pythonIndex].z;
Math_Vec3f_Copy(&pos, &this->burrowEntrancePos);
Math_Vec3f_Copy(&at, &this->actor.world.pos);
at.x += Math_SinS(this->actor.world.rot.y) * sCameraAtPerPython[this->pythonIndex].x;
at.y += sCameraAtPerPython[this->pythonIndex].y;
at.z += Math_CosS(this->actor.world.rot.y) * sCameraAtPerPython[this->pythonIndex].z;
pos.x += Math_SinS(this->actor.world.rot.y) * sSubCamEyePerPython[this->pythonIndex].x;
pos.y += sSubCamEyePerPython[this->pythonIndex].y;
pos.z += Math_CosS(this->actor.world.rot.y) * sSubCamEyePerPython[this->pythonIndex].z;
EnDragon_CameraSetAtEye(this, play, sp50, at);
Math_Vec3f_Copy(&subCamAt, &this->actor.world.pos);
subCamAt.x += Math_SinS(this->actor.world.rot.y) * sSubCamAtPerPython[this->pythonIndex].x;
subCamAt.y += sSubCamAtPerPython[this->pythonIndex].y;
subCamAt.z += Math_CosS(this->actor.world.rot.y) * sSubCamAtPerPython[this->pythonIndex].z;
EnDragon_SetSubCamEyeAt(this, play, pos, subCamAt);
if (this->grabTimer > sMaxGrabTimerPerPython[this->pythonIndex]) {
if (this->state == DEEP_PYTHON_GRAB_STATE_START) {
@@ -560,8 +561,8 @@ void EnDragon_SetupAttack(EnDragon* this) {
void EnDragon_Attack(EnDragon* this, PlayState* play) {
Player* player = GET_PLAYER(play);
f32 currentFrame = this->skelAnime.curFrame;
Vec3f sp4C; // used as both the extended position and the camera eye
Vec3f at;
Vec3f pos; // used as both the extended position and the camera eye
Vec3f subCamAt;
SkelAnime_Update(&this->skelAnime);
Math_SmoothStepToS(&this->actor.shape.rot.z, 0, 0xA, 0x1388, 0);
@@ -575,17 +576,17 @@ void EnDragon_Attack(EnDragon* this, PlayState* play) {
CollisionCheck_GreenBlood(play, NULL, &player->actor.world.pos);
}
Math_Vec3f_Copy(&sp4C, &this->actor.world.pos);
sp4C.x += Math_SinS(this->actor.world.rot.y) * 3000.0f;
sp4C.y += 600.0f;
sp4C.z += Math_CosS(this->actor.world.rot.y) * 3000.0f;
Math_Vec3f_Copy(&pos, &this->actor.world.pos);
pos.x += Math_SinS(this->actor.world.rot.y) * 3000.0f;
pos.y += 600.0f;
pos.z += Math_CosS(this->actor.world.rot.y) * 3000.0f;
Math_Vec3f_Copy(&at, &this->actor.world.pos);
at.x += Math_SinS(this->actor.world.rot.y) * 1200.0f;
at.y += -100.0f;
at.z += Math_CosS(this->actor.world.rot.y) * 1200.0f;
Math_Vec3f_Copy(&subCamAt, &this->actor.world.pos);
subCamAt.x += Math_SinS(this->actor.world.rot.y) * 1200.0f;
subCamAt.y += -100.0f;
subCamAt.z += Math_CosS(this->actor.world.rot.y) * 1200.0f;
EnDragon_CameraSetAtEye(this, play, sp4C, at);
EnDragon_SetSubCamEyeAt(this, play, pos, subCamAt);
player->actor.world.rot.y = player->actor.shape.rot.y = this->actor.world.rot.y;
player->actor.world.rot.x = player->actor.shape.rot.x = this->actor.world.rot.x;
@@ -593,12 +594,12 @@ void EnDragon_Attack(EnDragon* this, PlayState* play) {
Math_Vec3f_Copy(&player->actor.world.pos, &this->playerGrabPosition);
this->jawZRotation = 0xC8;
Math_Vec3f_Copy(&sp4C, &this->burrowEntrancePos);
sp4C.x += Math_SinS(this->actor.world.rot.y) * -530.0f;
sp4C.z += Math_CosS(this->actor.world.rot.y) * -530.0f;
Math_ApproachF(&this->actor.world.pos.x, sp4C.x, 0.3f, 200.0f);
Math_ApproachF(&this->actor.world.pos.y, sp4C.y, 0.3f, 200.0f);
Math_ApproachF(&this->actor.world.pos.z, sp4C.z, 0.3f, 200.0f);
Math_Vec3f_Copy(&pos, &this->burrowEntrancePos);
pos.x += Math_SinS(this->actor.world.rot.y) * -530.0f;
pos.z += Math_CosS(this->actor.world.rot.y) * -530.0f;
Math_ApproachF(&this->actor.world.pos.x, pos.x, 0.3f, 200.0f);
Math_ApproachF(&this->actor.world.pos.y, pos.y, 0.3f, 200.0f);
Math_ApproachF(&this->actor.world.pos.z, pos.z, 0.3f, 200.0f);
if ((this->state <= DEEP_PYTHON_ATTACK_STATE_START) && (this->endFrame <= currentFrame)) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_UTSUBO_BITE);
@@ -31,8 +31,8 @@ typedef struct EnDragon {
/* 0x254 */ Vec3f jawPos;
/* 0x260 */ Vec3f burrowEntrancePos; // Vertically and horizontally centered on the burrow opening. Set by Bg_Sinkai_Kabe
/* 0x26C */ Vec3f playerGrabPosition;
/* 0x278 */ Vec3f cameraEye;
/* 0x278 */ Vec3f cameraAt;
/* 0x278 */ Vec3f subCamEye;
/* 0x278 */ Vec3f subCamAt;
/* 0x290 */ Vec3f playerGrabPositionTemp;
/* 0x29C */ Vec3f focusPos;
/* 0x2A8 */ s16 jawZRotation;
@@ -50,7 +50,7 @@ typedef struct EnDragon {
/* 0x2C0 */ s16 grabCutsceneIndex;
/* 0x2C2 */ s16 deathCutsceneIndex;
/* 0x2C4 */ UNK_TYPE1 unk_2C4[0x4];
/* 0x2C8 */ s16 cameraId;
/* 0x2C8 */ s16 subCamId;
/* 0x2CA */ s16 grabTimer; // Counts up from the time a grab starts until the time the actor begins attacking
/* 0x2CC */ s16 unk_2CC; // Initialized, but never used
/* 0x2CE */ UNK_TYPE1 unk_2CE[0x2];
+29 -29
View File
@@ -795,13 +795,13 @@ void func_80B2A01C(EnFish2* this, PlayState* play) {
}
void func_80B2A094(EnFish2* this, PlayState* play) {
Vec3f sp2C;
Vec3f subCamEye;
if (this->unk_2B4 == 0) {
D_80B2B2E4 = 1;
}
this->unk_2CA = ActorCutscene_GetCurrentCamera(this->unk_2BA[0]);
this->subCamId = ActorCutscene_GetCurrentSubCamId(this->unk_2BA[0]);
if (D_80B2B2EC != 0) {
D_80B2B2EC++;
@@ -813,17 +813,17 @@ void func_80B2A094(EnFish2* this, PlayState* play) {
}
if ((this->unk_350 != NULL) && (this->unk_350->update != NULL)) {
Math_Vec3f_Copy(&sp2C, &this->unk_350->world.pos);
sp2C.x += Math_SinS(-0x3A98) * 110.0f;
sp2C.z += Math_CosS(-0x3A98) * 110.0f;
Math_Vec3f_Copy(&this->unk_2DC, &sp2C);
Math_Vec3f_Copy(&sp2C, &this->unk_350->world.pos);
sp2C.x += Math_SinS(-0x3A98) * 10.0f;
sp2C.z += Math_CosS(-0x3A98) * 10.0f;
Math_Vec3f_Copy(&this->unk_2E8, &sp2C);
Math_Vec3f_Copy(&subCamEye, &this->unk_350->world.pos);
subCamEye.x += Math_SinS(-0x3A98) * 110.0f;
subCamEye.z += Math_CosS(-0x3A98) * 110.0f;
Math_Vec3f_Copy(&this->subCamEye, &subCamEye);
Math_Vec3f_Copy(&subCamEye, &this->unk_350->world.pos);
subCamEye.x += Math_SinS(-0x3A98) * 10.0f;
subCamEye.z += Math_CosS(-0x3A98) * 10.0f;
Math_Vec3f_Copy(&this->subCamAt, &subCamEye);
}
Play_CameraSetAtEye(play, this->unk_2CA, &this->unk_2E8, &this->unk_2DC);
Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye);
if ((this->unk_350 == NULL) || (this->unk_350->update == NULL)) {
this->unk_350 = NULL;
this->unk_2B0++;
@@ -835,29 +835,29 @@ void func_80B2A094(EnFish2* this, PlayState* play) {
}
void func_80B2A23C(EnFish2* this, PlayState* play) {
Vec3f sp2C;
Vec3f subCamAt;
Math_Vec3f_Copy(&sp2C, &this->actor.world.pos);
Math_Vec3f_Copy(&subCamAt, &this->actor.world.pos);
if (D_80B2B2E4 == 2) {
sp2C.x += (Math_SinS(-0x3A98) * 180.0f);
sp2C.y += 90.0f;
sp2C.z += Math_CosS(-0x3A98) * 180.0f;
Math_Vec3f_Copy(&this->unk_2DC, &sp2C);
Math_Vec3f_Copy(&sp2C, &this->actor.world.pos);
sp2C.y += 70.0f;
Math_Vec3f_Copy(&this->unk_2E8, &sp2C);
subCamAt.x += (Math_SinS(-0x3A98) * 180.0f);
subCamAt.y += 90.0f;
subCamAt.z += Math_CosS(-0x3A98) * 180.0f;
Math_Vec3f_Copy(&this->subCamEye, &subCamAt);
Math_Vec3f_Copy(&subCamAt, &this->actor.world.pos);
subCamAt.y += 70.0f;
Math_Vec3f_Copy(&this->subCamAt, &subCamAt);
} else if (D_80B2B2F4 != NULL) {
Math_Vec3f_Copy(&sp2C, &D_80B2B2F4->world.pos);
sp2C.x += Math_SinS(-0x3A98) * 110.0f;
sp2C.z += Math_CosS(-0x3A98) * 110.0f;
Math_Vec3f_Copy(&this->unk_2DC, &sp2C);
Math_Vec3f_Copy(&sp2C, &D_80B2B2F4->world.pos);
sp2C.x += Math_SinS(-0x3A98) * 10.0f;
sp2C.z += Math_CosS(-0x3A98) * 10.0f;
Math_Vec3f_Copy(&this->unk_2E8, &sp2C);
Math_Vec3f_Copy(&subCamAt, &D_80B2B2F4->world.pos);
subCamAt.x += Math_SinS(-0x3A98) * 110.0f;
subCamAt.z += Math_CosS(-0x3A98) * 110.0f;
Math_Vec3f_Copy(&this->subCamEye, &subCamAt);
Math_Vec3f_Copy(&subCamAt, &D_80B2B2F4->world.pos);
subCamAt.x += Math_SinS(-0x3A98) * 10.0f;
subCamAt.z += Math_CosS(-0x3A98) * 10.0f;
Math_Vec3f_Copy(&this->subCamAt, &subCamAt);
}
Play_CameraSetAtEye(play, this->unk_2CA, &this->unk_2E8, &this->unk_2DC);
Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye);
if ((this->unk_2B4 == 0) && (D_80B2B2E4 == 3)) {
D_80B2B2E0 = D_80B2B2EC = D_80B2B2E4 = 0;
@@ -32,13 +32,13 @@ typedef struct EnFish2 {
/* 0x02C0 */ s32 unk_2C0;
/* 0x02C4 */ s32 unk_2C4;
/* 0x02C8 */ u8 unk_2C8;
/* 0x02CA */ s16 unk_2CA;
/* 0x02CA */ s16 subCamId;
/* 0x02CC */ f32 unk_2CC;
/* 0x02D0 */ char unk_2D0[0x4];
/* 0x02D4 */ f32 unk_2D4;
/* 0x02D8 */ f32 unk_2D8;
/* 0x02DC */ Vec3f unk_2DC;
/* 0x02E8 */ Vec3f unk_2E8;
/* 0x02DC */ Vec3f subCamEye;
/* 0x02E8 */ Vec3f subCamAt;
/* 0x02F4 */ Vec3f unk_2F4;
/* 0x0300 */ Vec3f unk_300;
/* 0x030C */ Vec3f unk_30C;
@@ -138,11 +138,11 @@ u8 D_80911E28;
Vec3f sSinkingLurePos[SINKING_LURE_SEG_COUNT];
s16 D_80911F20;
f32 sProjectedW;
Vec3f sCameraEye;
Vec3f sCameraAt;
s16 sCameraId;
Vec3f sSubCamEye;
Vec3f sSubCamAt;
s16 sSubCamId;
f32 D_80911F48;
f32 D_80911F4C;
f32 sSubCamVelFactor;
f32 D_80911F50;
Vec3f sSinkingLureBasePos;
f32 D_80911F64;
@@ -2874,7 +2874,7 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) {
sp118 = (player->actor.speedXZ * 0.3f) + 0.25f;
}
if ((D_80917200 != 0) || (sCameraId != CAM_ID_MAIN) ||
if ((D_80917200 != 0) || (sSubCamId != SUB_CAM_ID_DONE) ||
((player->actor.world.pos.z > 1150.0f) && (this->unk_150 != 100))) {
this->actor.flags &= ~ACTOR_FLAG_1;
} else {
@@ -3803,17 +3803,17 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) {
sp10C.z = 50.0f;
}
Matrix_RotateYF((player->actor.shape.rot.y / 32768.0f) * M_PI, MTXMODE_NEW);
Matrix_MultVec3f(&sp10C, &sCameraEye);
Matrix_MultVec3f(&sp10C, &sSubCamEye);
sCameraEye.x += player->actor.world.pos.x;
sCameraEye.y += player->actor.world.pos.y;
sCameraEye.z += player->actor.world.pos.z;
sSubCamEye.x += player->actor.world.pos.x;
sSubCamEye.y += player->actor.world.pos.y;
sSubCamEye.z += player->actor.world.pos.z;
sCameraAt = player->actor.world.pos;
sSubCamAt = player->actor.world.pos;
if (sLinkAge != 1) {
sCameraAt.y += 40.0f;
sSubCamAt.y += 40.0f;
} else {
sCameraAt.y += 25.0f;
sSubCamAt.y += 25.0f;
}
if (this->unk_172[0] == 90) {
@@ -4330,7 +4330,7 @@ void EnFishing_UpdatePondProps(PlayState* play) {
prop++;
}
if (sCameraId == CAM_ID_MAIN) {
if (sSubCamId == SUB_CAM_ID_DONE) {
CollisionCheck_SetOC(play, &play->colChkCtx, &sFishingMain->collider.base);
}
}
@@ -5034,7 +5034,7 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
f32 target;
f32 camAtFraction;
f32 lureDistXZ;
Camera* camera;
Camera* mainCam;
Player* player = GET_PLAYER(play);
Input* input = CONTROLLER1(&play->state);
@@ -5152,21 +5152,20 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
break;
case 1:
sCameraId = Play_CreateSubCamera(play);
sSubCamId = Play_CreateSubCamera(play);
Play_CameraChangeStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_CameraChangeStatus(play, sCameraId, CAM_STATUS_ACTIVE);
camera = Play_GetCamera(play, CAM_ID_MAIN);
sCameraEye.x = camera->eye.x;
sCameraEye.y = camera->eye.y;
sCameraEye.z = camera->eye.z;
sCameraAt.x = camera->at.x;
sCameraAt.y = camera->at.y;
sCameraAt.z = camera->at.z;
Play_CameraChangeStatus(play, sSubCamId, CAM_STATUS_ACTIVE);
mainCam = Play_GetCamera(play, CAM_ID_MAIN);
sSubCamEye.x = mainCam->eye.x;
sSubCamEye.y = mainCam->eye.y;
sSubCamEye.z = mainCam->eye.z;
sSubCamAt.x = mainCam->at.x;
sSubCamAt.y = mainCam->at.y;
sSubCamAt.z = mainCam->at.z;
D_8090CD4C = 2;
Interface_ChangeAlpha(12);
D_80911F4C = 0.0f;
sSubCamVelFactor = 0.0f;
// fallthrough
case 2:
ShrinkWindow_SetLetterboxTarget(27);
@@ -5186,9 +5185,9 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
camAtFraction = 0.1f;
}
Math_ApproachF(&sCameraAt.x, sLurePos.x, camAtFraction, fabsf(spFC.x) * D_80911F4C);
Math_ApproachF(&sCameraAt.y, sLurePos.y, camAtFraction, 50.0f * D_80911F4C);
Math_ApproachF(&sCameraAt.z, sLurePos.z, camAtFraction, fabsf(spFC.z) * D_80911F4C);
Math_ApproachF(&sSubCamAt.x, sLurePos.x, camAtFraction, fabsf(spFC.x) * sSubCamVelFactor);
Math_ApproachF(&sSubCamAt.y, sLurePos.y, camAtFraction, 50.0f * sSubCamVelFactor);
Math_ApproachF(&sSubCamAt.z, sLurePos.z, camAtFraction, fabsf(spFC.z) * sSubCamVelFactor);
sp114.x = 0.0f - D_80911F50;
if (sLinkAge != 1) {
@@ -5256,22 +5255,22 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
sp114.z = 100.0f;
Matrix_MultVec3f(&sp114, &spFC);
Math_ApproachF(&sCameraEye.x, sp108.x, 0.3f, fabsf(spFC.x) * D_80911F4C);
Math_ApproachF(&sCameraEye.y, sp108.y, 0.3f, 20.0f * D_80911F4C);
Math_ApproachF(&sCameraEye.z, sp108.z, 0.3f, fabsf(spFC.z) * D_80911F4C);
Math_ApproachF(&sSubCamEye.x, sp108.x, 0.3f, fabsf(spFC.x) * sSubCamVelFactor);
Math_ApproachF(&sSubCamEye.y, sp108.y, 0.3f, 20.0f * sSubCamVelFactor);
Math_ApproachF(&sSubCamEye.z, sp108.z, 0.3f, fabsf(spFC.z) * sSubCamVelFactor);
break;
case 3: {
Camera* camera = Play_GetCamera(play, CAM_ID_MAIN);
Camera* mainCam = Play_GetCamera(play, CAM_ID_MAIN);
camera->eye = sCameraEye;
camera->eyeNext = sCameraEye;
camera->at = sCameraAt;
mainCam->eye = sSubCamEye;
mainCam->eyeNext = sSubCamEye;
mainCam->at = sSubCamAt;
}
func_80169AFC(play, sCameraId, 0);
func_80169AFC(play, sSubCamId, 0);
Cutscene_End(play, &play->csCtx);
D_8090CD4C = 0;
sCameraId = CAM_ID_MAIN;
sSubCamId = SUB_CAM_ID_DONE;
func_800F6834(play, 0);
play->envCtx.lightSettings.fogNear = 0;
player->unk_B28 = -5;
@@ -5280,37 +5279,39 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
case 10:
Cutscene_Start(play, &play->csCtx);
sCameraId = Play_CreateSubCamera(play);
sSubCamId = Play_CreateSubCamera(play);
Play_CameraChangeStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_CameraChangeStatus(play, sCameraId, CAM_STATUS_ACTIVE);
Play_CameraChangeStatus(play, sSubCamId, CAM_STATUS_ACTIVE);
func_800B7298(play, &this->actor, 4);
camera = Play_GetCamera(play, CAM_ID_MAIN);
sCameraEye.x = camera->eye.x;
sCameraEye.y = camera->eye.y;
sCameraEye.z = camera->eye.z;
sCameraAt.x = camera->at.x;
sCameraAt.y = camera->at.y;
sCameraAt.z = camera->at.z;
mainCam = Play_GetCamera(play, CAM_ID_MAIN);
sSubCamEye.x = mainCam->eye.x;
sSubCamEye.y = mainCam->eye.y;
sSubCamEye.z = mainCam->eye.z;
sSubCamAt.x = mainCam->at.x;
sSubCamAt.y = mainCam->at.y;
sSubCamAt.z = mainCam->at.z;
Message_StartTextbox(play, 0x409E, NULL);
D_8090CD4C = 11;
Rumble_Override(0.0f, 150, 10, 10);
// fallthrough
case 11:
player->actor.world.pos.z = 1360.0f;
player->actor.speedXZ = 0.0f;
if (Message_GetState(&play->msgCtx) == 0) {
Camera* camera = Play_GetCamera(play, CAM_ID_MAIN);
Camera* mainCam = Play_GetCamera(play, CAM_ID_MAIN);
camera->eye = sCameraEye;
camera->eyeNext = sCameraEye;
camera->at = sCameraAt;
func_80169AFC(play, sCameraId, 0);
mainCam->eye = sSubCamEye;
mainCam->eyeNext = sSubCamEye;
mainCam->at = sSubCamAt;
func_80169AFC(play, sSubCamId, 0);
Cutscene_End(play, &play->csCtx);
func_800B7298(play, &this->actor, 6);
D_8090CD4C = 0;
sCameraId = CAM_ID_MAIN;
sSubCamId = SUB_CAM_ID_DONE;
D_8090CD50 = 30;
func_800F6834(play, 0);
play->envCtx.lightSettings.fogNear = 0;
@@ -5319,23 +5320,23 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
case 20:
Cutscene_Start(play, &play->csCtx);
sCameraId = Play_CreateSubCamera(play);
sSubCamId = Play_CreateSubCamera(play);
Play_CameraChangeStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_CameraChangeStatus(play, sCameraId, CAM_STATUS_ACTIVE);
Play_CameraChangeStatus(play, sSubCamId, CAM_STATUS_ACTIVE);
func_800B7298(play, &this->actor, 4);
camera = Play_GetCamera(play, CAM_ID_MAIN);
sCameraEye.x = camera->eye.x;
sCameraEye.y = camera->eye.y;
sCameraEye.z = camera->eye.z;
sCameraAt.x = camera->at.x;
sCameraAt.y = camera->at.y;
sCameraAt.z = camera->at.z;
mainCam = Play_GetCamera(play, CAM_ID_MAIN);
sSubCamEye.x = mainCam->eye.x;
sSubCamEye.y = mainCam->eye.y;
sSubCamEye.z = mainCam->eye.z;
sSubCamAt.x = mainCam->at.x;
sSubCamAt.y = mainCam->at.y;
sSubCamAt.z = mainCam->at.z;
Message_StartTextbox(play, 0x409A, NULL);
D_8090CD4C = 21;
D_80911F48 = 45.0f;
D_8090CD50 = 10;
// fallthrough
case 21:
if ((D_8090CD50 == 0) && Message_ShouldAdvance(play)) {
D_8090CD4C = 22;
@@ -5380,22 +5381,22 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
sp114.z = -35.0f;
}
Matrix_MultVec3f(&sp114, &sCameraEye);
sCameraEye.x += player->actor.world.pos.x;
sCameraEye.y += player->actor.world.pos.y;
sCameraEye.z += player->actor.world.pos.z;
Matrix_MultVec3f(&sp114, &sSubCamEye);
sSubCamEye.x += player->actor.world.pos.x;
sSubCamEye.y += player->actor.world.pos.y;
sSubCamEye.z += player->actor.world.pos.z;
sCameraAt = player->actor.world.pos;
sSubCamAt = player->actor.world.pos;
if (sLinkAge != 1) {
sCameraAt.y += 62.0f;
sSubCamAt.y += 62.0f;
} else {
sCameraAt.y += 40.0f;
sSubCamAt.y += 40.0f;
}
if (D_8090CD50 == 0) {
if ((Message_GetState(&play->msgCtx) == 4) || Message_GetState(&play->msgCtx) == 0) {
if (Message_ShouldAdvance(play)) {
Camera* camera = Play_GetCamera(play, CAM_ID_MAIN);
Camera* mainCam = Play_GetCamera(play, CAM_ID_MAIN);
func_801477B4(play);
if (play->msgCtx.choiceIndex == 0) {
@@ -5403,14 +5404,14 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
D_809171D6 = 0;
}
camera->eye = sCameraEye;
camera->eyeNext = sCameraEye;
camera->at = sCameraAt;
func_80169AFC(play, sCameraId, 0);
mainCam->eye = sSubCamEye;
mainCam->eyeNext = sSubCamEye;
mainCam->at = sSubCamAt;
func_80169AFC(play, sSubCamId, 0);
Cutscene_End(play, &play->csCtx);
func_800B7298(play, &this->actor, 6); // arg2 changed from 7 to 6 in MM
D_8090CD4C = 0;
sCameraId = CAM_ID_MAIN;
sSubCamId = SUB_CAM_ID_DONE;
player->unk_B28 = -5;
D_80917200 = 5;
D_8090CD54 = 0;
@@ -5426,11 +5427,11 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
break;
}
if (sCameraId != CAM_ID_MAIN) {
Play_CameraSetAtEye(play, sCameraId, &sCameraAt, &sCameraEye);
Math_ApproachF(&D_80911F4C, 1.0f, 1.0f, 0.02f);
if (sSubCamId != SUB_CAM_ID_DONE) {
Play_CameraSetAtEye(play, sSubCamId, &sSubCamAt, &sSubCamEye);
Math_ApproachF(&sSubCamVelFactor, 1.0f, 1.0f, 0.02f);
if (sCameraEye.y <= (WATER_SURFACE_Y(play) + 1.0f)) {
if (sSubCamEye.y <= (WATER_SURFACE_Y(play) + 1.0f)) {
func_800F6834(play, 1);
if (D_809171CA != 0) {
play->envCtx.lightSettings.fogNear = -0xB2;
@@ -5529,7 +5530,7 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
if ((u8)D_8090CCD0 > 0) {
s32 pad;
s16 i;
Camera* camera = Play_GetCamera(play, CAM_ID_MAIN);
Camera* mainCam = Play_GetCamera(play, CAM_ID_MAIN);
Vec3f pos;
Vec3f rot;
Vec3f projectedPos;
@@ -5537,7 +5538,7 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
rot.x = 1.6707964f;
rot.y = 1.0f;
rot.z = (Camera_GetInputDirYaw(camera) * -(M_PI / 32768)) + rot.y;
rot.z = (Camera_GetInputDirYaw(mainCam) * -(M_PI / 0x8000)) + rot.y;
for (i = 0; i < (u8)D_8090CCD0; i++) {
pos.x = randPlusMinusPoint5Scaled(700.0f) + play->view.eye.x;
+7 -7
View File
@@ -466,7 +466,7 @@ s32 func_8094E52C(EnGm* this, PlayState* play) {
if (!(gSaveContext.save.weekEventReg[86] & 0x40) && (this->unk_3E0 == 2)) {
ActorCutscene_Stop(sp2A);
} else {
Camera_SetTargetActor(Play_GetCamera(play, ActorCutscene_GetCurrentCamera(sp2A)), &this->actor);
Camera_SetTargetActor(Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(sp2A)), &this->actor);
}
this->unk_3E0++;
ret = true;
@@ -474,7 +474,7 @@ s32 func_8094E52C(EnGm* this, PlayState* play) {
case 1:
if ((this->actor.child != NULL) && (this->actor.child->update != NULL)) {
Camera_SetTargetActor(Play_GetCamera(play, ActorCutscene_GetCurrentCamera(sp2A)), this->actor.child);
Camera_SetTargetActor(Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(sp2A)), this->actor.child);
}
this->unk_3E0++;
ret = true;
@@ -491,7 +491,7 @@ s32 func_8094E52C(EnGm* this, PlayState* play) {
}
s32 func_8094E69C(EnGm* this, PlayState* play) {
Camera* camera;
Camera* subCam;
s16 sp4A = func_8094E4D0(this, 0);
s16 sp48;
Vec3f sp3C;
@@ -533,8 +533,8 @@ s32 func_8094E69C(EnGm* this, PlayState* play) {
if (func_8094E454(this, sp4A)) {
case 4:
case 6:
camera = Play_GetCamera(play, ActorCutscene_GetCurrentCamera(sp4A));
Camera_SetTargetActor(camera, &this->actor);
subCam = Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(sp4A));
Camera_SetTargetActor(subCam, &this->actor);
this->unk_3E0++;
ret = true;
}
@@ -544,8 +544,8 @@ s32 func_8094E69C(EnGm* this, PlayState* play) {
case 5:
case 7:
if ((this->actor.child != NULL) && (this->actor.child->update != NULL)) {
camera = Play_GetCamera(play, ActorCutscene_GetCurrentCamera(sp4A));
Camera_SetTargetActor(camera, this->actor.child);
subCam = Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(sp4A));
Camera_SetTargetActor(subCam, this->actor.child);
}
this->unk_3E0++;
ret = true;
@@ -109,8 +109,8 @@ s32 func_808F8C70(EnHorseGameCheck* this, PlayState* play) {
s32 func_808F8CCC(EnHorseGameCheck* this, PlayState* play2) {
PlayState* play = play2;
s32 pad;
Vec3f sp4C = { -1262.0f, 15.0f, 780.0f };
Vec3f sp40 = { -1262.0f, -26.0f, 470.0f };
Vec3f mainCamEye = { -1262.0f, 15.0f, 780.0f };
Vec3f mainCamAt = { -1262.0f, -26.0f, 470.0f };
this->unk_164 = 0;
this->unk_168 = 0;
@@ -138,8 +138,8 @@ s32 func_808F8CCC(EnHorseGameCheck* this, PlayState* play2) {
this->unk_17C = -1;
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FREE0);
Play_CameraSetAtEye(play, 0, &sp40, &sp4C);
Play_CameraSetFov(play, 0, 45.0f);
Play_CameraSetAtEye(play, CAM_ID_MAIN, &mainCamAt, &mainCamEye);
Play_CameraSetFov(play, CAM_ID_MAIN, 45.0f);
func_800FE484();
return false;
}
+2 -2
View File
@@ -362,7 +362,7 @@ s32 func_80BF17BC(EnIg* this, PlayState* play) {
case 2:
case 4:
if ((this->actor.child != NULL) && (this->actor.child->update != NULL)) {
Camera_SetTargetActor(Play_GetCamera(play, ActorCutscene_GetCurrentCamera(sp2A)),
Camera_SetTargetActor(Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(sp2A)),
this->actor.child);
}
this->unk_3F6++;
@@ -376,7 +376,7 @@ s32 func_80BF17BC(EnIg* this, PlayState* play) {
ActorCutscene_Stop(sp2A);
this->unk_3F6 = 5;
} else {
Camera_SetTargetActor(Play_GetCamera(play, ActorCutscene_GetCurrentCamera(sp2A)), &this->actor);
Camera_SetTargetActor(Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(sp2A)), &this->actor);
}
this->unk_3F6++;
ret = true;
+4 -4
View File
@@ -646,13 +646,13 @@ void EnIk_SetupReactToAttack(EnIk* this, s32 arg1) {
void EnIk_ReactToAttack(EnIk* this, PlayState* play) {
Math_StepToF(&this->actor.speedXZ, 0.0f, 1.0f);
if (this->subCamId != CAM_ID_MAIN) {
if (this->subCamId != SUB_CAM_ID_DONE) {
Play_CameraSetAtEye(play, this->subCamId, &this->actor.focus.pos, &Play_GetCamera(play, this->subCamId)->eye);
}
if (SkelAnime_Update(&this->skelAnime)) {
if (this->subCamId != CAM_ID_MAIN) {
if (this->subCamId != SUB_CAM_ID_DONE) {
ActorCutscene_Stop(this->actor.cutscene);
this->subCamId = CAM_ID_MAIN;
this->subCamId = SUB_CAM_ID_DONE;
EnIk_SetupIdle(this);
} else {
EnIk_CheckActions(this, play);
@@ -738,7 +738,7 @@ void EnIk_PlayCutscene(EnIk* this, PlayState* play) {
if (ActorCutscene_GetCanPlayNext(this->actor.cutscene)) {
if (this->actor.cutscene != -1) {
ActorCutscene_StartAndSetFlag(this->actor.cutscene, &this->actor);
this->subCamId = ActorCutscene_GetCurrentCamera(this->actor.cutscene);
this->subCamId = ActorCutscene_GetCurrentSubCamId(this->actor.cutscene);
subCamEye.x = (Math_SinS((this->actor.shape.rot.y - 0x2000)) * 120.0f) + this->actor.focus.pos.x;
subCamEye.y = this->actor.focus.pos.y + 20.0f;
subCamEye.z = (Math_CosS((this->actor.shape.rot.y - 0x2000)) * 120.0f) + this->actor.focus.pos.z;
+67 -67
View File
@@ -256,19 +256,19 @@ void EnKakasi_CheckPlayerPosition(EnKakasi* this, PlayState* play) {
* something to do with cutscene camera?
*/
void func_8096FAAC(EnKakasi* this, PlayState* play) {
if (this->cutsceneCamId != CAM_ID_MAIN) {
Math_ApproachF(&this->unk214.x, this->unk238.x, 0.4f, 4.0f);
Math_ApproachF(&this->unk214.y, this->unk238.y, 0.4f, 4.0f);
Math_ApproachF(&this->unk214.z, this->unk238.z, 0.4f, 4.0f);
if (this->subCamId != SUB_CAM_ID_DONE) {
Math_ApproachF(&this->subCamEye.x, this->subCamEyeNext.x, 0.4f, 4.0f);
Math_ApproachF(&this->subCamEye.y, this->subCamEyeNext.y, 0.4f, 4.0f);
Math_ApproachF(&this->subCamEye.z, this->subCamEyeNext.z, 0.4f, 4.0f);
Math_ApproachF(&this->unk220.x, this->unk244.x, 0.4f, 4.0f);
Math_ApproachF(&this->unk220.y, this->unk244.y, 0.4f, 4.0f);
Math_ApproachF(&this->unk220.z, this->unk244.z, 0.4f, 4.0f);
Math_ApproachF(&this->subCamAt.x, this->subCamAtNext.x, 0.4f, 4.0f);
Math_ApproachF(&this->subCamAt.y, this->subCamAtNext.y, 0.4f, 4.0f);
Math_ApproachF(&this->subCamAt.z, this->subCamAtNext.z, 0.4f, 4.0f);
Math_ApproachF(&this->unk20C, this->unk210, 0.3f, 10.0f);
Math_ApproachF(&this->subCamFov, this->subCamFovNext, 0.3f, 10.0f);
Play_CameraSetAtEye(play, this->cutsceneCamId, &this->unk220, &this->unk214);
Play_CameraSetFov(play, this->cutsceneCamId, this->unk20C);
Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye);
Play_CameraSetFov(play, this->subCamId, this->subCamFov);
}
}
@@ -458,7 +458,7 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) {
this->actionFunc = EnKakasi_DancingRemark;
} else {
ActorCutscene_StartAndSetUnkLinkFields(this->actorCutscenes[0], &this->actor);
this->cutsceneCamId = ActorCutscene_GetCurrentCamera(this->actor.cutscene);
this->subCamId = ActorCutscene_GetCurrentSubCamId(this->actor.cutscene);
this->actionFunc = EnKakasi_DancingRemark;
}
}
@@ -547,9 +547,9 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) {
void EnKakasi_SetupSongTeach(EnKakasi* this, PlayState* play) {
this->actor.textId = 0x1646;
Message_StartTextbox(play, this->actor.textId, &this->actor);
this->cutsceneCamId = CAM_ID_MAIN;
this->unk20C = 0.0f;
this->unk210 = 60.0f;
this->subCamId = SUB_CAM_ID_DONE;
this->subCamFov = 0.0f;
this->subCamFovNext = 60.0f;
EnKakasi_SetAnimation(this, ENKAKASI_ANIM_TWIRL);
this->unkState196 = 2;
this->actionFunc = EnKakasi_OcarinaRemark;
@@ -575,7 +575,7 @@ void EnKakasi_OcarinaRemark(EnKakasi* this, PlayState* play) {
} else {
this->unkState1A8 = 1;
ActorCutscene_StartAndSetUnkLinkFields(this->actorCutscenes[0], &this->actor);
this->cutsceneCamId = ActorCutscene_GetCurrentCamera(this->actor.cutscene);
this->subCamId = ActorCutscene_GetCurrentSubCamId(this->actor.cutscene);
Math_Vec3f_Copy(&this->unk22C, &this->actor.home.pos);
this->actionFunc = EnKakasi_TeachingSong;
}
@@ -598,7 +598,7 @@ void EnKakasi_TeachingSong(EnKakasi* this, PlayState* play) {
return;
}
ActorCutscene_StartAndSetUnkLinkFields(this->actorCutscenes[0], &this->actor);
this->cutsceneCamId = ActorCutscene_GetCurrentCamera(this->actor.cutscene);
this->subCamId = ActorCutscene_GetCurrentSubCamId(this->actor.cutscene);
Math_Vec3f_Copy(&this->unk22C, &this->actor.home.pos);
this->unkState1A8 = 1;
this->unkState1A8 = 1;
@@ -606,15 +606,15 @@ void EnKakasi_TeachingSong(EnKakasi* this, PlayState* play) {
if (this->unkState1A8 == 1) {
this->unk22C.y = this->actor.home.pos.y + 50.0f;
this->unk238.x = D_80971DCC[this->unk190].x;
this->unk238.y = D_80971DCC[this->unk190].y;
this->unk238.z = D_80971DCC[this->unk190].z;
this->subCamEyeNext.x = D_80971DCC[this->unk190].x;
this->subCamEyeNext.y = D_80971DCC[this->unk190].y;
this->subCamEyeNext.z = D_80971DCC[this->unk190].z;
Math_Vec3f_Copy(&tempVec, &this->unk238);
OLib_DbCameraVec3fSum(&this->actor.home, &tempVec, &this->unk238, 1);
Math_Vec3f_Copy(&this->unk244, &this->unk22C);
Math_Vec3f_Copy(&this->unk214, &this->unk238);
Math_Vec3f_Copy(&this->unk220, &this->unk244);
Math_Vec3f_Copy(&tempVec, &this->subCamEyeNext);
OLib_DbCameraVec3fSum(&this->actor.home, &tempVec, &this->subCamEyeNext, 1);
Math_Vec3f_Copy(&this->subCamAtNext, &this->unk22C);
Math_Vec3f_Copy(&this->subCamEye, &this->subCamEyeNext);
Math_Vec3f_Copy(&this->subCamAt, &this->subCamAtNext);
func_8096FAAC(this, play);
func_8096FBB8(this, play);
@@ -625,7 +625,7 @@ void EnKakasi_TeachingSong(EnKakasi* this, PlayState* play) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_YASE_DEAD);
if (this) {}
this->unkState196 = 2;
this->cutsceneCamId = CAM_ID_MAIN;
this->subCamId = SUB_CAM_ID_DONE;
this->actor.textId = 0x1647;
this->unkState1A8 = 2;
this->unkMsgState1AC = 5;
@@ -659,12 +659,12 @@ void EnKakasi_SetupPostSongLearnDialogue(EnKakasi* this, PlayState* play) {
this->unk190 = 0;
this->unkCounter1A4 = 0;
EnKakasi_SetAnimation(this, ENKAKASI_ANIM_HOPPING_REGULAR);
this->cutsceneCamId = CAM_ID_MAIN;
this->subCamId = SUB_CAM_ID_DONE;
this->unkMsgState1AC = 5;
this->unkState1A8 = 1;
this->actionFunc = EnKakasi_PostSongLearnDialogue;
this->unk20C = 0.0f;
this->unk210 = 60.0f;
this->subCamFov = 0.0f;
this->subCamFovNext = 60.0f;
}
void EnKakasi_PostSongLearnDialogue(EnKakasi* this, PlayState* play) {
@@ -712,24 +712,24 @@ void EnKakasi_PostSongLearnDialogue(EnKakasi* this, PlayState* play) {
}
Math_Vec3f_Copy(&this->unk22C, &this->actor.home.pos);
ActorCutscene_StartAndSetUnkLinkFields(this->actorCutscenes[0], &this->actor);
this->cutsceneCamId = ActorCutscene_GetCurrentCamera(this->actor.cutscene);
this->subCamId = ActorCutscene_GetCurrentSubCamId(this->actor.cutscene);
func_800B7298(play, &this->actor, 0x56);
this->unkState1A8 = 1;
}
if (this->cutsceneCamId != CAM_ID_MAIN) {
if (this->subCamId != SUB_CAM_ID_DONE) {
this->unk22C.y = this->actor.home.pos.y + 50.0f;
EnKakasi_CheckPlayerPosition(this, play);
this->unk238.x = D_80971FA0[this->unk190].x;
this->unk238.y = D_80971FA0[this->unk190].y;
this->unk238.z = D_80971FA0[this->unk190].z;
Math_Vec3f_Copy(&vec3fCopy, &this->unk238);
OLib_DbCameraVec3fSum(&this->actor.home, &vec3fCopy, &this->unk238, 1);
this->unk244.x = D_80971FE8[this->unk190].x + this->unk22C.x;
this->unk244.y = D_80971FE8[this->unk190].y + this->unk22C.y;
this->unk244.z = D_80971FE8[this->unk190].z + this->unk22C.z;
Math_Vec3f_Copy(&this->unk214, &this->unk238);
Math_Vec3f_Copy(&this->unk220, &this->unk244);
this->subCamEyeNext.x = D_80971FA0[this->unk190].x;
this->subCamEyeNext.y = D_80971FA0[this->unk190].y;
this->subCamEyeNext.z = D_80971FA0[this->unk190].z;
Math_Vec3f_Copy(&vec3fCopy, &this->subCamEyeNext);
OLib_DbCameraVec3fSum(&this->actor.home, &vec3fCopy, &this->subCamEyeNext, 1);
this->subCamAtNext.x = D_80971FE8[this->unk190].x + this->unk22C.x;
this->subCamAtNext.y = D_80971FE8[this->unk190].y + this->unk22C.y;
this->subCamAtNext.z = D_80971FE8[this->unk190].z + this->unk22C.z;
Math_Vec3f_Copy(&this->subCamEye, &this->subCamEyeNext);
Math_Vec3f_Copy(&this->subCamAt, &this->subCamAtNext);
}
func_8096FAAC(this, play);
@@ -798,7 +798,7 @@ void EnKakasi_DancingRemark(EnKakasi* this, PlayState* play) {
ActorCutscene_SetIntentToPlay(this->actorCutscenes[0]);
} else {
ActorCutscene_StartAndSetUnkLinkFields(this->actorCutscenes[0], &this->actor);
this->cutsceneCamId = ActorCutscene_GetCurrentCamera(this->actor.cutscene);
this->subCamId = ActorCutscene_GetCurrentSubCamId(this->actor.cutscene);
if (currentDay == 3 && gSaveContext.save.isNight) {
EnKakasi_SetupDigAway(this);
} else {
@@ -811,8 +811,8 @@ void EnKakasi_DancingRemark(EnKakasi* this, PlayState* play) {
void EnKakasi_SetupDanceNightAway(EnKakasi* this) {
this->unk190 = 0;
this->unkCounter1A4 = 0;
this->unk20C = 0.0f;
this->unk210 = 60.0f;
this->subCamFov = 0.0f;
this->subCamFovNext = 60.0f;
EnKakasi_SetAnimation(this, ENKAKASI_ANIM_TWIRL);
Math_Vec3f_Copy(&this->unk22C, &this->actor.home.pos);
func_8016566C(0xB4);
@@ -829,19 +829,19 @@ void EnKakasi_DancingNightAway(EnKakasi* this, PlayState* play) {
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.home.rot.y, 1, 3000, 0);
this->unk22C.y = this->actor.home.pos.y + 50.0f;
this->unk238.x = D_80971E38[this->unk190].x;
this->unk238.y = D_80971E38[this->unk190].y;
this->unk238.z = D_80971E38[this->unk190].z;
Math_Vec3f_Copy(&localVec3f, &this->unk238);
OLib_DbCameraVec3fSum(&this->actor.home, &localVec3f, &this->unk238, 1);
this->subCamEyeNext.x = D_80971E38[this->unk190].x;
this->subCamEyeNext.y = D_80971E38[this->unk190].y;
this->subCamEyeNext.z = D_80971E38[this->unk190].z;
Math_Vec3f_Copy(&localVec3f, &this->subCamEyeNext);
OLib_DbCameraVec3fSum(&this->actor.home, &localVec3f, &this->subCamEyeNext, 1);
if (1) {}
this->unk244.x = D_80971EEC[this->unk190].x + this->unk22C.x;
this->unk244.y = D_80971EEC[this->unk190].y + this->unk22C.y;
this->unk244.z = D_80971EEC[this->unk190].z + this->unk22C.z;
this->subCamAtNext.x = D_80971EEC[this->unk190].x + this->unk22C.x;
this->subCamAtNext.y = D_80971EEC[this->unk190].y + this->unk22C.y;
this->subCamAtNext.z = D_80971EEC[this->unk190].z + this->unk22C.z;
if (this->unk190 != 6 && this->unk190 != 7) {
Math_Vec3f_Copy(&this->unk214, &this->unk238);
Math_Vec3f_Copy(&this->unk220, &this->unk244);
Math_Vec3f_Copy(&this->subCamEye, &this->subCamEyeNext);
Math_Vec3f_Copy(&this->subCamAt, &this->subCamAtNext);
}
if (this->unk190 >= 7 && this->unk190 != 0xE) {
this->actor.shape.rot.y += 0x800;
@@ -960,8 +960,8 @@ void EnKakasi_SetupDigAway(EnKakasi* this) {
}
this->unk190 = 0;
this->unkCounter1A4 = 0;
this->unk210 = 60.0f;
this->unk20C = 60.0f;
this->subCamFovNext = 60.0f;
this->subCamFov = 60.0f;
Math_Vec3f_Copy(&this->unk22C, &this->actor.home.pos);
this->unkState196 = 4;
this->actionFunc = EnKakasi_DiggingAway;
@@ -971,19 +971,19 @@ void EnKakasi_DiggingAway(EnKakasi* this, PlayState* play) {
Vec3f tempunk238;
Vec3f tempWorldPos;
if (this->cutsceneCamId != CAM_ID_MAIN) {
if (this->subCamId != SUB_CAM_ID_DONE) {
this->unk22C.y = this->actor.home.pos.y + 50.0f;
this->unk238.x = D_80972030.x;
this->unk238.y = D_80972030.y;
this->unk238.z = D_80972030.z;
this->subCamEyeNext.x = D_80972030.x;
this->subCamEyeNext.y = D_80972030.y;
this->subCamEyeNext.z = D_80972030.z;
Math_Vec3f_Copy(&tempunk238, &this->unk238);
OLib_DbCameraVec3fSum(&this->actor.home, &tempunk238, &this->unk238, 1);
this->unk244.x = ((f32)D_8097203C.x) + this->unk22C.x; // cast req
this->unk244.y = ((f32)D_8097203C.y) + this->unk22C.y;
this->unk244.z = ((f32)D_8097203C.z) + this->unk22C.z;
Math_Vec3f_Copy(&this->unk214, &this->unk238);
Math_Vec3f_Copy(&this->unk220, &this->unk244);
Math_Vec3f_Copy(&tempunk238, &this->subCamEyeNext);
OLib_DbCameraVec3fSum(&this->actor.home, &tempunk238, &this->subCamEyeNext, 1);
this->subCamAtNext.x = ((f32)D_8097203C.x) + this->unk22C.x; // cast req
this->subCamAtNext.y = ((f32)D_8097203C.y) + this->unk22C.y;
this->subCamAtNext.z = ((f32)D_8097203C.z) + this->unk22C.z;
Math_Vec3f_Copy(&this->subCamEye, &this->subCamEyeNext);
Math_Vec3f_Copy(&this->subCamAt, &this->subCamAtNext);
func_8096FAAC(this, play);
}
@@ -1124,7 +1124,7 @@ void EnKakasi_Update(Actor* thisx, PlayState* play) {
if (this->unk1BC.x != 0.0f || this->unk1BC.z != 0.0f) {
Math_Vec3f_Copy(&this->actor.focus.pos, &this->unk1BC);
this->actor.focus.pos.y += 10.0f;
if (this->cutsceneCamId == CAM_ID_MAIN) {
if (this->subCamId == CAM_ID_MAIN) {
Math_Vec3s_Copy(&this->actor.focus.rot, &this->actor.world.rot);
} else {
Math_Vec3s_Copy(&this->actor.focus.rot, &this->actor.home.rot);
@@ -29,14 +29,14 @@ typedef struct EnKakasi {
/* 0x1C8 */ UNK_TYPE1 pad1C8[0x3C];
/* 0x204 */ s16 unk204; // set to A, F, 0x14, 0x28 frequently
/* 0x206 */ UNK_TYPE1 pad206[2];
/* 0x208 */ s16 cutsceneCamId;
/* 0x20C */ f32 unk20C; // passed to unknown function
/* 0x210 */ f32 unk210; // used as a target for 20C to approach
/* 0x214 */ Vec3f unk214; // copied from unk238 regularly
/* 0x220 */ Vec3f unk220; //EnKakasi_TeachingSong
/* 0x22C */ Vec3f unk22C; //actor home copied to here
/* 0x238 */ Vec3f unk238; //copied from D_80971E38[unk190]
/* 0x244 */ Vec3f unk244;
/* 0x208 */ s16 subCamId;
/* 0x20C */ f32 subCamFov;
/* 0x210 */ f32 subCamFovNext;
/* 0x214 */ Vec3f subCamEye;
/* 0x220 */ Vec3f subCamAt;
/* 0x22C */ Vec3f unk22C;
/* 0x238 */ Vec3f subCamEyeNext;
/* 0x244 */ Vec3f subCamAtNext;
/* 0x250 */ f32 songSummonDist;
/* 0x254 */ ColliderCylinder collider;
} EnKakasi; // size = 0x2A0
@@ -241,7 +241,7 @@ void func_80BD8758(EnPamera* this, PlayState* play) {
if (this->hideInisdeTimer++ > 1800) {
if (ActorCutscene_GetCanPlayNext(this->cutscenes[0]) && (this->cutscenes[0] != -1)) {
ActorCutscene_StartAndSetUnkLinkFields(this->cutscenes[0], &this->actor);
Camera_SetToTrackActor(Play_GetCamera(play, ActorCutscene_GetCurrentCamera(this->cutscenes[0])),
Camera_SetToTrackActor(Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(this->cutscenes[0])),
&this->actor);
this->actor.speedXZ = 1.5f;
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 1);
@@ -428,7 +428,7 @@ void func_80BD90AC(EnPamera* this, PlayState* play) {
(Math_Vec3f_DistXZ(&this->actor.home.pos, &player->actor.world.pos) < 200.0f)))) {
if ((ActorCutscene_GetCanPlayNext(this->cutscenes[1])) && ((this->cutscenes[1] != -1))) {
ActorCutscene_StartAndSetUnkLinkFields(this->cutscenes[1], &this->actor);
Camera_SetToTrackActor(Play_GetCamera(play, ActorCutscene_GetCurrentCamera(this->cutscenes[1])),
Camera_SetToTrackActor(Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(this->cutscenes[1])),
&this->actor);
EnPamera_LookDownWell(this);
} else if (this->cutscenes[1] != -1) {
@@ -339,10 +339,10 @@ void EnPametfrog_ShakeCamera(EnPametfrog* this, PlayState* play, f32 magShakeXZ,
void EnPametfrog_StopCutscene(EnPametfrog* this, PlayState* play) {
Camera* subCam;
if (this->subCamId != CAM_ID_MAIN) {
if (this->subCamId != SUB_CAM_ID_DONE) {
subCam = Play_GetCamera(play, this->subCamId);
Play_CameraSetAtEye(play, CAM_ID_MAIN, &subCam->at, &subCam->eye);
this->subCamId = CAM_ID_MAIN;
this->subCamId = SUB_CAM_ID_DONE;
ActorCutscene_Stop(this->cutscene);
func_800B724C(play, &this->actor, 6);
}
@@ -827,7 +827,7 @@ void EnPametfrog_SetupFallInAir(EnPametfrog* this, PlayState* play) {
yaw = Actor_YawToPoint(&this->actor, &this->actor.home.pos);
this->actor.world.pos.x += 30.0f * Math_SinS(yaw);
this->actor.world.pos.z += 30.0f * Math_CosS(yaw);
if (this->subCamId != CAM_ID_MAIN) {
if (this->subCamId != SUB_CAM_ID_DONE) {
xzDist = sqrtf(SQXZ(this->unk_2DC));
if (xzDist > 0.001f) {
xzDist = 200.0f / xzDist;
@@ -857,7 +857,7 @@ void EnPametfrog_FallInAir(EnPametfrog* this, PlayState* play) {
}
} else {
this->spinYaw += 0xF00;
if (this->subCamId != CAM_ID_MAIN) {
if (this->subCamId != SUB_CAM_ID_DONE) {
Play_CameraSetAtEye(play, this->subCamId, &this->actor.world.pos,
&Play_GetCamera(play, this->subCamId)->eye);
}
@@ -1006,7 +1006,7 @@ void EnPametfrog_SetupCutscene(EnPametfrog* this) {
void EnPametfrog_PlayCutscene(EnPametfrog* this, PlayState* play) {
if (ActorCutscene_GetCanPlayNext(this->cutscene)) {
ActorCutscene_Start(this->cutscene, &this->actor);
this->subCamId = ActorCutscene_GetCurrentCamera(this->cutscene);
this->subCamId = ActorCutscene_GetCurrentSubCamId(this->cutscene);
func_800B724C(play, &this->actor, 7);
if (this->actor.colChkInfo.health == 0) {
if (this->actor.params == GEKKO_PRE_SNAPPER) {
+4 -4
View File
@@ -833,7 +833,7 @@ s32 func_80AF81E8(EnPm* this, PlayState* play) {
case 4:
case 6:
if ((this->actor.child != NULL) && (this->actor.child->update != NULL)) {
Camera_SetTargetActor(Play_GetCamera(play, ActorCutscene_GetCurrentCamera(sp2A)), this->actor.child);
Camera_SetTargetActor(Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(sp2A)), this->actor.child);
}
this->unk_378++;
ret = true;
@@ -845,7 +845,7 @@ s32 func_80AF81E8(EnPm* this, PlayState* play) {
if ((gSaveContext.save.weekEventReg[86] & 8) && (this->unk_378 == 3)) {
ActorCutscene_Stop(sp2A);
} else {
Camera_SetTargetActor(Play_GetCamera(play, ActorCutscene_GetCurrentCamera(sp2A)), &this->actor);
Camera_SetTargetActor(Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(sp2A)), &this->actor);
}
this->unk_378++;
ret = true;
@@ -875,7 +875,7 @@ s32 func_80AF8348(EnPm* this, PlayState* play) {
case 4:
case 6:
case 8:
Camera_SetTargetActor(Play_GetCamera(play, ActorCutscene_GetCurrentCamera(sp2A)), &this->actor);
Camera_SetTargetActor(Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(sp2A)), &this->actor);
this->unk_378++;
ret = true;
break;
@@ -885,7 +885,7 @@ s32 func_80AF8348(EnPm* this, PlayState* play) {
case 5:
case 7:
if ((this->actor.child != NULL) && (this->actor.child->update != NULL)) {
Camera_SetTargetActor(Play_GetCamera(play, ActorCutscene_GetCurrentCamera(sp2A)), this->actor.child);
Camera_SetTargetActor(Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(sp2A)), this->actor.child);
}
this->unk_378++;
ret = true;
+38 -38
View File
@@ -96,7 +96,7 @@ Color_RGB8 D_80A94050 = { 0, 0, 0 };
s16 D_80A94054 = 500;
s16 D_80A94058 = 1500;
Vec3f D_80A9405C = { 0.0f, 1.0f, 0.0f };
static Vec3f sSubCamUp = { 0.0f, 1.0f, 0.0f };
Color_RGB8 D_80A94068 = { 225, 230, 225 };
Color_RGB8 D_80A9406C = { 120, 120, 100 };
@@ -359,7 +359,7 @@ void func_80A9156C(EnTest6* this, PlayState* play) {
ActorCutscene_SetIntentToPlay(play->playerActorCsIds[8]);
} else {
ActorCutscene_Start(play->playerActorCsIds[8], NULL);
this->unk_284 = ActorCutscene_GetCurrentCamera(play->playerActorCsIds[8]);
this->subCamId = ActorCutscene_GetCurrentSubCamId(play->playerActorCsIds[8]);
EnTest6_SetupAction(this, func_80A91760);
}
break;
@@ -369,7 +369,7 @@ void func_80A9156C(EnTest6* this, PlayState* play) {
ActorCutscene_SetIntentToPlay(play->playerActorCsIds[8]);
} else {
ActorCutscene_Start(play->playerActorCsIds[8], NULL);
this->unk_284 = ActorCutscene_GetCurrentCamera(play->playerActorCsIds[8]);
this->subCamId = ActorCutscene_GetCurrentSubCamId(play->playerActorCsIds[8]);
EnTest6_SetupAction(this, func_80A92188);
}
break;
@@ -410,15 +410,15 @@ void func_80A91760(EnTest6* this, PlayState* play) {
Input* input = CONTROLLER1(&play->state);
s16 temp_s0;
Player* player = GET_PLAYER(play);
Camera* sp78;
Vec3f sp6C;
Vec3f sp60;
Camera* mainCam;
Vec3f subCamAt;
Vec3f subCamEye;
Vec3f sp54;
s32 i;
f32 sp4C;
Camera* temp_s3 = Play_GetCamera(play, this->unk_284);
Camera* subCam = Play_GetCamera(play, this->subCamId);
sp78 = Play_GetCamera(play, CAM_ID_MAIN);
mainCam = Play_GetCamera(play, CAM_ID_MAIN);
switch (this->unk_274) {
case 90:
@@ -459,12 +459,12 @@ void func_80A91760(EnTest6* this, PlayState* play) {
this->unk_254 = ZeldaArena_Malloc(sizeof(Vec3f) * 64);
if (this->unk_254 != NULL) {
for (i = 0; i < ARRAY_COUNT(this->unk_254[0]); i++) {
(*this->unk_254)[i].x = (((2.0f * Rand_ZeroOne()) - 1.0f) * 40.0f) + temp_s3->eye.x +
((temp_s3->at.x - temp_s3->eye.x) * 0.2f);
(*this->unk_254)[i].y = (((2.0f * Rand_ZeroOne()) - 1.0f) * 120.0f) + temp_s3->eye.y +
((temp_s3->at.y - temp_s3->eye.y) * 0.2f) + sp4C;
(*this->unk_254)[i].z = (((2.0f * Rand_ZeroOne()) - 1.0f) * 40.0f) + temp_s3->eye.z +
((temp_s3->at.z - temp_s3->eye.z) * 0.2f);
(*this->unk_254)[i].x = (((2.0f * Rand_ZeroOne()) - 1.0f) * 40.0f) + subCam->eye.x +
((subCam->at.x - subCam->eye.x) * 0.2f);
(*this->unk_254)[i].y = (((2.0f * Rand_ZeroOne()) - 1.0f) * 120.0f) + subCam->eye.y +
((subCam->at.y - subCam->eye.y) * 0.2f) + sp4C;
(*this->unk_254)[i].z = (((2.0f * Rand_ZeroOne()) - 1.0f) * 40.0f) + subCam->eye.z +
((subCam->at.z - subCam->eye.z) * 0.2f);
}
}
func_80A90C08(0x78);
@@ -562,29 +562,29 @@ void func_80A91760(EnTest6* this, PlayState* play) {
}
if (this->unk_27A > 80) {
temp_s3->fov += (90.0f - temp_s3->fov) / (this->unk_27A - 80);
subCam->fov += (90.0f - subCam->fov) / (this->unk_27A - 80);
} else if (this->unk_27A > 60) {
sp4C = 1.0f / (this->unk_27A - 60);
sp6C.x = temp_s3->at.x + ((player->actor.world.pos.x - temp_s3->at.x) * sp4C);
sp6C.y = temp_s3->at.y + (((player->actor.focus.pos.y - temp_s3->at.y) - 20.0f) * sp4C);
sp6C.z = temp_s3->at.z + ((player->actor.world.pos.z - temp_s3->at.z) * sp4C);
subCamAt.x = subCam->at.x + ((player->actor.world.pos.x - subCam->at.x) * sp4C);
subCamAt.y = subCam->at.y + (((player->actor.focus.pos.y - subCam->at.y) - 20.0f) * sp4C);
subCamAt.z = subCam->at.z + ((player->actor.world.pos.z - subCam->at.z) * sp4C);
sp54.x = (Math_SinS(player->actor.world.rot.y) * 80.0f) + sp6C.x;
sp54.y = sp6C.y + 20.0f;
sp54.z = (Math_CosS(player->actor.world.rot.y) * 80.0f) + sp6C.z;
sp54.x = (Math_SinS(player->actor.world.rot.y) * 80.0f) + subCamAt.x;
sp54.y = subCamAt.y + 20.0f;
sp54.z = (Math_CosS(player->actor.world.rot.y) * 80.0f) + subCamAt.z;
sp4C *= 0.75f;
VEC3F_LERPIMPDST(&sp60, &temp_s3->eye, &sp54, sp4C);
VEC3F_LERPIMPDST(&subCamEye, &subCam->eye, &sp54, sp4C);
Play_CameraSetAtEye(play, this->unk_284, &sp6C, &sp60);
Play_CameraSetAtEye(play, this->subCamId, &subCamAt, &subCamEye);
} else if ((this->unk_27A < 11) && (this->unk_27A > 0)) {
temp_s3->fov += (sp78->fov - temp_s3->fov) / this->unk_27A;
subCam->fov += (mainCam->fov - subCam->fov) / this->unk_27A;
}
if (this->unk_286 != 0) {
func_80A90C54(play, this->unk_286 * 0.05f);
temp_s3->fov += (sp78->fov - temp_s3->fov) * 0.05f;
subCam->fov += (mainCam->fov - subCam->fov) * 0.05f;
this->unk_286++;
if (this->unk_286 >= 20) {
this->unk_27A = 1;
@@ -630,10 +630,10 @@ void func_80A92118(EnTest6* this, PlayState* play) {
void func_80A92188(EnTest6* this, PlayState* play) {
Input* input = CONTROLLER1(&play->state);
Player* player = GET_PLAYER(play);
Camera* camera;
Camera* subCam;
s32 pad;
s16 sp46;
s16 sp44;
s16 subCamId;
s16 pad2;
if (this->unk_27A > 115) {
this->unk_160 += 0.2f;
@@ -736,23 +736,23 @@ void func_80A92188(EnTest6* this, PlayState* play) {
func_80A92950(this, play);
if (this->unk_27A == 115) {
sp44 = ActorCutscene_GetCurrentCamera(play->playerActorCsIds[8]);
camera = Play_GetCamera(play, sp44);
subCamId = ActorCutscene_GetCurrentSubCamId(play->playerActorCsIds[8]);
subCam = Play_GetCamera(play, subCamId);
this->unk_258 = camera->at;
this->unk_264 = camera->eye;
this->unk_270 = camera->fov;
func_8016119C(camera, &this->unk_18C);
this->subCamAt = subCam->at;
this->subCamEye = subCam->eye;
this->subCamFov = subCam->fov;
func_8016119C(subCam, &this->unk_18C);
}
if ((this->unk_27A <= 115) && (this->unk_27A >= 16)) {
func_80161998(D_80A93E80, &this->unk_18C);
} else if (this->unk_27A < 16) {
sp46 = ActorCutscene_GetCurrentCamera(play->playerActorCsIds[8]);
subCamId = ActorCutscene_GetCurrentSubCamId(play->playerActorCsIds[8]);
Play_CameraSetAtEyeUp(play, sp46, &this->unk_258, &this->unk_264, &D_80A9405C);
Play_CameraSetFov(play, sp46, this->unk_270);
Play_CameraSetRoll(play, sp46, 0);
Play_CameraSetAtEyeUp(play, subCamId, &this->subCamAt, &this->subCamEye, &sSubCamUp);
Play_CameraSetFov(play, subCamId, this->subCamFov);
Play_CameraSetRoll(play, subCamId, 0);
}
switch (this->unk_27A) {
@@ -34,9 +34,9 @@ typedef struct EnTest6 {
/* 0x18C */ DbCameraUnkStruct unk_18C;
/* 0x20C */ Vec3f unk_20C[6];
/* 0x254 */ Vec3f (*unk_254)[64];
/* 0x258 */ Vec3f unk_258;
/* 0x264 */ Vec3f unk_264;
/* 0x270 */ f32 unk_270;
/* 0x258 */ Vec3f subCamAt;
/* 0x264 */ Vec3f subCamEye;
/* 0x270 */ f32 subCamFov;
/* 0x274 */ s16 unk_274;
/* 0x276 */ s16 unk_276;
/* 0x278 */ s16 unk_278;
@@ -45,7 +45,7 @@ typedef struct EnTest6 {
/* 0x27E */ s16 unk_27E;
/* 0x280 */ s16 unk_280;
/* 0x282 */ s16 unk_282;
/* 0x284 */ s16 unk_284;
/* 0x284 */ s16 subCamId;
/* 0x286 */ s16 unk_286;
} EnTest6; // size = 0x288
+73 -73
View File
@@ -452,11 +452,11 @@ void func_80AF1A2C(EnTest7* this, PlayState* play) {
func_800FD698(play, 2000, 4000, sp2C);
if (this->unk_1E54 >= 10) {
Camera* camera = Play_GetCamera(play, ActorCutscene_GetCurrentCamera(play->playerActorCsIds[8]));
Camera* subCam = Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(play->playerActorCsIds[8]));
this->unk_1E60 = camera->eye;
this->unk_1E6C = camera->at;
this->unk_1E78 = camera->fov;
this->subCamEye = subCam->eye;
this->subCamAt = subCam->at;
this->subCamFov = subCam->fov;
func_80AF082C(this, func_80AF1CA0);
this->unk_144 |= 0x20;
@@ -514,12 +514,12 @@ void func_80AF1CA0(EnTest7* this, PlayState* play) {
}
if (Rand_ZeroOne() < 0.3f) {
Camera* camera = Play_GetCamera(play, ActorCutscene_GetCurrentCamera(play->playerActorCsIds[8]));
Camera* subCam = Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(play->playerActorCsIds[8]));
f32 rand = Rand_ZeroOne();
sp34.x = ((camera->eye.x - this->actor.world.pos.x) * rand) + this->actor.world.pos.x;
sp34.y = ((camera->eye.y - this->actor.world.pos.y) * rand) + this->actor.world.pos.y;
sp34.z = ((camera->eye.z - this->actor.world.pos.z) * rand) + this->actor.world.pos.z;
sp34.x = ((subCam->eye.x - this->actor.world.pos.x) * rand) + this->actor.world.pos.x;
sp34.y = ((subCam->eye.y - this->actor.world.pos.y) * rand) + this->actor.world.pos.y;
sp34.z = ((subCam->eye.z - this->actor.world.pos.z) * rand) + this->actor.world.pos.z;
func_80AF0C30(this->unk_15C, &sp34, 1);
this->unk_144 |= 8;
@@ -531,17 +531,17 @@ void func_80AF1CA0(EnTest7* this, PlayState* play) {
void func_80AF1E44(EnTest7* this, PlayState* play) {
Vec3f sp34;
Camera* camera;
Camera* subCam;
f32 rand;
func_80AF1B68(this, play);
if (Rand_ZeroOne() < 0.3f) {
camera = Play_GetCamera(play, ActorCutscene_GetCurrentCamera(play->playerActorCsIds[8]));
subCam = Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(play->playerActorCsIds[8]));
rand = Rand_ZeroOne();
sp34.x = ((camera->eye.x - this->actor.world.pos.x) * rand) + this->actor.world.pos.x;
sp34.y = ((camera->eye.y - this->actor.world.pos.y) * rand) + this->actor.world.pos.y;
sp34.z = ((camera->eye.z - this->actor.world.pos.z) * rand) + this->actor.world.pos.z;
sp34.x = ((subCam->eye.x - this->actor.world.pos.x) * rand) + this->actor.world.pos.x;
sp34.y = ((subCam->eye.y - this->actor.world.pos.y) * rand) + this->actor.world.pos.y;
sp34.z = ((subCam->eye.z - this->actor.world.pos.z) * rand) + this->actor.world.pos.z;
func_80AF0C30(this->unk_15C, &sp34, 1);
}
@@ -576,7 +576,7 @@ void func_80AF2030(EnTest7* this, PlayState* play) {
s32 temp = this->unk_1E54 - 96;
f32 four = 4;
f32 sp1C = 1.0f - (temp / four);
Camera* camera;
Camera* subCam;
f32 temp_f2;
f32 temp_f4;
@@ -585,13 +585,13 @@ void func_80AF2030(EnTest7* this, PlayState* play) {
this->unk_148.unk_10 -= 0x2EE0;
this->actor.world.pos.y += 100.0f;
camera = Play_GetCamera(play, ActorCutscene_GetCurrentCamera(play->playerActorCsIds[8]));
camera->focalActor = NULL;
subCam = Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(play->playerActorCsIds[8]));
subCam->focalActor = NULL;
camera->eye.x = ((camera->eye.x - this->unk_1E60.x) * sp1C) + this->unk_1E60.x;
camera->eye.y = ((camera->eye.y - this->unk_1E60.y) * sp1C) + this->unk_1E60.y;
camera->eye.z = ((camera->eye.z - this->unk_1E60.z) * sp1C) + this->unk_1E60.z;
camera->fov = ((camera->fov - this->unk_1E78) * sp1C) + this->unk_1E78;
subCam->eye.x = ((subCam->eye.x - this->subCamEye.x) * sp1C) + this->subCamEye.x;
subCam->eye.y = ((subCam->eye.y - this->subCamEye.y) * sp1C) + this->subCamEye.y;
subCam->eye.z = ((subCam->eye.z - this->subCamEye.z) * sp1C) + this->subCamEye.z;
subCam->fov = ((subCam->fov - this->subCamFov) * sp1C) + this->subCamFov;
if (this->unk_1E54 >= 100) {
MREG(64) = 1;
@@ -679,31 +679,31 @@ void func_80AF24D8(EnTest7* this, PlayState* play, f32 arg2) {
Vec3f sp3C;
Vec3f* pos;
Player* player = GET_PLAYER(play);
Camera* camera = Play_GetCamera(play, ActorCutscene_GetCurrentCamera(play->playerActorCsIds[8]));
Camera* subCam = Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(play->playerActorCsIds[8]));
pos = &player->actor.world.pos;
camera->focalActor = NULL;
subCam->focalActor = NULL;
sp3C.x = ((180.0f * Math_SinS(this->unk_1E8E)) * Math_CosS(0xFA0)) + pos->x;
sp3C.y = (Math_SinS(0xFA0) * 180.0f) + pos->y;
sp3C.z = ((180.0f * Math_CosS(this->unk_1E8E)) * Math_CosS(0xFA0)) + pos->z;
camera->eye.x = ((sp3C.x - camera->eye.x) * arg2) + camera->eye.x;
camera->eye.y = ((sp3C.y - camera->eye.y) * arg2) + camera->eye.y;
camera->eye.z = ((sp3C.z - camera->eye.z) * arg2) + camera->eye.z;
subCam->eye.x = ((sp3C.x - subCam->eye.x) * arg2) + subCam->eye.x;
subCam->eye.y = ((sp3C.y - subCam->eye.y) * arg2) + subCam->eye.y;
subCam->eye.z = ((sp3C.z - subCam->eye.z) * arg2) + subCam->eye.z;
camera->fov = ((this->unk_1E78 - camera->fov) * arg2) + camera->fov;
camera->at.y += 1.4444444f;
subCam->fov = ((this->subCamFov - subCam->fov) * arg2) + subCam->fov;
subCam->at.y += 1.4444444f;
}
void func_80AF2654(EnTest7* this, PlayState* play, f32 arg2) {
Vec3f* pos;
Player* player = GET_PLAYER(play);
Camera* camera;
Camera* subCam;
Vec3f sp30;
camera = Play_GetCamera(play, ActorCutscene_GetCurrentCamera(play->playerActorCsIds[8]));
camera->focalActor = NULL;
subCam = Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(play->playerActorCsIds[8]));
subCam->focalActor = NULL;
pos = &player->actor.world.pos;
@@ -711,15 +711,15 @@ void func_80AF2654(EnTest7* this, PlayState* play, f32 arg2) {
sp30.y = (Math_SinS(0xBB8) * 80.0f) + pos->y;
sp30.z = ((80.0f * Math_CosS(this->unk_1E8E)) * Math_CosS(0xBB8)) + pos->z;
camera->eye.x = ((sp30.x - camera->eye.x) * arg2) + camera->eye.x;
camera->eye.y = ((sp30.y - camera->eye.y) * arg2) + camera->eye.y;
camera->eye.z = ((sp30.z - camera->eye.z) * arg2) + camera->eye.z;
subCam->eye.x = ((sp30.x - subCam->eye.x) * arg2) + subCam->eye.x;
subCam->eye.y = ((sp30.y - subCam->eye.y) * arg2) + subCam->eye.y;
subCam->eye.z = ((sp30.z - subCam->eye.z) * arg2) + subCam->eye.z;
camera->at.x = ((pos->x - camera->at.x) * arg2) + camera->at.x;
camera->at.y = (((pos->y + 40.0f) - camera->at.y) * arg2) + camera->at.y;
camera->at.z = ((pos->z - camera->at.z) * arg2) + camera->at.z;
subCam->at.x = ((pos->x - subCam->at.x) * arg2) + subCam->at.x;
subCam->at.y = (((pos->y + 40.0f) - subCam->at.y) * arg2) + subCam->at.y;
subCam->at.z = ((pos->z - subCam->at.z) * arg2) + subCam->at.z;
camera->fov = ((this->unk_1E78 - camera->fov) * arg2) + camera->fov;
subCam->fov = ((this->subCamFov - subCam->fov) * arg2) + subCam->fov;
}
void func_80AF2808(EnTest7* this, PlayState* play, f32 arg2) {
@@ -771,19 +771,19 @@ void func_80AF29C0(EnTest7* this, PlayState* play) {
s32 pad;
Player* player = GET_PLAYER(play);
Vec3f* pos = &player->actor.world.pos;
Camera* temp_s0 = Play_GetCamera(play, ActorCutscene_GetCurrentCamera(play->playerActorCsIds[8]));
Camera* subCam = Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(play->playerActorCsIds[8]));
temp_s0->at.x = ((D_80AF3454 * Math_SinS(D_80AF3450[0]) * Math_CosS(D_80AF3450[1]))) + pos->x;
temp_s0->at.y = (Math_SinS(D_80AF3450[1]) * D_80AF3454) + pos->y;
temp_s0->at.z = ((D_80AF3454 * Math_CosS(D_80AF3450[0])) * Math_CosS(D_80AF3450[1])) + pos->z;
subCam->at.x = ((D_80AF3454 * Math_SinS(D_80AF3450[0]) * Math_CosS(D_80AF3450[1]))) + pos->x;
subCam->at.y = (Math_SinS(D_80AF3450[1]) * D_80AF3454) + pos->y;
subCam->at.z = ((D_80AF3454 * Math_CosS(D_80AF3450[0])) * Math_CosS(D_80AF3450[1])) + pos->z;
this->actor.world.pos.x = temp_s0->at.x;
this->actor.world.pos.y = temp_s0->at.y - 40.0f;
this->actor.world.pos.z = temp_s0->at.z;
this->actor.world.pos.x = subCam->at.x;
this->actor.world.pos.y = subCam->at.y - 40.0f;
this->actor.world.pos.z = subCam->at.z;
}
void func_80AF2AE8(EnTest7* this, PlayState* play) {
Camera* camera;
Camera* subCam;
if (!ActorCutscene_GetCanPlayNext(play->playerActorCsIds[8])) {
ActorCutscene_SetIntentToPlay(play->playerActorCsIds[8]);
@@ -793,9 +793,9 @@ void func_80AF2AE8(EnTest7* this, PlayState* play) {
ActorCutscene_Start(play->playerActorCsIds[8], NULL);
func_80AF082C(this, func_80AF2C48);
camera = Play_GetCamera(play, ActorCutscene_GetCurrentCamera(play->playerActorCsIds[8]));
this->unk_1E60 = camera->eye;
this->unk_1E6C = camera->at;
subCam = Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(play->playerActorCsIds[8]));
this->subCamEye = subCam->eye;
this->subCamAt = subCam->at;
func_80AF29C0(this, play);
}
@@ -804,21 +804,21 @@ void func_80AF2BAC(EnTest7* this, PlayState* play, Vec3f* arg2, f32 arg3) {
f32 x;
f32 y;
f32 z;
Camera* camera = Play_GetCamera(play, ActorCutscene_GetCurrentCamera(play->playerActorCsIds[8]));
Camera* subCam = Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(play->playerActorCsIds[8]));
camera->focalActor = NULL;
x = ((camera->at.x - arg2->x) * arg3) + arg2->x;
y = ((camera->at.y - arg2->y) * arg3) + arg2->y;
z = ((camera->at.z - arg2->z) * arg3) + arg2->z;
subCam->focalActor = NULL;
x = ((subCam->at.x - arg2->x) * arg3) + arg2->x;
y = ((subCam->at.y - arg2->y) * arg3) + arg2->y;
z = ((subCam->at.z - arg2->z) * arg3) + arg2->z;
camera->at.x = x;
camera->at.y = y;
camera->at.z = z;
subCam->at.x = x;
subCam->at.y = y;
subCam->at.z = z;
}
void func_80AF2C48(EnTest7* this, PlayState* play) {
f32 sp24 = (40 - this->unk_1E54) / 40.0f;
Camera* camera;
Camera* subCam;
this->unk_148.unk_00 = 11.0f;
this->unk_144 |= 4;
@@ -830,12 +830,12 @@ void func_80AF2C48(EnTest7* this, PlayState* play) {
this->actor.world.pos.y = ((this->actor.world.pos.y - this->actor.home.pos.y) * sp24) + this->actor.home.pos.y;
this->actor.world.pos.z = ((this->actor.world.pos.z - this->actor.home.pos.z) * sp24) + this->actor.home.pos.z;
camera = Play_GetCamera(play, ActorCutscene_GetCurrentCamera(play->playerActorCsIds[8]));
subCam = Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(play->playerActorCsIds[8]));
func_80AF2BAC(this, play, &this->actor.home.pos, sp24);
camera->at.x = this->actor.world.pos.x;
camera->at.y = this->actor.world.pos.y + 40.0f;
camera->at.z = this->actor.world.pos.z;
subCam->at.x = this->actor.world.pos.x;
subCam->at.y = this->actor.world.pos.y + 40.0f;
subCam->at.z = this->actor.world.pos.z;
func_800B9010(&this->actor, NA_SE_PL_WARP_WING_ROLL_2 - SFX_FLAG);
if (this->unk_1E54 >= 40) {
@@ -845,23 +845,23 @@ void func_80AF2C48(EnTest7* this, PlayState* play) {
}
void func_80AF2DB4(EnTest7* this, PlayState* play) {
Camera* camera;
Camera* subCam;
Player* player = GET_PLAYER(play);
Vec3f* pos = &player->actor.world.pos;
camera = Play_GetCamera(play, ActorCutscene_GetCurrentCamera(play->playerActorCsIds[8]));
subCam = Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(play->playerActorCsIds[8]));
camera->eye.x = (Math_SinS(-player->actor.shape.rot.y) * 200.0f * -0.83907f) + pos->x;
camera->eye.y = pos->y + 108.8042f;
camera->eye.z = (Math_CosS(-player->actor.shape.rot.y) * 200.0f * -0.83907f) + pos->z;
subCam->eye.x = (Math_SinS(-player->actor.shape.rot.y) * 200.0f * -0.83907f) + pos->x;
subCam->eye.y = pos->y + 108.8042f;
subCam->eye.z = (Math_CosS(-player->actor.shape.rot.y) * 200.0f * -0.83907f) + pos->z;
camera->at.x = pos->x;
camera->at.y = pos->y + 40.0f;
camera->at.z = pos->z;
subCam->at.x = pos->x;
subCam->at.y = pos->y + 40.0f;
subCam->at.z = pos->z;
}
void func_80AF2EC8(EnTest7* this, PlayState* play) {
Camera* camera;
Camera* subCam;
if (!ActorCutscene_GetCanPlayNext(play->playerActorCsIds[8])) {
ActorCutscene_SetIntentToPlay(play->playerActorCsIds[8]);
@@ -869,9 +869,9 @@ void func_80AF2EC8(EnTest7* this, PlayState* play) {
ActorCutscene_Start(play->playerActorCsIds[8], NULL);
func_80AF082C(this, func_80AF2F98);
camera = Play_GetCamera(play, ActorCutscene_GetCurrentCamera(play->playerActorCsIds[8]));
this->unk_1E60 = camera->eye;
this->unk_1E6C = camera->at;
subCam = Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(play->playerActorCsIds[8]));
this->subCamEye = subCam->eye;
this->subCamAt = subCam->at;
this->unk_1E54 = 40;
func_80AF2DB4(this, play);
@@ -51,9 +51,9 @@ typedef struct EnTest7 {
/* 0x1E54 */ s32 unk_1E54;
/* 0x1E58 */ EnTest7UnkFunc unk_1E58;
/* 0x1E5C */ EnTest7ActionFunc actionFunc;
/* 0x1E60 */ Vec3f unk_1E60;
/* 0x1E6C */ Vec3f unk_1E6C;
/* 0x1E78 */ f32 unk_1E78;
/* 0x1E60 */ Vec3f subCamEye;
/* 0x1E6C */ Vec3f subCamAt;
/* 0x1E78 */ f32 subCamFov;
/* 0x1E7C */ LightNode* lightNode;
/* 0x1E80 */ LightInfo lightInfo;
/* 0x1E8E */ s16 unk_1E8E;
+14 -14
View File
@@ -63,20 +63,20 @@ void func_808A7A5C(ObjWturn* this, PlayState* play) {
void func_808A7AAC(ObjWturn* this, PlayState* play) {
Player* player = GET_PLAYER(play);
Vec3f eye;
Vec3f at;
Vec3f subCamEye;
Vec3f subCamAt;
ActorCutscene_StartAndSetUnkLinkFields(this->actor.cutscene, &this->actor);
func_8016566C(140);
this->camId = ActorCutscene_GetCurrentCamera(this->actor.cutscene);
this->subCamId = ActorCutscene_GetCurrentSubCamId(this->actor.cutscene);
func_800B7298(play, &this->actor, 21);
at.x = player->actor.focus.pos.x;
at.z = player->actor.focus.pos.z;
at.y = player->actor.focus.pos.y;
eye.x = (Math_SinS(this->actor.shape.rot.y) * 150.0f) + at.x;
eye.z = (Math_CosS(this->actor.shape.rot.y) * 150.0f) + at.z;
eye.y = at.y + 4.0f;
Play_CameraSetAtEye(play, this->camId, &at, &eye);
subCamAt.x = player->actor.focus.pos.x;
subCamAt.z = player->actor.focus.pos.z;
subCamAt.y = player->actor.focus.pos.y;
subCamEye.x = (Math_SinS(this->actor.shape.rot.y) * 150.0f) + subCamAt.x;
subCamEye.z = (Math_CosS(this->actor.shape.rot.y) * 150.0f) + subCamAt.z;
subCamEye.y = subCamAt.y + 4.0f;
Play_CameraSetAtEye(play, this->subCamId, &subCamAt, &subCamEye);
this->actionFunc = func_808A7BA0;
}
@@ -85,7 +85,7 @@ void func_808A7BA0(ObjWturn* this, PlayState* play) {
func_808A7C04(this, play);
}
func_800B8FE8(&this->actor, NA_SE_EV_EARTHQUAKE - SFX_FLAG);
Play_CameraSetRoll(play, this->camId, this->actor.shape.rot.z);
Play_CameraSetRoll(play, this->subCamId, this->actor.shape.rot.z);
}
void func_808A7C04(ObjWturn* this, PlayState* play) {
@@ -101,13 +101,13 @@ void func_808A7C04(ObjWturn* this, PlayState* play) {
}
void func_808A7C78(ObjWturn* this, PlayState* play) {
static Vec3f D_808A7DC0 = { 0.0f, -1.0f, 0.0f };
Camera* camera = Play_GetCamera(play, this->camId);
static Vec3f sSubCamUp = { 0.0f, -1.0f, 0.0f };
Camera* subCam = Play_GetCamera(play, this->subCamId);
Player* player = GET_PLAYER(play);
this->unk_14A++;
player->actor.world.pos.y = this->actor.world.pos.y + this->unk_14A * 4.0f;
Play_CameraSetAtEyeUp(play, this->camId, &player->actor.focus.pos, &camera->eye, &D_808A7DC0);
Play_CameraSetAtEyeUp(play, this->subCamId, &player->actor.focus.pos, &subCam->eye, &sSubCamUp);
if (this->unk_14A == 1) {
play->transitionType = TRANS_TYPE_64;
gSaveContext.nextTransitionType = TRANS_TYPE_03;
@@ -10,7 +10,7 @@ typedef void (*ObjWturnActionFunc)(struct ObjWturn*, PlayState*);
typedef struct ObjWturn {
/* 0x000 */ Actor actor;
/* 0x144 */ ObjWturnActionFunc actionFunc;
/* 0x148 */ s16 camId;
/* 0x148 */ s16 subCamId;
/* 0x14A */ s16 unk_14A;
} ObjWturn; // size = 0x14C
+2 -2
View File
@@ -1657,7 +1657,7 @@
0x800F20F8:("ActorCutscene_GetLength",),
0x800F2138:("func_800F2138",),
0x800F2178:("func_800F2178",),
0x800F21B8:("ActorCutscene_GetCurrentCamera",),
0x800F21B8:("ActorCutscene_GetCurrentSubCamId",),
0x800F21CC:("func_800F21CC",),
0x800F22C4:("func_800F22C4",),
0x800F23C4:("ActorCutscene_SetReturnCamera",),
@@ -14137,7 +14137,7 @@
0x80B5EE3C:("EnDragon_RetreatOrIdle",),
0x80B5EF88:("EnDragon_SetupExtend",),
0x80B5EFD0:("EnDragon_Extend",),
0x80B5F3A4:("EnDragon_CameraSetAtEye",),
0x80B5F3A4:("EnDragon_SetSubCamEyeAt",),
0x80B5F418:("EnDragon_SetupGrab",),
0x80B5F508:("EnDragon_Grab",),
0x80B5F888:("EnDragon_SetupAttack",),
+2
View File
@@ -590,6 +590,8 @@ wordReplace = {
"func_8010A54C": "Minimap_Draw",
"func_8010A580": "Map_Update",
"ActorCutscene_GetCurrentCamera": "ActorCutscene_GetCurrentSubCamId",
# Structs
"ActorAnimationEntry": "AnimationInfo",
"ActorAnimationEntryS": "AnimationInfoS",
+1 -1
View File
@@ -1171,7 +1171,7 @@ asm/non_matchings/code/z_eventmgr/ActorCutscene_GetAdditionalCutscene.s,ActorCut
asm/non_matchings/code/z_eventmgr/ActorCutscene_GetLength.s,ActorCutscene_GetLength,0x800F20F8,0x10
asm/non_matchings/code/z_eventmgr/func_800F2138.s,func_800F2138,0x800F2138,0x10
asm/non_matchings/code/z_eventmgr/func_800F2178.s,func_800F2178,0x800F2178,0x10
asm/non_matchings/code/z_eventmgr/ActorCutscene_GetCurrentCamera.s,ActorCutscene_GetCurrentCamera,0x800F21B8,0x5
asm/non_matchings/code/z_eventmgr/ActorCutscene_GetCurrentSubCamId.s,ActorCutscene_GetCurrentSubCamId,0x800F21B8,0x5
asm/non_matchings/code/z_eventmgr/func_800F21CC.s,func_800F21CC,0x800F21CC,0x3E
asm/non_matchings/code/z_eventmgr/func_800F22C4.s,func_800F22C4,0x800F22C4,0x40
asm/non_matchings/code/z_eventmgr/ActorCutscene_SetReturnCamera.s,ActorCutscene_SetReturnCamera,0x800F23C4,0x7
1 asm/non_matchings/code/z_en_a_keep/EnAObj_Init.s EnAObj_Init 0x800A5AC0 0x2B
1171 asm/non_matchings/code/z_eventmgr/ActorCutscene_GetLength.s ActorCutscene_GetLength 0x800F20F8 0x10
1172 asm/non_matchings/code/z_eventmgr/func_800F2138.s func_800F2138 0x800F2138 0x10
1173 asm/non_matchings/code/z_eventmgr/func_800F2178.s func_800F2178 0x800F2178 0x10
1174 asm/non_matchings/code/z_eventmgr/ActorCutscene_GetCurrentCamera.s asm/non_matchings/code/z_eventmgr/ActorCutscene_GetCurrentSubCamId.s ActorCutscene_GetCurrentCamera ActorCutscene_GetCurrentSubCamId 0x800F21B8 0x5
1175 asm/non_matchings/code/z_eventmgr/func_800F21CC.s func_800F21CC 0x800F21CC 0x3E
1176 asm/non_matchings/code/z_eventmgr/func_800F22C4.s func_800F22C4 0x800F22C4 0x40
1177 asm/non_matchings/code/z_eventmgr/ActorCutscene_SetReturnCamera.s ActorCutscene_SetReturnCamera 0x800F23C4 0x7