diff --git a/include/functions.h b/include/functions.h index 9cc9cd25b4..e5ca798e7a 100644 --- a/include/functions.h +++ b/include/functions.h @@ -640,7 +640,7 @@ s32 DynaPolyActor_IsPlayerAbove(DynaPolyActor* dynaActor); s32 func_800435B4(DynaPolyActor* dynaActor); s32 func_800435D8(PlayState* play, DynaPolyActor* dynaActor, s16 arg2, s16 arg3, s16 arg4); void Camera_Init(Camera* camera, View* view, CollisionContext* colCtx, PlayState* play); -void Camera_InitPlayerSettings(Camera* camera, Player* player); +void Camera_InitDataUsingPlayer(Camera* camera, Player* player); s16 Camera_ChangeStatus(Camera* camera, s16 status); Vec3s Camera_Update(Camera* camera); void Camera_Finish(Camera* camera); @@ -1317,14 +1317,14 @@ s16 Play_ChangeCameraStatus(PlayState* this, s16 camId, s16 status); void Play_ClearCamera(PlayState* this, s16 camId); void Play_ClearAllSubCameras(PlayState* this); Camera* Play_GetCamera(PlayState* this, s16 camId); -s32 Play_CameraSetAtEye(PlayState* this, s16 camId, Vec3f* at, Vec3f* eye); -s32 Play_CameraSetAtEyeUp(PlayState* this, s16 camId, Vec3f* at, Vec3f* eye, Vec3f* up); -s32 Play_CameraSetFov(PlayState* this, s16 camId, f32 fov); +s32 Play_SetCameraAtEye(PlayState* this, s16 camId, Vec3f* at, Vec3f* eye); +s32 Play_SetCameraAtEyeUp(PlayState* this, s16 camId, Vec3f* at, Vec3f* eye, Vec3f* up); +s32 Play_SetCameraFov(PlayState* this, s16 camId, f32 fov); s32 Play_SetCameraRoll(PlayState* this, s16 camId, s16 roll); void Play_CopyCamera(PlayState* this, s16 destCamId, s16 srcCamId); -s32 func_800C0808(PlayState* this, s16 camId, Player* player, s16 setting); -s32 Play_CameraChangeSetting(PlayState* this, s16 camId, s16 setting); -void func_800C08AC(PlayState* this, s16 camId, s16 arg2); +s32 Play_InitCameraDataUsingPlayer(PlayState* this, s16 camId, Player* player, s16 setting); +s32 Play_ChangeCameraSetting(PlayState* this, s16 camId, s16 setting); +void Play_ReturnToMainCam(PlayState* this, s16 camId, s16 duration); void Play_SaveSceneFlags(PlayState* this); void Play_SetupRespawnPoint(PlayState* this, s32 respawnMode, s32 playerParams); void Play_TriggerVoidOut(PlayState* this); diff --git a/src/code/z_camera.c b/src/code/z_camera.c index dcd9c2c399..af63cc0772 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -7133,7 +7133,7 @@ void func_80057FC4(Camera* camera) { void Camera_Stub80058140(Camera* camera) { } -void Camera_InitPlayerSettings(Camera* camera, Player* player) { +void Camera_InitDataUsingPlayer(Camera* camera, Player* player) { PosRot playerPosShape; VecGeo eyeNextAtOffset; s32 bgId; diff --git a/src/code/z_demo.c b/src/code/z_demo.c index 7193a034c2..4b3a239948 100644 --- a/src/code/z_demo.c +++ b/src/code/z_demo.c @@ -1347,7 +1347,7 @@ s32 Cutscene_Command_CameraEyePoints(PlayState* play, CutsceneContext* csCtx, u8 if (csCtx->unk_1A != 0) { csCtx->unk_18 = cmdBase->startFrame; if (D_8015FCC8 != 0) { - Play_CameraChangeSetting(play, csCtx->subCamId, CAM_SET_CS_0); + Play_ChangeCameraSetting(play, csCtx->subCamId, CAM_SET_CS_0); Play_ChangeCameraStatus(play, sReturnToCamId, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, csCtx->subCamId, CAM_STAT_ACTIVE); Camera_ResetAnim(Play_GetCamera(play, csCtx->subCamId)); @@ -1384,7 +1384,7 @@ s32 Cutscene_Command_CameraLookAtPoints(PlayState* play, CutsceneContext* csCtx, if (csCtx->unk_1B != 0) { D_8015FCC0 = cmdBase->startFrame; if (D_8015FCC8 != 0) { - Play_CameraChangeSetting(play, csCtx->subCamId, CAM_SET_CS_0); + Play_ChangeCameraSetting(play, csCtx->subCamId, CAM_SET_CS_0); Play_ChangeCameraStatus(play, sReturnToCamId, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, csCtx->subCamId, CAM_STAT_ACTIVE); Camera_ResetAnim(Play_GetCamera(play, csCtx->subCamId)); @@ -1428,7 +1428,7 @@ s32 Cutscene_Command_07(PlayState* play, CutsceneContext* csCtx, u8* cmd, u8 unu subCam->player = NULL; Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, csCtx->subCamId, CAM_STAT_ACTIVE); - Play_CameraChangeSetting(play, csCtx->subCamId, CAM_SET_FREE0); + Play_ChangeCameraSetting(play, csCtx->subCamId, CAM_SET_FREE0); sp28 = csCtx->subCamLookAtPoints->cameraRoll * 1.40625f; Camera_SetViewParam(subCam, CAM_VIEW_ROLL, &sp28); sp3C.x = csCtx->subCamLookAtPoints->pos.x; @@ -1437,8 +1437,8 @@ s32 Cutscene_Command_07(PlayState* play, CutsceneContext* csCtx, u8* cmd, u8 unu sp30.x = csCtx->subCamEyePoints->pos.x; sp30.y = csCtx->subCamEyePoints->pos.y; sp30.z = csCtx->subCamEyePoints->pos.z; - Play_CameraSetAtEye(play, csCtx->subCamId, &sp3C, &sp30); - Play_CameraSetFov(play, csCtx->subCamId, csCtx->subCamEyePoints->viewAngle); + Play_SetCameraAtEye(play, csCtx->subCamId, &sp3C, &sp30); + Play_SetCameraFov(play, csCtx->subCamId, csCtx->subCamEyePoints->viewAngle); } } } @@ -1471,15 +1471,15 @@ s32 Cutscene_Command_08(PlayState* play, CutsceneContext* csCtx, u8* cmd, u8 unu subCam->player = NULL; Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, csCtx->subCamId, CAM_STAT_ACTIVE); - Play_CameraChangeSetting(play, csCtx->subCamId, CAM_SET_FREE0); + Play_ChangeCameraSetting(play, csCtx->subCamId, CAM_SET_FREE0); sp3C.x = csCtx->subCamLookAtPoints->pos.x; sp3C.y = csCtx->subCamLookAtPoints->pos.y; sp3C.z = csCtx->subCamLookAtPoints->pos.z; sp30.x = csCtx->subCamEyePoints->pos.x; sp30.y = csCtx->subCamEyePoints->pos.y; sp30.z = csCtx->subCamEyePoints->pos.z; - Play_CameraSetAtEye(play, csCtx->subCamId, &sp3C, &sp30); - Play_CameraSetFov(play, csCtx->subCamId, csCtx->subCamEyePoints->viewAngle); + Play_SetCameraAtEye(play, csCtx->subCamId, &sp3C, &sp30); + Play_SetCameraFov(play, csCtx->subCamId, csCtx->subCamEyePoints->viewAngle); } } } diff --git a/src/code/z_horse.c b/src/code/z_horse.c index ec5ab7fa3e..4e45059feb 100644 --- a/src/code/z_horse.c +++ b/src/code/z_horse.c @@ -227,7 +227,7 @@ void func_8006D684(PlayState* play, Player* player) { sp54.y = player->actor.world.pos.y + 100.0f; sp54.z = player->actor.world.pos.z; - Play_CameraSetAtEye(play, play->activeCamId, &player->actor.world.pos, &sp54); + Play_SetCameraAtEye(play, play->activeCamId, &player->actor.world.pos, &sp54); } else { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, D_8011F9B8[i].pos.x, D_8011F9B8[i].pos.y, D_8011F9B8[i].pos.z, 0, D_8011F9B8[i].angle, 0, D_8011F9B8[i].type); diff --git a/src/code/z_onepointdemo.c b/src/code/z_onepointdemo.c index 957c2897c4..6f2bd9c38d 100644 --- a/src/code/z_onepointdemo.c +++ b/src/code/z_onepointdemo.c @@ -74,7 +74,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act OnePointCsInfo* csInfo = &subCam->paramData.uniq9.csInfo; switch (csId) { - case 1020: + case 1020: // smoothly return to main camera from current view if (timer < 20) { timer = 20; } @@ -91,8 +91,9 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_801208EC; csInfo->keyFrameCnt = 3; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 1030: D_80120964[0].atTargetInit = play->view.at; D_80120964[0].eyeTargetInit = play->view.eye; @@ -104,8 +105,9 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80120964; csInfo->keyFrameCnt = 2; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 5000: D_801209B4[0].atTargetInit = D_801209B4[1].atTargetInit = play->view.at; D_801209B4[0].eyeTargetInit = play->view.eye; @@ -118,18 +120,21 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_801209B4; csInfo->keyFrameCnt = 4; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 5010: - func_800C0808(play, subCamId, player, CAM_SET_CS_ATTENTION); - Play_CameraSetAtEye(play, subCamId, &mainCam->at, &mainCam->eye); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_ATTENTION); + Play_SetCameraAtEye(play, subCamId, &mainCam->at, &mainCam->eye); subCam->roll = 0; break; + case 9500: csInfo->keyFrames = D_80120A54; csInfo->keyFrameCnt = 3; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 2260: D_80120ACC[0].atTargetInit.x = D_80120ACC[2].atTargetInit.x = ((mainCam->play->state.frames & 1) ? -10.0f : 10.0f) + (Rand_ZeroOne() * 8.0f); @@ -140,8 +145,9 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80120ACC; csInfo->keyFrameCnt = 5; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 2270: csInfo->keyFrames = D_80120B94; csInfo->keyFrameCnt = 11; @@ -157,13 +163,14 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act D_80120B94[subCamId - 1].eyeTargetInit.y = ((mainCam->play->state.frames & 1) ? 3.0f : -3.0f) + Rand_ZeroOne(); - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_5); Quake_SetSpeed(i, 400); Quake_SetPerturbations(i, 4, 5, 40, 0x3C); Quake_SetDuration(i, 1600); break; + case 2280: csInfo->keyFrames = D_80120D4C; csInfo->keyFrameCnt = 7; @@ -178,24 +185,26 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act } D_80120D4C[subCamId - 1].eyeTargetInit.y = ((mainCam->play->state.frames & 1) ? 3.0f : -3.0f) + Rand_ZeroOne(); - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_5); Quake_SetSpeed(i, 400); Quake_SetPerturbations(i, 2, 3, 200, 0x32); Quake_SetDuration(i, 9999); break; + case 2220: csInfo->keyFrames = D_80120E64; csInfo->keyFrameCnt = 8; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_5); Quake_SetSpeed(i, 400); Quake_SetPerturbations(i, 2, 2, 50, 0); Quake_SetDuration(i, 280); break; + case 2230: if (player->actor.world.pos.z < 1000.0f) { D_80120FA4[0].eyeTargetInit.x = -D_80120FA4[0].eyeTargetInit.x; @@ -205,25 +214,28 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80120FA4; csInfo->keyFrameCnt = 6; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 2340: csInfo->keyFrames = D_80121094; csInfo->keyFrameCnt = 3; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_5); Quake_SetSpeed(i, 400); Quake_SetPerturbations(i, 2, 2, 50, 0); Quake_SetDuration(i, 60); break; + case 2350: csInfo->keyFrames = D_8012110C; csInfo->keyFrameCnt = 3; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 2200: { s16 sp82; s16 sp80; @@ -259,8 +271,9 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrameCnt = 2; } Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_UNK3); - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); } break; + case 2290: { Actor* rideActor = player->rideActor; @@ -272,16 +285,18 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80121224; csInfo->keyFrameCnt = 6; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); } break; + case 5120: func_8002DF54(play, NULL, PLAYER_CSMODE_8); csInfo->keyFrames = D_80121314; csInfo->keyFrameCnt = 1; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 4510: D_8012133C[0].eyeTargetInit = actor->world.pos; D_8012133C[0].eyeTargetInit.y = player->actor.world.pos.y + 40.0f; @@ -290,8 +305,9 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_8012133C; csInfo->keyFrameCnt = 3; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 4500: Actor_GetFocus(&spA0, actor); spC0 = spA0.pos; @@ -301,8 +317,8 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act spD0.pitch = 0x3E8; OnePointCutscene_AddVecGeoToVec3f(&spB4, &spC0, &spD0); - Play_CameraChangeSetting(play, subCamId, CAM_SET_FREE2); - Play_CameraSetAtEye(play, subCamId, &spC0, &spB4); + Play_ChangeCameraSetting(play, subCamId, CAM_SET_FREE2); + Play_SetCameraAtEye(play, subCamId, &spC0, &spB4); func_8002DF54(play, NULL, PLAYER_CSMODE_8); subCam->roll = 0; subCam->fov = 50.0f; @@ -310,6 +326,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act OnePointCutscene_EndCutscene(play, subCam->childCamId); } break; + case 2210: OLib_Vec3fDiffToVecGeo(&spD0, &player->actor.world.pos, &actor->world.pos); D_801213B4[0].eyeTargetInit.y = D_801213B4[1].eyeTargetInit.y = D_801213B4[2].eyeTargetInit.y = @@ -322,34 +339,37 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_801213B4; csInfo->keyFrameCnt = 5; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 1010: - Play_CameraChangeSetting(play, subCamId, CAM_SET_FREE2); - Play_CameraSetAtEye(play, subCamId, &childCam->at, &childCam->eye); - Play_CameraSetFov(play, subCamId, childCam->fov); + Play_ChangeCameraSetting(play, subCamId, CAM_SET_FREE2); + Play_SetCameraAtEye(play, subCamId, &childCam->at, &childCam->eye); + Play_SetCameraFov(play, subCamId, childCam->fov); Play_SetCameraRoll(play, subCamId, childCam->roll); break; - case 9601: - // Leaving a crawlspace forwards - Play_CameraChangeSetting(play, subCamId, CAM_SET_CS_3); - Play_CameraChangeSetting(play, CAM_ID_MAIN, mainCam->prevSetting); + + case 9601: // Leaving a crawlspace forwards + Play_ChangeCameraSetting(play, subCamId, CAM_SET_CS_3); + Play_ChangeCameraSetting(play, CAM_ID_MAIN, mainCam->prevSetting); OnePointCutscene_SetCsCamPoints(subCam, sCrawlspaceActionParam | 0x1000, sCrawlspaceTimer, sCrawlspaceAtPoints, sCrawlspaceForwardsEyePoints); break; - case 9602: - // Leaving a crawlspace backwards - Play_CameraChangeSetting(play, subCamId, CAM_SET_CS_3); - Play_CameraChangeSetting(play, CAM_ID_MAIN, mainCam->prevSetting); + + case 9602: // Leaving a crawlspace backwards + Play_ChangeCameraSetting(play, subCamId, CAM_SET_CS_3); + Play_ChangeCameraSetting(play, CAM_ID_MAIN, mainCam->prevSetting); OnePointCutscene_SetCsCamPoints(subCam, sCrawlspaceActionParam | 0x1000, sCrawlspaceTimer, sCrawlspaceAtPoints, sCrawlspaceBackwardsEyePoints); break; + case 4175: csInfo->keyFrames = D_8012147C; csInfo->keyFrameCnt = 4; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 4180: spC0.x = -1881.0f; spC0.y = 766.0f; @@ -357,12 +377,13 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act spB4.x = -1979.0f; spB4.y = 703.0f; spB4.z = -269.0f; - Play_CameraChangeSetting(play, subCamId, CAM_SET_FREE2); - Play_CameraSetAtEye(play, subCamId, &spC0, &spB4); + Play_ChangeCameraSetting(play, subCamId, CAM_SET_FREE2); + Play_SetCameraAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 6; subCam->fov = 75.0f; func_8002DF54(play, NULL, PLAYER_CSMODE_8); break; + case 3040: func_8002DF54(play, NULL, PLAYER_CSMODE_8); D_8012151C[0].timerInit = timer - 1; @@ -370,8 +391,9 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_8012151C; csInfo->keyFrameCnt = 2; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 3020: D_8012156C[1].timerInit = timer - 1; if (mainCam->play->state.frames & 1) { @@ -387,75 +409,83 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_8012156C; csInfo->keyFrameCnt = 2; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); func_8002DF54(play, NULL, PLAYER_CSMODE_8); break; + case 3010: D_801215BC[0].timerInit = timer; csInfo->keyFrames = D_801215BC; csInfo->keyFrameCnt = 1; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 3070: csInfo->keyFrames = D_801215E4; csInfo->keyFrameCnt = 10; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_3); Quake_SetSpeed(i, 22000); Quake_SetPerturbations(i, 2, 0, 200, 0); Quake_SetDuration(i, 10); break; + case 3080: csInfo->keyFrames = D_80121774; csInfo->keyFrameCnt = 4; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 3090: func_8002DF54(play, NULL, PLAYER_CSMODE_8); csInfo->keyFrames = D_80121814; csInfo->keyFrameCnt = 4; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 3100: VEC_SET(spB4, 0.0f, -280.0f, -1400.0f); Actor_GetFocus(&spA0, actor); spC0 = spA0.pos; - func_800C0808(play, subCamId, player, CAM_SET_PIVOT_VERTICAL); - Play_CameraSetAtEye(play, subCamId, &spC0, &spB4); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_PIVOT_VERTICAL); + Play_SetCameraAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0; subCam->fov = 70.0f; func_8002DF54(play, NULL, PLAYER_CSMODE_8); break; + case 3380: case 3065: csInfo->keyFrames = D_801218B4; csInfo->keyFrameCnt = 2; func_8002DF54(play, NULL, PLAYER_CSMODE_8); - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_1); Quake_SetSpeed(i, 24000); Quake_SetPerturbations(i, 2, 0, 0, 0); Quake_SetDuration(i, 160); break; + case 3060: csInfo->keyFrames = D_80121904; csInfo->keyFrameCnt = 2; func_8002DF54(play, NULL, PLAYER_CSMODE_8); - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 3050: - Play_CameraChangeSetting(play, subCamId, CAM_SET_CS_3); + Play_ChangeCameraSetting(play, subCamId, CAM_SET_CS_3); func_8002DF54(play, &player->actor, PLAYER_CSMODE_5); OnePointCutscene_SetCsCamPoints(subCam, D_80120304 | 0x2000, D_80120300, D_8012013C, D_8012021C); func_80078884(NA_SE_SY_CORRECT_CHIME); @@ -479,6 +509,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Quake_SetPerturbations(i, 2, 1, 1, 0); Quake_SetDuration(i, 200); break; + case 3120: csInfo->keyFrames = D_80121954[-(timer + 101)]; subCam->timer = 100; @@ -486,16 +517,18 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrameCnt = 2; func_8002DF54(play, NULL, PLAYER_CSMODE_8); - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 3130: csInfo->keyFrames = D_80121A44; csInfo->keyFrameCnt = 12; func_8002DF54(play, NULL, PLAYER_CSMODE_8); - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); subCam->stateFlags |= CAM_STATE_1; break; + case 3140: D_80121C24[0].atTargetInit = play->view.at; D_80121C24[0].eyeTargetInit = play->view.eye; @@ -504,8 +537,9 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80121C24; csInfo->keyFrameCnt = 7; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 3150: spC0.x = 1890.0f; spC0.y = 886.0f; @@ -513,12 +547,13 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act spB4.x = 1729.0f; spB4.y = 995.0f; spB4.z = -1405.0f; - Play_CameraChangeSetting(play, subCamId, CAM_SET_FREE2); - Play_CameraSetAtEye(play, subCamId, &spC0, &spB4); + Play_ChangeCameraSetting(play, subCamId, CAM_SET_FREE2); + Play_SetCameraAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0x50; subCam->fov = 55.0f; func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); break; + case 3170: Actor_GetWorld(&spA0, actor); spC0 = spA0.pos; @@ -528,13 +563,14 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Actor_GetWorld(&spA0, &player->actor); spD0.yaw = OnePointCutscene_Vec3fYaw(&spC0, &spA0.pos) - 0x7D0; OnePointCutscene_AddVecGeoToVec3f(&spB4, &spC0, &spD0); - Play_CameraChangeSetting(play, subCamId, CAM_SET_FREE2); - Play_CameraSetAtEye(play, subCamId, &spC0, &spB4); + Play_ChangeCameraSetting(play, subCamId, CAM_SET_FREE2); + Play_SetCameraAtEye(play, subCamId, &spC0, &spB4); Play_CopyCamera(play, CAM_ID_MAIN, subCamId); subCam->roll = -1; subCam->fov = 55.0f; func_8002DF38(play, actor, PLAYER_CSMODE_1); break; + case 3160: Actor_GetWorld(&spA0, actor); spC0 = spA0.pos; @@ -542,12 +578,13 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act spD0.yaw = spA0.rot.y; spD0.r = 150.0f; OnePointCutscene_AddVecGeoToVec3f(&spB4, &spC0, &spD0); - Play_CameraChangeSetting(play, subCamId, CAM_SET_FREE2); - Play_CameraSetAtEye(play, subCamId, &spC0, &spB4); + Play_ChangeCameraSetting(play, subCamId, CAM_SET_FREE2); + Play_SetCameraAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0; subCam->fov = 55.0f; func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); break; + case 3180: Actor_GetWorldPosShapeRot(&spA0, actor); spC0 = spA0.pos; @@ -556,17 +593,19 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act spD0.yaw = spA0.rot.y; spD0.pitch = -0xAF0; OnePointCutscene_AddVecGeoToVec3f(&spB4, &spC0, &spD0); - Play_CameraChangeSetting(play, subCamId, CAM_SET_FREE2); - Play_CameraSetAtEye(play, subCamId, &spC0, &spB4); + Play_ChangeCameraSetting(play, subCamId, CAM_SET_FREE2); + Play_SetCameraAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0; subCam->fov = 60.0f; func_8002DF38(play, actor, PLAYER_CSMODE_1); break; + case 3190: - Play_CameraChangeSetting(play, subCamId, CAM_SET_FOREST_DEFEAT_POE); + Play_ChangeCameraSetting(play, subCamId, CAM_SET_FOREST_DEFEAT_POE); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); func_8002DF38(play, actor, PLAYER_CSMODE_12); break; + case 3230: spC0.x = 120.0f; spC0.y = 265.0f; @@ -574,8 +613,8 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act spB4.x = 80.0f; spB4.y = 445.0f; spB4.z = -1425.0f; - Play_CameraChangeSetting(play, subCamId, CAM_SET_FREE2); - Play_CameraSetAtEye(play, subCamId, &spC0, &spB4); + Play_ChangeCameraSetting(play, subCamId, CAM_SET_FREE2); + Play_SetCameraAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0x1E; subCam->fov = 75.0f; func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); @@ -588,13 +627,14 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act spD0.pitch = 0x5DC; spD0.r = 120.0f; OnePointCutscene_AddVecGeoToVec3f(&spB4, &spC0, &spD0); - Play_CameraSetAtEye(play, CAM_ID_MAIN, &spC0, &spB4); + Play_SetCameraAtEye(play, CAM_ID_MAIN, &spC0, &spB4); i = Quake_Request(subCam, QUAKE_TYPE_3); Quake_SetSpeed(i, 22000); Quake_SetPerturbations(i, 1, 0, 0, 0); Quake_SetDuration(i, 90); break; + case 6010: Actor_GetWorld(&spA0, actor); spC0 = spA0.pos; @@ -603,28 +643,30 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act spD0.yaw = spA0.rot.y + 0x7FFF; spD0.r = 300.0f; OnePointCutscene_AddVecGeoToVec3f(&spB4, &spC0, &spD0); - Play_CameraChangeSetting(play, subCamId, CAM_SET_FREE2); - Play_CameraSetAtEye(play, subCamId, &spC0, &spB4); + Play_ChangeCameraSetting(play, subCamId, CAM_SET_FREE2); + Play_SetCameraAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0; subCam->fov = 45.0f; func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); break; + case 3220: Actor_GetFocus(&spA0, actor); spC0 = spA0.pos; - func_800C0808(play, subCamId, player, CAM_SET_PIVOT_VERTICAL); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_PIVOT_VERTICAL); Actor_GetWorld(&spA0, &player->actor); OLib_Vec3fDiffToVecGeo(&spD0, &spC0, &spA0.pos); spD0.yaw += 0x3E8; spD0.r = 400.0f; OnePointCutscene_AddVecGeoToVec3f(&spB4, &spC0, &spD0); spB4.y = spA0.pos.y + 60.0f; - Play_CameraSetAtEye(play, subCamId, &spC0, &spB4); + Play_SetCameraAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0; subCam->fov = 75.0f; player->actor.shape.rot.y = player->actor.world.rot.y = player->currentYaw = spD0.yaw + 0x7FFF; func_8002DF54(play, NULL, PLAYER_CSMODE_8); break; + case 3240: D_80121D3C[2].timerInit = timer - 5; @@ -632,10 +674,11 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrameCnt = 3; func_8002DF54(play, NULL, PLAYER_CSMODE_8); - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 6001: - Play_CameraChangeSetting(play, subCamId, CAM_SET_CS_3); + Play_ChangeCameraSetting(play, subCamId, CAM_SET_CS_3); func_8002DF54(play, NULL, PLAYER_CSMODE_8); Actor_GetWorld(&spA0, actor); if (spA0.pos.z > -750.0f) { @@ -649,8 +692,9 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Quake_SetPerturbations(i, 0, 0, 20, 0); Quake_SetDuration(i, D_801208E4 - 10); break; + case 3400: - Play_CameraChangeSetting(play, subCamId, CAM_SET_CS_3); + Play_ChangeCameraSetting(play, subCamId, CAM_SET_CS_3); func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); OnePointCutscene_SetCsCamPoints(subCam, D_8012069C | 0x2000, D_80120698, D_801204D4, D_801205B4); OnePointCutscene_Vec3sToVec3f(&mainCam->eye, &D_801205B4[D_80120694 - 2].pos); @@ -661,6 +705,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Quake_SetPerturbations(i, 1, 0, 50, 0); Quake_SetDuration(i, D_80120698 - 20); break; + case 3390: player->actor.shape.rot.y = player->actor.world.rot.y = player->currentYaw = -0x3FD9; @@ -668,10 +713,11 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrameCnt = 9; func_8002DF54(play, NULL, PLAYER_CSMODE_8); - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 3310: - Play_CameraChangeSetting(play, subCamId, CAM_SET_FIRE_STAIRCASE); + Play_ChangeCameraSetting(play, subCamId, CAM_SET_FIRE_STAIRCASE); func_8002DF54(play, NULL, PLAYER_CSMODE_8); Play_CopyCamera(play, subCamId, CAM_ID_MAIN); @@ -680,6 +726,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Quake_SetPerturbations(i, 2, 0, 0, 0); Quake_SetDuration(i, timer); break; + case 3290: D_80121F1C[0].atTargetInit = play->view.at; D_80121F1C[0].eyeTargetInit = play->view.eye; @@ -690,13 +737,14 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80121F1C; csInfo->keyFrameCnt = 4; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_3); Quake_SetSpeed(i, 12000); Quake_SetPerturbations(i, 0, 0, 1000, 0); Quake_SetDuration(i, 5); break; + case 3340: D_80121FBC[0].atTargetInit = play->view.at; D_80121FBC[0].eyeTargetInit = play->view.eye; @@ -706,20 +754,22 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrameCnt = 4; func_8002DF54(play, NULL, PLAYER_CSMODE_8); - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_3); Quake_SetSpeed(i, 12000); Quake_SetPerturbations(i, 0, 0, 1000, 0); Quake_SetDuration(i, 5); break; + case 3360: csInfo->keyFrames = D_8012205C; csInfo->keyFrameCnt = 3; func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 3350: D_801220D4[0].atTargetInit = play->view.at; D_801220D4[0].eyeTargetInit = play->view.eye; @@ -737,45 +787,49 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_801220D4; csInfo->keyFrameCnt = 5; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 3330: csInfo->keyFrames = D_8012219C; csInfo->keyFrameCnt = 7; func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 3410: csInfo->keyFrames = D_801222B4; csInfo->keyFrameCnt = 5; func_8002DF54(play, NULL, PLAYER_CSMODE_8); - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_1); Quake_SetSpeed(i, 32000); Quake_SetPerturbations(i, 4, 0, 0, 0); Quake_SetDuration(i, 20); break; + case 3450: csInfo->keyFrames = D_8012237C; csInfo->keyFrameCnt = 2; func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_1); Quake_SetSpeed(i, 32000); Quake_SetPerturbations(i, 2, 0, 0, 0); Quake_SetDuration(i, 10); break; + case 3440: csInfo->keyFrames = D_801223CC; csInfo->keyFrameCnt = 6; func_8002DF54(play, NULL, PLAYER_CSMODE_8); - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); player->stateFlags1 |= PLAYER_STATE1_29; player->actor.freezeTimer = 90; @@ -784,106 +838,118 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Quake_SetPerturbations(i, 2, 0, 0, 0); Quake_SetDuration(i, 10); break; + case 3430: csInfo->keyFrames = D_801224BC; csInfo->keyFrameCnt = 7; func_8002DF54(play, NULL, PLAYER_CSMODE_8); - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_1); Quake_SetSpeed(i, 32000); Quake_SetPerturbations(i, 1, 0, 10, 0); Quake_SetDuration(i, 20); break; + case 4100: csInfo->keyFrames = D_801225D4; csInfo->keyFrameCnt = 5; player->actor.shape.rot.y = player->actor.world.rot.y = player->currentYaw = 0x3FFC; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); func_8002DF54(play, NULL, PLAYER_CSMODE_8); break; + case 4110: csInfo->keyFrames = D_8012269C; csInfo->keyFrameCnt = 3; func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 4120: func_8002DF54(play, NULL, PLAYER_CSMODE_8); D_80122714[1].timerInit = 80; csInfo->keyFrames = D_80122714; csInfo->keyFrameCnt = 4; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 4140: csInfo->keyFrames = D_801227B4; csInfo->keyFrameCnt = 6; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); break; + case 4150: csInfo->keyFrames = D_801228A4; csInfo->keyFrameCnt = 5; func_8002DF54(play, NULL, PLAYER_CSMODE_8); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 4160: csInfo->keyFrames = D_8012296C; csInfo->keyFrameCnt = 4; func_8002DF54(play, NULL, PLAYER_CSMODE_8); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 4170: csInfo->keyFrames = D_80122A0C; csInfo->keyFrameCnt = 2; func_8002DF54(play, NULL, PLAYER_CSMODE_8); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 4190: csInfo->keyFrames = D_80122A5C; csInfo->keyFrameCnt = 8; func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 4200: csInfo->keyFrames = D_80122B9C; csInfo->keyFrameCnt = 3; func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 4210: player->actor.freezeTimer = timer; csInfo->keyFrames = D_80122C14; csInfo->keyFrameCnt = 1; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_3); Quake_SetSpeed(i, 12000); Quake_SetPerturbations(i, 0, 1, 100, 0); Quake_SetDuration(i, timer - 80); break; + case 4220: csInfo->keyFrames = (player->actor.world.pos.z < -15.0f) ? D_80122C3C : D_80122C64; csInfo->keyFrameCnt = 1; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); func_8002DF38(play, &player->actor, PLAYER_CSMODE_1); i = Quake_Request(subCam, QUAKE_TYPE_3); @@ -891,13 +957,15 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Quake_SetPerturbations(i, 0, 1, 10, 0); Quake_SetDuration(i, timer - 10); break; + case 4221: csInfo->keyFrames = D_80122C8C; csInfo->keyFrameCnt = 1; func_8002DF54(play, NULL, PLAYER_CSMODE_8); - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 3260: func_8002DF54(play, NULL, PLAYER_CSMODE_8); D_80122CB4[1].timerInit = timer - 5; @@ -905,8 +973,9 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80122CB4; csInfo->keyFrameCnt = 2; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 3261: func_8002DF54(play, NULL, PLAYER_CSMODE_8); D_80122D04[1].timerInit = timer - 10; @@ -914,20 +983,23 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80122D04; csInfo->keyFrameCnt = 2; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 8010: csInfo->keyFrames = D_80122D54; csInfo->keyFrameCnt = 3; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 8002: csInfo->keyFrames = D_80122DCC; csInfo->keyFrameCnt = 3; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 8700: Actor_GetFocus(&spA0, actor); Actor_GetFocus(&sp8C, &player->actor); @@ -937,8 +1009,9 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80122E44[timer & 1]; csInfo->keyFrameCnt = 7; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 1100: { s32 tempDiff = play->state.frames - sPrevFrameCs1100; @@ -955,20 +1028,22 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_8012313C; csInfo->keyFrameCnt = 3; } - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); sPrevFrameCs1100 = play->state.frames; } break; + case 9806: subCam->timer = -99; if (Play_CamIsNotFixed(play)) { - func_800C0808(play, subCamId, player, CAM_SET_TURN_AROUND); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_TURN_AROUND); subCam->data2 = 0xC; } else { Play_CopyCamera(play, subCamId, CAM_ID_MAIN); - Play_CameraChangeSetting(play, subCamId, CAM_SET_FREE2); + Play_ChangeCameraSetting(play, subCamId, CAM_SET_FREE2); } break; + case 9908: if (Play_CamIsNotFixed(play)) { D_801231B4[0].eyeTargetInit.z = D_801231B4[1].eyeTargetInit.z = !LINK_IS_ADULT ? 100.0f : 120.0f; @@ -989,7 +1064,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_801231B4; csInfo->keyFrameCnt = 4; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); } else { D_80123254[1].timerInit = timer - 1; D_80123254[0].fovTargetInit = mainCam->fov; @@ -999,9 +1074,10 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80123254; csInfo->keyFrameCnt = 2; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); } break; + case 1000: D_801232A4[0].atTargetInit = play->view.at; D_801232A4[0].eyeTargetInit = play->view.eye; @@ -1010,50 +1086,58 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_801232A4; csInfo->keyFrameCnt = 1; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 8603: csInfo->keyFrames = D_801232CC; csInfo->keyFrameCnt = 5; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 8604: csInfo->keyFrames = D_80123394; csInfo->keyFrameCnt = 5; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 4000: csInfo->keyFrames = D_8012345C; csInfo->keyFrameCnt = 4; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 4010: csInfo->keyFrames = D_801234FC; csInfo->keyFrameCnt = 5; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 4011: csInfo->keyFrames = D_801235C4; csInfo->keyFrameCnt = 5; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 4020: csInfo->keyFrames = D_8012368C; csInfo->keyFrameCnt = 4; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 4021: csInfo->keyFrames = D_8012372C; csInfo->keyFrameCnt = 4; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 4022: subCam->timer = D_801237CC[0].timerInit + D_801237CC[3].timerInit + D_801237CC[1].timerInit + D_801237CC[2].timerInit + D_801237CC[4].timerInit; @@ -1061,8 +1145,9 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_801237CC; csInfo->keyFrameCnt = 5; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 9703: D_80123894[0].atTargetInit = play->view.at; D_80123894[0].eyeTargetInit = play->view.eye; @@ -1075,8 +1160,9 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80123894; csInfo->keyFrameCnt = 3; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 9704: D_8012390C[0].atTargetInit = play->view.at; D_8012390C[0].eyeTargetInit = play->view.eye; @@ -1085,8 +1171,9 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_8012390C; csInfo->keyFrameCnt = 2; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 9705: D_8012395C[0].atTargetInit = play->view.at; D_8012395C[0].eyeTargetInit = play->view.eye; @@ -1095,16 +1182,18 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_8012395C; csInfo->keyFrameCnt = 3; - func_800C0808(play, subCamId, player, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_CS_C); break; + case 5110: D_801239D4[1].timerInit = 10; csInfo->keyFrames = D_801239D4; csInfo->keyFrameCnt = 3; - func_800C0808(play, subCamId, (Player*)actor, CAM_SET_CS_C); + Play_InitCameraDataUsingPlayer(play, subCamId, (Player*)actor, CAM_SET_CS_C); break; + default: osSyncPrintf(VT_COL(RED, WHITE) "onepointdemo camera: demo number not found !! (%d)\n" VT_RST, csId); break; diff --git a/src/code/z_play.c b/src/code/z_play.c index 08f2ee3a7d..4f8284cfdf 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -411,7 +411,7 @@ void Play_Init(GameState* thisx) { } player = GET_PLAYER(this); - Camera_InitPlayerSettings(&this->mainCamera, player); + Camera_InitDataUsingPlayer(&this->mainCamera, player); Camera_ChangeMode(&this->mainCamera, CAM_MODE_NORMAL); playerStartBgCamIndex = player->actor.params & 0xFF; @@ -1460,28 +1460,28 @@ void Play_GetScreenPos(PlayState* this, Vec3f* src, Vec3f* dest) { } s16 Play_CreateSubCamera(PlayState* this) { - s16 i; + s16 camId; - for (i = CAM_ID_SUB_FIRST; i < NUM_CAMS; i++) { - if (this->cameraPtrs[i] == NULL) { + for (camId = CAM_ID_SUB_FIRST; camId < NUM_CAMS; camId++) { + if (this->cameraPtrs[camId] == NULL) { break; } } - if (i == NUM_CAMS) { + if (camId == NUM_CAMS) { osSyncPrintf(VT_COL(RED, WHITE) "camera control: error: fulled sub camera system area\n" VT_RST); return CAM_ID_NONE; } osSyncPrintf("camera control: " VT_BGCOL(CYAN) " " VT_COL(WHITE, BLUE) " create new sub camera [%d] " VT_BGCOL( CYAN) " " VT_RST "\n", - i); + camId); - this->cameraPtrs[i] = &this->subCameras[i - CAM_ID_SUB_FIRST]; - Camera_Init(this->cameraPtrs[i], &this->view, &this->colCtx, this); - this->cameraPtrs[i]->camId = i; + this->cameraPtrs[camId] = &this->subCameras[camId - CAM_ID_SUB_FIRST]; + Camera_Init(this->cameraPtrs[camId], &this->view, &this->colCtx, this); + this->cameraPtrs[camId]->camId = camId; - return i; + return camId; } s16 Play_GetActiveCamId(PlayState* this) { @@ -1534,15 +1534,15 @@ Camera* Play_GetCamera(PlayState* this, s16 camId) { return this->cameraPtrs[camIdx]; } -s32 Play_CameraSetAtEye(PlayState* this, s16 camId, Vec3f* at, Vec3f* eye) { - s32 ret = 0; +s32 Play_SetCameraAtEye(PlayState* this, s16 camId, Vec3f* at, Vec3f* eye) { + s32 successBits = 0; s16 camIdx = (camId == CAM_ID_NONE) ? this->activeCamId : camId; Camera* camera = this->cameraPtrs[camIdx]; Player* player; - ret |= Camera_SetViewParam(camera, CAM_VIEW_AT, at); - ret <<= 1; - ret |= Camera_SetViewParam(camera, CAM_VIEW_EYE, eye); + successBits |= Camera_SetViewParam(camera, CAM_VIEW_AT, at); + successBits <<= 1; + successBits |= Camera_SetViewParam(camera, CAM_VIEW_EYE, eye); camera->dist = Math3D_Vec3f_DistXYZ(at, eye); @@ -1557,20 +1557,20 @@ s32 Play_CameraSetAtEye(PlayState* this, s16 camId, Vec3f* at, Vec3f* eye) { camera->atLERPStepScale = 0.01f; - return ret; + return successBits; } -s32 Play_CameraSetAtEyeUp(PlayState* this, s16 camId, Vec3f* at, Vec3f* eye, Vec3f* up) { - s32 ret = 0; +s32 Play_SetCameraAtEyeUp(PlayState* this, s16 camId, Vec3f* at, Vec3f* eye, Vec3f* up) { + s32 successBits = 0; s16 camIdx = (camId == CAM_ID_NONE) ? this->activeCamId : camId; Camera* camera = this->cameraPtrs[camIdx]; Player* player; - ret |= Camera_SetViewParam(camera, CAM_VIEW_AT, at); - ret <<= 1; - ret |= Camera_SetViewParam(camera, CAM_VIEW_EYE, eye); - ret <<= 1; - ret |= Camera_SetViewParam(camera, CAM_VIEW_UP, up); + successBits |= Camera_SetViewParam(camera, CAM_VIEW_AT, at); + successBits <<= 1; + successBits |= Camera_SetViewParam(camera, CAM_VIEW_EYE, eye); + successBits <<= 1; + successBits |= Camera_SetViewParam(camera, CAM_VIEW_UP, up); camera->dist = Math3D_Vec3f_DistXYZ(at, eye); @@ -1585,14 +1585,14 @@ s32 Play_CameraSetAtEyeUp(PlayState* this, s16 camId, Vec3f* at, Vec3f* eye, Vec camera->atLERPStepScale = 0.01f; - return ret; + return successBits; } -s32 Play_CameraSetFov(PlayState* this, s16 camId, f32 fov) { - s32 ret = Camera_SetViewParam(this->cameraPtrs[camId], CAM_VIEW_FOV, &fov) & 1; +s32 Play_SetCameraFov(PlayState* this, s16 camId, f32 fov) { + s32 successBits = Camera_SetViewParam(this->cameraPtrs[camId], CAM_VIEW_FOV, &fov) & 1; if (1) {} - return ret; + return successBits; } s32 Play_SetCameraRoll(PlayState* this, s16 camId, s16 roll) { @@ -1611,43 +1611,52 @@ void Play_CopyCamera(PlayState* this, s16 destCamId, s16 srcCamId) { Camera_Copy(this->cameraPtrs[destCamId1], this->cameraPtrs[srcCamId2]); } -s32 func_800C0808(PlayState* this, s16 camId, Player* player, s16 setting) { +/** + * Initializes camera data centered around Player, and applies the requested setting. + */ +s32 Play_InitCameraDataUsingPlayer(PlayState* this, s16 camId, Player* player, s16 setting) { Camera* camera; s16 camIdx = (camId == CAM_ID_NONE) ? this->activeCamId : camId; camera = this->cameraPtrs[camIdx]; - Camera_InitPlayerSettings(camera, player); + Camera_InitDataUsingPlayer(camera, player); return Camera_ChangeSetting(camera, setting); } -s32 Play_CameraChangeSetting(PlayState* this, s16 camId, s16 setting) { +s32 Play_ChangeCameraSetting(PlayState* this, s16 camId, s16 setting) { return Camera_ChangeSetting(Play_GetCamera(this, camId), setting); } -void func_800C08AC(PlayState* this, s16 camId, s16 arg2) { +/** + * Smoothly return control from a sub camera to the main camera by moving the subCamera's eye, at, fov through + * interpolation from the initial subCam viewParams to the target mainCam viewParams over `duration`. + * Setting the `duration` to 0 or less will instantly return control to the main camera. + * This will also clear every sub camera. + */ +void Play_ReturnToMainCam(PlayState* this, s16 camId, s16 duration) { s16 camIdx = (camId == CAM_ID_NONE) ? this->activeCamId : camId; - s16 i; + s16 subCamId; Play_ClearCamera(this, camIdx); - for (i = CAM_ID_SUB_FIRST; i < NUM_CAMS; i++) { - if (this->cameraPtrs[i] != NULL) { + for (subCamId = CAM_ID_SUB_FIRST; subCamId < NUM_CAMS; subCamId++) { + if (this->cameraPtrs[subCamId] != NULL) { osSyncPrintf( VT_COL(RED, WHITE) "camera control: error: return to main, other camera left. %d cleared!!\n" VT_RST, - i); - Play_ClearCamera(this, i); + subCamId); + Play_ClearCamera(this, subCamId); } } - if (arg2 <= 0) { + if (duration <= 0) { Play_ChangeCameraStatus(this, CAM_ID_MAIN, CAM_STAT_ACTIVE); this->cameraPtrs[CAM_ID_MAIN]->childCamId = this->cameraPtrs[CAM_ID_MAIN]->parentCamId = CAM_ID_MAIN; } else { - OnePointCutscene_Init(this, 1020, arg2, NULL, CAM_ID_MAIN); + OnePointCutscene_Init(this, 1020, duration, NULL, CAM_ID_MAIN); } } -s16 Play_CameraGetUID(PlayState* this, s16 camId) { +s16 Play_GetCameraUID(PlayState* this, s16 camId) { Camera* camera = this->cameraPtrs[camId]; if (camera != NULL) { @@ -1657,12 +1666,16 @@ s16 Play_CameraGetUID(PlayState* this, s16 camId) { } } -s16 func_800C09D8(PlayState* this, s16 camId, s16 arg2) { +// Unused, purpose is unclear (also unused and unclear in MM) +s16 func_800C09D8(PlayState* this, s16 camId, s16 uid) { Camera* camera = this->cameraPtrs[camId]; if (camera != NULL) { return 0; - } else if (camera->uid != arg2) { + } + + //! @bug this code is only reached if `camera` is NULL. + if (camera->uid != uid) { return 0; } else if (camera->status != CAM_STAT_ACTIVE) { return 2; diff --git a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c index 26f1a3b698..643c497be2 100644 --- a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c +++ b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c @@ -414,7 +414,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, PlayState* play) { mainCam->eye = this->subCamEye; mainCam->eyeNext = this->subCamEye; mainCam->at = this->subCamAt; - func_800C08AC(play, this->subCamId, 0); + Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); @@ -446,7 +446,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, PlayState* play) { subCamUp.y = 1.0f; subCamUp.z = this->unk_20C; - Play_CameraSetAtEyeUp(play, this->subCamId, &subCamAt, &subCamEye, &subCamUp); + Play_SetCameraAtEyeUp(play, this->subCamId, &subCamAt, &subCamEye, &subCamUp); } } @@ -1609,7 +1609,7 @@ void BossDodongo_DeathCutscene(BossDodongo* this, PlayState* play) { mainCam->eye = this->subCamEye; mainCam->eyeNext = this->subCamEye; mainCam->at = this->subCamAt; - func_800C08AC(play, this->subCamId, 0); + Play_ReturnToMainCam(play, this->subCamId, 0); this->unk_1BC = 0; this->subCamId = SUB_CAM_ID_DONE; this->csState = 100; @@ -1636,7 +1636,7 @@ void BossDodongo_DeathCutscene(BossDodongo* this, PlayState* play) { break; } if (this->subCamId != SUB_CAM_ID_DONE) { - Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); + Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); } } diff --git a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c index 3426570b92..f49bd76f26 100644 --- a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c +++ b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c @@ -165,7 +165,7 @@ void BossFd_UpdateCamera(BossFd* this, PlayState* play) { this->subCamAtVel.z * this->subCamVelFactor); Math_ApproachF(&this->subCamVelFactor, 1.0f, 1.0f, this->subCamAccel); this->subCamAt.y += this->subCamAtYOffset; - Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); + Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); Math_ApproachZeroF(&this->subCamAtYOffset, 1.0f, 0.1f); } } @@ -534,7 +534,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) { mainCam->eye = this->subCamEye; mainCam->eyeNext = this->subCamEye; mainCam->at = this->subCamAt; - func_800C08AC(play, this->subCamId, 0); + Play_ReturnToMainCam(play, this->subCamId, 0); // BFD_CS_NONE / BOSSFD_FLY_MAIN / SUB_CAM_ID_DONE this->introState = this->introFlyState = this->subCamId = 0; func_80064534(play, &play->csCtx); diff --git a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c index 44b80d9b35..51c961c070 100644 --- a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c +++ b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c @@ -631,7 +631,7 @@ void BossFd2_UpdateCamera(BossFd2* this, PlayState* play) { this->subCamAtVel.z * this->subCamVelFactor); Math_ApproachF(&this->subCamVelFactor, 1.0f, 1.0f, this->subCamAccel); this->subCamAt.y += this->subCamAtYOffset; - Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); + Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); Math_ApproachF(&this->subCamAtYOffset, 0.0f, 1.0f, 0.1f); } } @@ -778,7 +778,7 @@ void BossFd2_Death(BossFd2* this, PlayState* play) { mainCam->eye = this->subCamEye; mainCam->eyeNext = this->subCamEye; mainCam->at = this->subCamAt; - func_800C08AC(play, this->subCamId, 0); + Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); diff --git a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c index 2b9dae7c28..acb02ba3fb 100644 --- a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c +++ b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c @@ -1125,7 +1125,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { mainCam->eye = this->csCamEye; mainCam->eyeNext = this->csCamEye; mainCam->at = this->csCamAt; - func_800C08AC(play, this->csCamIndex, 0); + Play_ReturnToMainCam(play, this->csCamIndex, 0); this->csState = this->csCamIndex = 0; func_80064534(play, &play->csCtx); func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); @@ -1156,8 +1156,8 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { this->csCamAtMaxStep.z * this->csCamMaxStepScale); } - Play_CameraSetAtEye(play, this->csCamIndex, &this->csCamAt, &this->csCamEye); - Play_CameraSetFov(play, this->csCamIndex, this->csCamFov); + Play_SetCameraAtEye(play, this->csCamIndex, &this->csCamAt, &this->csCamEye); + Play_SetCameraFov(play, this->csCamIndex, this->csCamFov); } } @@ -1788,7 +1788,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) { mainCam->eyeNext = this->csCamEye; mainCam->at = this->csCamAt; - func_800C08AC(play, this->csCamIndex, 0); + Play_ReturnToMainCam(play, this->csCamIndex, 0); this->csState = 109; this->csCamIndex = 0; func_80064534(play, &play->csCtx); @@ -1824,7 +1824,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) { sp64 = this->csCamAt; sp64.y += this->unk_70C; - Play_CameraSetAtEye(play, this->csCamIndex, &sp64, &this->csCamEye); + Play_SetCameraAtEye(play, this->csCamIndex, &sp64, &this->csCamEye); } } diff --git a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c index 04841a4785..18a7f9d7dc 100644 --- a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c +++ b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c @@ -321,7 +321,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { camera->eye = this->subCamEye; camera->eyeNext = this->subCamEye; camera->at = this->subCamAt; - func_800C08AC(play, this->subCamId, 0); + Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); @@ -874,7 +874,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { camera->eye = this->subCamEye; camera->eyeNext = this->subCamEye; camera->at = this->subCamAt; - func_800C08AC(play, this->subCamId, 0); + Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); @@ -898,7 +898,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { osSyncPrintf(NULL, 0, 0); } this->subCamAt.y += this->unk_41C; - Play_CameraSetAtEyeUp(play, this->subCamId, &this->subCamAt, &this->subCamEye, &this->subCamUp); + Play_SetCameraAtEyeUp(play, this->subCamId, &this->subCamAt, &this->subCamEye, &this->subCamUp); } } @@ -1345,7 +1345,7 @@ void func_80900890(BossGanon2* this, PlayState* play) { mainCam2->eye = this->subCamEye; mainCam2->eyeNext = this->subCamEye; mainCam2->at = this->subCamAt; - func_800C08AC(play, this->subCamId, 0); + Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); @@ -1378,7 +1378,7 @@ void func_80900890(BossGanon2* this, PlayState* play) { mainCam3->eyeNext = this->subCamEye; mainCam3->at = this->subCamAt; this->unk_39C = 3; - func_800C08AC(play, this->subCamId, 0); + Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); @@ -1387,7 +1387,7 @@ void func_80900890(BossGanon2* this, PlayState* play) { } if (this->subCamId != SUB_CAM_ID_DONE) { - Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); + Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); } switch (this->unk_1AC) { @@ -1623,7 +1623,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) { mainCam->eye = this->subCamEye; mainCam->eyeNext = this->subCamEye; mainCam->at = this->subCamAt; - func_800C08AC(play, this->subCamId, 0); + Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); @@ -1814,7 +1814,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) { } if (this->subCamId != SUB_CAM_ID_DONE) { - Play_CameraSetAtEyeUp(play, this->subCamId, &this->subCamAt, &this->subCamEye, &this->subCamUp); + Play_SetCameraAtEyeUp(play, this->subCamId, &this->subCamAt, &this->subCamEye, &this->subCamUp); } switch (this->unk_1AC) { diff --git a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c index 8d53423ecb..883fafd478 100644 --- a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c +++ b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c @@ -1115,7 +1115,7 @@ void BossGanondrof_Death(BossGanondrof* this, PlayState* play) { mainCam->eye = this->subCamEye; mainCam->eyeNext = this->subCamEye; mainCam->at = this->subCamAt; - func_800C08AC(play, this->subCamId, 0); + Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); @@ -1217,7 +1217,7 @@ void BossGanondrof_Death(BossGanondrof* this, PlayState* play) { Math_ApproachF(&this->subCamVelFactor, 1.0f, 1.0f, this->subCamAccel); } - Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); + Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); } } diff --git a/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c b/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c index 50bcd153ed..d0bc025060 100644 --- a/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c +++ b/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c @@ -744,7 +744,7 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) { this->subCamAt.z = player->actor.world.pos.z; } - Play_CameraSetAtEye(play, CAM_ID_MAIN, &this->subCamAt, &this->subCamEye); + Play_SetCameraAtEye(play, CAM_ID_MAIN, &this->subCamAt, &this->subCamEye); if (this->frameCount == 176) { Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_SHUTTER, 164.72f, -480.0f, @@ -765,7 +765,7 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) { mainCam->eye = this->subCamEye; mainCam->eyeNext = this->subCamEye; mainCam->at = this->subCamAt; - func_800C08AC(play, this->subCamId, 0); + Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); @@ -958,7 +958,7 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) { mainCam->eye = this->subCamEye; mainCam->eyeNext = this->subCamEye; mainCam->at = this->subCamAt; - func_800C08AC(play, this->subCamId, 0); + Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; BossGoma_SetupFloorMain(this); this->disableGameplayLogic = false; @@ -970,7 +970,7 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) { } if (this->subCamId != SUB_CAM_ID_DONE) { - Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); + Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); } } @@ -1178,7 +1178,7 @@ void BossGoma_Defeated(BossGoma* this, PlayState* play) { mainCam->eye = this->subCamEye; mainCam->eyeNext = this->subCamEye; mainCam->at = this->subCamAt; - func_800C08AC(play, this->subCamId, 0); + Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); @@ -1191,7 +1191,7 @@ void BossGoma_Defeated(BossGoma* this, PlayState* play) { } if (this->subCamId != SUB_CAM_ID_DONE) { - Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); + Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); } if (this->blinkTimer != 0) { diff --git a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c index e677e11c5f..d7290b25af 100644 --- a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c +++ b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c @@ -857,7 +857,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) { Math_ApproachF(&this->subCamAt.x, player->actor.world.pos.x, 0.5f, 50.0f); Math_ApproachF(&this->subCamAt.y, player->actor.world.pos.y, 0.5f, 50.0f); Math_ApproachF(&this->subCamAt.z, player->actor.world.pos.z, 0.5f, 50.0f); - Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); + Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); } break; case MO_TENT_CUT: @@ -893,13 +893,13 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) { Math_ApproachF(&this->subCamAt.x, player->actor.world.pos.x, 0.5f, 50.0f); Math_ApproachF(&this->subCamAt.y, player->actor.world.pos.y, 0.5f, 50.0f); Math_ApproachF(&this->subCamAt.z, player->actor.world.pos.z, 0.5f, 50.0f); - Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); + Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); if (player->actor.world.pos.y <= 42.0f) { mainCam2 = Play_GetCamera(play, CAM_ID_MAIN); mainCam2->eye = this->subCamEye; mainCam2->eyeNext = this->subCamEye; mainCam2->at = this->subCamAt; - func_800C08AC(play, this->subCamId, 0); + Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); } @@ -1442,7 +1442,7 @@ void BossMo_IntroCs(BossMo* this, PlayState* play) { mainCam2->eye = this->subCamEye; mainCam2->eyeNext = this->subCamEye; mainCam2->at = this->subCamAt; - func_800C08AC(play, this->subCamId, 0); + Play_ReturnToMainCam(play, this->subCamId, 0); // MO_BATTLE / SUB_CAM_ID_DONE this->csState = this->subCamId = 0; func_80064534(play, &play->csCtx); @@ -1481,11 +1481,11 @@ void BossMo_IntroCs(BossMo* this, PlayState* play) { this->subCamUp.x = this->subCamUp.z = sinf(this->work[MO_TENT_VAR_TIMER] * 0.03f) * this->subCamYawShake * (-2.0f); this->subCamUp.y = 1.0f; - Play_CameraSetAtEyeUp(play, this->subCamId, &this->subCamAt, &this->subCamEye, &this->subCamUp); + Play_SetCameraAtEyeUp(play, this->subCamId, &this->subCamAt, &this->subCamEye, &this->subCamUp); mainCam->eye = this->subCamEye; mainCam->eyeNext = this->subCamEye; mainCam->at = this->subCamAt; - Play_CameraSetFov(play, this->subCamId, this->subCamFov); + Play_SetCameraFov(play, this->subCamId, this->subCamFov); } if ((this->csState > MO_INTRO_START) && (this->work[MO_TENT_MOVE_TIMER] > 540)) { @@ -1678,7 +1678,7 @@ void BossMo_DeathCs(BossMo* this, PlayState* play) { mainCam->eye = this->subCamEye; mainCam->eyeNext = this->subCamEye; mainCam->at = this->subCamAt; - func_800C08AC(play, this->subCamId, 0); + Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); @@ -1727,7 +1727,7 @@ void BossMo_DeathCs(BossMo* this, PlayState* play) { this->subCamAtVel.y * this->subCamVelFactor); Math_ApproachF(&this->subCamVelFactor, 1.0f, 1.0f, this->subCamAccel); } - Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); + Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); } } diff --git a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c index 907c5c4b14..f7341f60a5 100644 --- a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c +++ b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c @@ -380,7 +380,7 @@ void BossSst_HeadSetupIntro(BossSst* this, PlayState* play) { sSubCamEye.z = ROOM_CENTER_Z - 100.0f; } - Play_CameraSetAtEye(play, sSubCamId, &sSubCamAt, &sSubCamEye); + Play_SetCameraAtEye(play, sSubCamId, &sSubCamAt, &sSubCamEye); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 1); this->actionFunc = BossSst_HeadIntro; } @@ -407,7 +407,7 @@ void BossSst_HeadIntro(BossSst* this, PlayState* play) { func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); sSubCamAt.y += 30.0f; sSubCamAt.z += 300.0f; - Play_CameraSetAtEye(play, sSubCamId, &sSubCamAt, &sSubCamEye); + Play_SetCameraAtEye(play, sSubCamId, &sSubCamAt, &sSubCamEye); Play_CopyCamera(play, CAM_ID_MAIN, sSubCamId); Play_ChangeCameraStatus(play, sSubCamId, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_ACTIVE); @@ -616,7 +616,7 @@ void BossSst_HeadIntro(BossSst* this, PlayState* play) { } if (this->actionFunc != BossSst_HeadNeutral) { - Play_CameraSetAtEye(play, sSubCamId, &sSubCamAt, &sSubCamEye); + Play_SetCameraAtEye(play, sSubCamId, &sSubCamAt, &sSubCamEye); } } @@ -1003,7 +1003,7 @@ void BossSst_UpdateDeathCamera(BossSst* this, PlayState* play) { subCamEye.x = this->actor.world.pos.x + (sSubCamEye.z * sn) + (sSubCamEye.x * cs); subCamEye.y = this->actor.home.pos.y - 140.0f + sSubCamEye.y; subCamEye.z = this->actor.world.pos.z + (sSubCamEye.z * cs) - (sSubCamEye.x * sn); - Play_CameraSetAtEye(play, sSubCamId, &subCamAt, &subCamEye); + Play_SetCameraAtEye(play, sSubCamId, &subCamAt, &subCamEye); } void BossSst_HeadSetupDeath(BossSst* this, PlayState* play) { @@ -1042,7 +1042,7 @@ void BossSst_HeadDeath(BossSst* this, PlayState* play) { BossSst_HandSetupThrash(sHands[RIGHT]); BossSst_HeadSetupThrash(this); } else if (this->timer > 48) { - Play_CameraSetAtEye(play, sSubCamId, &this->actor.focus.pos, &sSubCamEye); + Play_SetCameraAtEye(play, sSubCamId, &this->actor.focus.pos, &sSubCamEye); Math_StepToF(&this->radius, -350.0f, 10.0f); } else if (this->timer == 48) { Player* player = GET_PLAYER(play); diff --git a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c index 5a8b9d38d7..ed767d91cb 100644 --- a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c +++ b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c @@ -1561,9 +1561,9 @@ void BossTw_TwinrovaMergeCS(BossTw* this, PlayState* play) { if (this->subCamId != SUB_CAM_ID_DONE) { if (this->unk_5F9 == 0) { - Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); + Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); } else { - Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt2, &this->subCamEye2); + Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt2, &this->subCamEye2); } } @@ -1711,7 +1711,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, PlayState* play) { mainCam->eye = this->subCamEye; mainCam->eyeNext = this->subCamEye; mainCam->at = this->subCamAt; - func_800C08AC(play, this->subCamId, 0); + Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; this->csState2 = this->subCamId; func_80064534(play, &play->csCtx); @@ -2274,7 +2274,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, PlayState* play) { mainCam->eye = this->subCamEye; mainCam->eyeNext = this->subCamEye; mainCam->at = this->subCamAt; - func_800C08AC(play, this->subCamId, 0); + Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; this->csState2 = this->subCamId; func_80064534(play, &play->csCtx); @@ -2300,7 +2300,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, PlayState* play) { this->subCamAtVel.z * this->subCamUpdateRate); } - Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); + Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); } } @@ -2806,7 +2806,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, PlayState* play) { mainCam->eye = this->subCamEye; mainCam->eyeNext = this->subCamEye; mainCam->at = this->subCamAt; - func_800C08AC(play, this->subCamId, 0); + Play_ReturnToMainCam(play, this->subCamId, 0); this->csState2 = 4; this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); @@ -2829,7 +2829,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, PlayState* play) { if (this->subCamId != SUB_CAM_ID_DONE) { if (1) {} - Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); + Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); } } diff --git a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c index e68c2cee6e..360e9b9c1b 100644 --- a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c +++ b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c @@ -655,7 +655,7 @@ void BossVa_Init(Actor* thisx, PlayState* play2) { sSubCamAtNext.x = sSubCamAt.x = 10.0f; sSubCamAtNext.y = sSubCamAt.y = 50.0f; sSubCamAtNext.z = sSubCamAt.z = -220.0f; - Play_CameraSetAtEye(play, sSubCamId, &sSubCamAt, &sSubCamEye); + Play_SetCameraAtEye(play, sSubCamId, &sSubCamAt, &sSubCamEye); this->timer = 20; for (i = BOSSVA_BARI_LOWER_5; i >= BOSSVA_BARI_UPPER_1; i--) { @@ -1039,7 +1039,7 @@ void BossVa_BodyIntro(BossVa* this, PlayState* play) { Math_SmoothStepToF(&sSubCamAt.x, sSubCamAtNext.x, 0.3f, sSubCamAtMaxVelFrac.x, 0.075f); Math_SmoothStepToF(&sSubCamAt.y, sSubCamAtNext.y, 0.3f, sSubCamAtMaxVelFrac.y, 0.075f); Math_SmoothStepToF(&sSubCamAt.z, sSubCamAtNext.z, 0.3f, sSubCamAtMaxVelFrac.z, 0.075f); - Play_CameraSetAtEye(play, sSubCamId, &sSubCamAt, &sSubCamEye); + Play_SetCameraAtEye(play, sSubCamId, &sSubCamAt, &sSubCamEye); } } @@ -1663,7 +1663,7 @@ void BossVa_BodyDeath(BossVa* this, PlayState* play) { Math_SmoothStepToF(&sSubCamAt.x, sSubCamAtNext.x, 0.3f, sSubCamAtMaxVelFrac.x, 0.15f); Math_SmoothStepToF(&sSubCamAt.y, sSubCamAtNext.y, 0.3f, sSubCamAtMaxVelFrac.y, 0.15f); Math_SmoothStepToF(&sSubCamAt.z, sSubCamAtNext.z, 0.3f, sSubCamAtMaxVelFrac.z, 0.15f); - Play_CameraSetAtEye(play, sSubCamId, &sSubCamAt, &sSubCamEye); + Play_SetCameraAtEye(play, sSubCamId, &sSubCamAt, &sSubCamEye); } SkelAnime_Update(&this->skelAnime); diff --git a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c index bccd19edd4..2805357ab5 100644 --- a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c +++ b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c @@ -567,8 +567,8 @@ void func_80999EE0(DoorWarp1* this, PlayState* play) { eye.y = 43.0f; eye.z = player->actor.world.pos.z; - Play_CameraSetAtEye(play, sRutoWarpSubCamId, &at, &eye); - Play_CameraSetFov(play, sRutoWarpSubCamId, 90.0f); + Play_SetCameraAtEye(play, sRutoWarpSubCamId, &at, &eye); + Play_SetCameraFov(play, sRutoWarpSubCamId, 90.0f); this->rutoWarpState = WARP_BLUE_RUTO_STATE_TALKING; Message_StartTextbox(play, 0x4022, NULL); DoorWarp1_SetupAction(this, func_80999FE4); diff --git a/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c b/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c index c664c49094..3e12a2b51d 100644 --- a/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c +++ b/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c @@ -101,7 +101,7 @@ void EnBomBowlPit_DetectHit(EnBomBowlPit* this, PlayState* play) { this->subCamAtVel.y = fabsf(this->subCamAt.y - this->subCamAtNext.y) * 0.02f; this->subCamAtVel.z = fabsf(this->subCamAt.z - this->subCamAtNext.z) * 0.02f; - Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); + Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); this->actor.textId = 0xF; Message_StartTextbox(play, this->actor.textId, NULL); this->unk_154 = TEXT_STATE_EVENT; @@ -127,7 +127,7 @@ void EnBomBowlPit_CameraDollyIn(EnBomBowlPit* this, PlayState* play) { Math_ApproachF(&this->subCamEye.z, this->subCamEyeNext.z, this->subCamEyeMaxVelFrac.z, this->subCamEyeVel.z); } - Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); + Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); if ((this->unk_154 == Message_GetState(&play->msgCtx)) && Message_ShouldAdvance(play)) { Message_CloseTextbox(play); diff --git a/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c b/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c index ced50c7e65..562d2db177 100644 --- a/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c +++ b/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c @@ -612,12 +612,12 @@ void EnClearTag_Update(Actor* thisx, PlayState* play2) { Math_ApproachF(&this->subCamAt.x, subCamAtNext.x, 0.2f, 500.0f); Math_ApproachF(&this->subCamAt.y, subCamAtNext.y, 0.2f, 500.0f); Math_ApproachF(&this->subCamAt.z, subCamAtNext.z, 0.2f, 500.0f); - Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); + Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); } // Cutscene has finished. if (this->cutsceneTimer == 1) { - func_800C08AC(play, this->subCamId, 0); + Play_ReturnToMainCam(play, this->subCamId, 0); // CLEAR_TAG_CUTSCENE_MODE_NONE / SUB_CAM_ID_DONE this->cutsceneMode = this->subCamId = 0; func_80064534(play, &play->csCtx); diff --git a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c index bcf61281ea..ee662aed68 100644 --- a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c +++ b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c @@ -467,8 +467,8 @@ void EnDaiku_InitSubCamera(EnDaiku* this, PlayState* play) { Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); - Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); - Play_CameraSetFov(play, this->subCamId, play->mainCamera.fov); + Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); + Play_SetCameraFov(play, this->subCamId, play->mainCamera.fov); func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); } @@ -483,7 +483,7 @@ void EnDaiku_UpdateSubCamera(EnDaiku* this, PlayState* play) { Math_SmoothStepToF(&this->subCamAt.y, this->subCamAtNext.y, 1.0f, 1000.0f, 0.0f); Math_SmoothStepToF(&this->subCamAt.z, this->subCamAtNext.z, 1.0f, 1000.0f, 0.0f); - Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); + Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); } void EnDaiku_EscapeSuccess(EnDaiku* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c index 0ad921fc20..46e099d022 100644 --- a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c +++ b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c @@ -326,8 +326,8 @@ void EnDivingGame_SetupRupeeThrow(EnDivingGame* this, PlayState* play) { this->subCamAtVel.x = fabsf(this->subCamAt.x - this->subCamAtNext.x) * 0.04f; this->subCamAtVel.y = fabsf(this->subCamAt.y - this->subCamAtNext.y) * 0.04f; this->subCamAtVel.z = fabsf(this->subCamAt.z - this->subCamAtNext.z) * 0.04f; - Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); - Play_CameraSetFov(play, this->subCamId, play->mainCamera.fov); + Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); + Play_SetCameraFov(play, this->subCamId, play->mainCamera.fov); this->subCamTimer = 60; this->actionFunc = EnDivingGame_RupeeThrow; this->subCamVelFactor = 0.0f; @@ -352,7 +352,7 @@ void EnDivingGame_RupeeThrow(EnDivingGame* this, PlayState* play) { this->subCamAtVel.z * this->subCamVelFactor); Math_ApproachF(&this->subCamVelFactor, 1.0f, 1.0f, 0.02f); } - Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); + Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); if (!this->allRupeesThrown && this->spawnRuppyTimer == 0) { this->spawnRuppyTimer = 5; EnDivingGame_SpawnRuppy(this, play); diff --git a/src/overlays/actors/ovl_En_Go2/z_en_go2.c b/src/overlays/actors/ovl_En_Go2/z_en_go2.c index 0839c03346..a982b70aae 100644 --- a/src/overlays/actors/ovl_En_Go2/z_en_go2.c +++ b/src/overlays/actors/ovl_En_Go2/z_en_go2.c @@ -1492,7 +1492,7 @@ void EnGo2_GoronFireCamera(EnGo2* this, PlayState* play) { this->subCamAt.x = this->actor.world.pos.x; this->subCamAt.y = this->actor.world.pos.y + 40.0f; this->subCamAt.z = this->actor.world.pos.z; - Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); + Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); } void EnGo2_GoronFireClearCamera(EnGo2* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c index 80e505a5a6..38f1bf90d3 100644 --- a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c +++ b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c @@ -319,7 +319,7 @@ void func_80A5372C(EnHeishi2* this, PlayState* play) { this->subCamAt.y = 1145.0f; this->subCamAt.z = 3014.0f; - Play_CameraSetAtEye(play, this->subCamId, &this->subCamEye, &this->subCamAt); + Play_SetCameraAtEye(play, this->subCamId, &this->subCamEye, &this->subCamAt); this->actionFunc = func_80A53850; } @@ -327,7 +327,7 @@ void func_80A53850(EnHeishi2* this, PlayState* play) { BgSpot15Saku* gate; SkelAnime_Update(&this->skelAnime); - Play_CameraSetAtEye(play, this->subCamId, &this->subCamEye, &this->subCamAt); + Play_SetCameraAtEye(play, this->subCamId, &this->subCamEye, &this->subCamAt); gate = (BgSpot15Saku*)this->gate; if ((this->unk_2F2[0] == 0) || (gate->unk_168 == 0)) { Play_ClearCamera(play, this->subCamId); @@ -487,7 +487,7 @@ void func_80A53DF8(EnHeishi2* this, PlayState* play) { this->subCamAt.y = 417.0f; this->subCamAtInit.z = -1079.0f; this->subCamAt.z = -1079.0f; - Play_CameraSetAtEye(play, this->subCamId, &this->subCamEye, &this->subCamAt); + Play_SetCameraAtEye(play, this->subCamId, &this->subCamEye, &this->subCamAt); this->actionFunc = func_80A53F30; } @@ -495,7 +495,7 @@ void func_80A53F30(EnHeishi2* this, PlayState* play) { BgGateShutter* gate; SkelAnime_Update(&this->skelAnime); - Play_CameraSetAtEye(play, this->subCamId, &this->subCamEye, &this->subCamAt); + Play_SetCameraAtEye(play, this->subCamId, &this->subCamEye, &this->subCamAt); gate = (BgGateShutter*)this->gate; if ((this->unk_2F2[0] == 0) || (gate->openingState == 0)) { Play_ClearCamera(play, this->subCamId); diff --git a/src/overlays/actors/ovl_En_In/z_en_in.c b/src/overlays/actors/ovl_En_In/z_en_in.c index 15951f54bc..a09d71d1a8 100644 --- a/src/overlays/actors/ovl_En_In/z_en_in.c +++ b/src/overlays/actors/ovl_En_In/z_en_in.c @@ -455,7 +455,7 @@ void func_80A79C78(EnIn* this, PlayState* play) { subCamEye.x = subCamAt.x; subCamEye.y = subCamAt.y - 22.0f; subCamEye.z = subCamAt.z + 40.0f; - Play_CameraSetAtEye(play, this->subCamId, &subCamAt, &subCamEye); + Play_SetCameraAtEye(play, this->subCamId, &subCamAt, &subCamEye); this->actor.shape.rot.y = Math_Vec3f_Yaw(&this->actor.world.pos, &subCamEye); this->interactInfo.headRot = zeroVec; this->interactInfo.torsoRot = zeroVec; @@ -785,7 +785,7 @@ void func_80A7AA40(EnIn* this, PlayState* play) { subCamEye.y += this->subCamEyeOffset.y; subCamEye.z += this->subCamEyeOffset.z; - Play_CameraSetAtEye(play, this->subCamId, &subCamAt, &subCamEye); + Play_SetCameraAtEye(play, this->subCamId, &subCamAt, &subCamEye); this->actor.textId = 0x203B; Message_StartTextbox(play, this->actor.textId, NULL); this->interactInfo.talkState = NPC_TALK_STATE_TALKING; @@ -849,7 +849,7 @@ void func_80A7ABD4(EnIn* this, PlayState* play) { subCamEye.x += this->subCamEyeOffset.x; subCamEye.y += this->subCamEyeOffset.y; subCamEye.z += this->subCamEyeOffset.z; - Play_CameraSetAtEye(play, this->subCamId, &subCamAt, &subCamEye); + Play_SetCameraAtEye(play, this->subCamId, &subCamAt, &subCamEye); } } diff --git a/src/overlays/actors/ovl_En_Kz/z_en_kz.c b/src/overlays/actors/ovl_En_Kz/z_en_kz.c index 2b42264f38..edc7aae62f 100644 --- a/src/overlays/actors/ovl_En_Kz/z_en_kz.c +++ b/src/overlays/actors/ovl_En_Kz/z_en_kz.c @@ -375,7 +375,7 @@ void EnKz_SetupMweep(EnKz* this, PlayState* play) { subCamAt.y += 60.0f; subCamEye.y += -100.0f; subCamEye.z += 260.0f; - Play_CameraSetAtEye(play, this->subCamId, &subCamAt, &subCamEye); + Play_SetCameraAtEye(play, this->subCamId, &subCamAt, &subCamEye); func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); this->actor.speedXZ = 0.1f; this->actionFunc = EnKz_Mweep; @@ -391,7 +391,7 @@ void EnKz_Mweep(EnKz* this, PlayState* play) { subCamAt.y += 60.0f; subCamEye.y += -100.0f; subCamEye.z += 260.0f; - Play_CameraSetAtEye(play, this->subCamId, &subCamAt, &subCamEye); + Play_SetCameraAtEye(play, this->subCamId, &subCamAt, &subCamEye); if ((EnKz_FollowPath(this, play) == 1) && (this->waypoint == 0)) { Animation_ChangeByInfo(&this->skelanime, sAnimationInfo, ENKZ_ANIM_1); Inventory_ReplaceItem(play, ITEM_BOTTLE_RUTOS_LETTER, ITEM_BOTTLE_EMPTY); diff --git a/src/overlays/actors/ovl_En_Ta/z_en_ta.c b/src/overlays/actors/ovl_En_Ta/z_en_ta.c index 5fdafd34e4..401d8ee41e 100644 --- a/src/overlays/actors/ovl_En_Ta/z_en_ta.c +++ b/src/overlays/actors/ovl_En_Ta/z_en_ta.c @@ -586,7 +586,7 @@ void EnTa_CreateFloorCamera(EnTa* this, PlayState* play) { subCamAt.y = 45.0f; subCamAt.z = -40.0f; - Play_CameraSetAtEye(play, this->subCamId, &subCamAt, &subCamEye); + Play_SetCameraAtEye(play, this->subCamId, &subCamAt, &subCamEye); } void EnTa_RemoveFloorCamera(EnTa* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c index 3dbfb8de7d..a5994f1c52 100644 --- a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c +++ b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c @@ -172,14 +172,14 @@ void func_80B4B010(EnZl1* this, PlayState* play) { this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); - func_800C0808(play, this->subCamId, player, CAM_SET_FREE0); + Play_InitCameraDataUsingPlayer(play, this->subCamId, player, CAM_SET_FREE0); play->envCtx.screenFillColor[0] = 255; play->envCtx.screenFillColor[1] = 255; play->envCtx.screenFillColor[2] = 255; play->envCtx.screenFillColor[3] = 24; play->envCtx.fillScreen = true; - Play_CameraSetAtEye(play, this->subCamId, &subCamAt, &subCamEye); - Play_CameraSetFov(play, this->subCamId, 30.0f); + Play_SetCameraAtEye(play, this->subCamId, &subCamAt, &subCamEye); + Play_SetCameraFov(play, this->subCamId, 30.0f); Letterbox_SetSizeTarget(32); Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING_ALT); player->actor.world.pos = playerPos; @@ -232,8 +232,8 @@ void func_80B4B240(EnZl1* this, PlayState* play) { case 1: if ((Message_GetState(msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) { play->envCtx.fillScreen = false; - Play_CameraSetAtEye(play, this->subCamId, &subCamAt, &subCamEye); - Play_CameraSetFov(play, this->subCamId, 25.0f); + Play_SetCameraAtEye(play, this->subCamId, &subCamAt, &subCamEye); + Play_SetCameraFov(play, this->subCamId, 25.0f); player->actor.world.pos = sp58; this->actor.textId = 0x702F; Message_ContinueTextbox(play, this->actor.textId); @@ -411,8 +411,8 @@ void func_80B4B8B4(EnZl1* this, PlayState* play) { this->actor.velocity.z = (sp68.z - sp74.z) / actionLength; } Actor_TrackPlayer(play, &this->actor, &this->unk_200, &this->unk_206, this->actor.focus.pos); - Play_CameraSetAtEye(play, this->subCamId, &subCamAt, &subCamEye); - Play_CameraSetFov(play, this->subCamId, 70.0f); + Play_SetCameraAtEye(play, this->subCamId, &subCamAt, &subCamEye); + Play_SetCameraFov(play, this->subCamId, 70.0f); } } diff --git a/src/overlays/actors/ovl_En_fHG/z_en_fhg.c b/src/overlays/actors/ovl_En_fHG/z_en_fhg.c index f6b42d2156..096a7cfa0e 100644 --- a/src/overlays/actors/ovl_En_fHG/z_en_fhg.c +++ b/src/overlays/actors/ovl_En_fHG/z_en_fhg.c @@ -397,7 +397,7 @@ void EnfHG_Intro(EnfHG* this, PlayState* play) { mainCam->eye = this->subCamEye; mainCam->eyeNext = this->subCamEye; mainCam->at = this->subCamAt; - func_800C08AC(play, this->subCamId, 0); + Play_ReturnToMainCam(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); @@ -406,7 +406,7 @@ void EnfHG_Intro(EnfHG* this, PlayState* play) { break; } if (this->subCamId != SUB_CAM_ID_DONE) { - Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); + Play_SetCameraAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); } } diff --git a/src/overlays/actors/ovl_Fishing/z_fishing.c b/src/overlays/actors/ovl_Fishing/z_fishing.c index 3a6e830a73..8cfb2fa519 100644 --- a/src/overlays/actors/ovl_Fishing/z_fishing.c +++ b/src/overlays/actors/ovl_Fishing/z_fishing.c @@ -5343,7 +5343,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) { mainCam->eye = sSubCamEye; mainCam->eyeNext = sSubCamEye; mainCam->at = sSubCamAt; - func_800C08AC(play, sSubCamId, 0); + Play_ReturnToMainCam(play, sSubCamId, 0); func_80064534(play, &play->csCtx); D_80B7A6CC = 0; sSubCamId = SUB_CAM_ID_DONE; @@ -5385,7 +5385,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) { mainCam->eye = sSubCamEye; mainCam->eyeNext = sSubCamEye; mainCam->at = sSubCamAt; - func_800C08AC(play, sSubCamId, 0); + Play_ReturnToMainCam(play, sSubCamId, 0); func_80064534(play, &play->csCtx); func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); D_80B7A6CC = 0; @@ -5489,7 +5489,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) { mainCam->eye = sSubCamEye; mainCam->eyeNext = sSubCamEye; mainCam->at = sSubCamAt; - func_800C08AC(play, sSubCamId, 0); + Play_ReturnToMainCam(play, sSubCamId, 0); func_80064534(play, &play->csCtx); func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); D_80B7A6CC = 0; @@ -5510,7 +5510,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) { } if (sSubCamId != SUB_CAM_ID_DONE) { - Play_CameraSetAtEye(play, sSubCamId, &sSubCamAt, &sSubCamEye); + Play_SetCameraAtEye(play, sSubCamId, &sSubCamAt, &sSubCamEye); Math_ApproachF(&sSubCamVelFactor, 1.0f, 1.0f, 0.02f); if (sSubCamEye.y <= (WATER_SURFACE_Y(play) + 1.0f)) {