1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-02-18 04:45:24 +00:00

z_play: Camera Docs and Cleanup (#1460)

* begin docs

* More suggestions

* more docs

* timer to duration

* partial PR review

* init data with player

* consistent comments

* withPlayer to usingPlayer
This commit is contained in:
engineer124 2022-12-17 16:07:31 -05:00 committed by GitHub
parent aa48c66e10
commit 934d488420
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 362 additions and 260 deletions

View file

@ -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);

View file

@ -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;

View file

@ -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);
}
}
}

View file

@ -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);

File diff suppressed because it is too large Load diff

View file

@ -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;

View file

@ -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);
}
}

View file

@ -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);

View file

@ -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);

View file

@ -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);
}
}

View file

@ -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) {

View file

@ -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);
}
}

View file

@ -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) {

View file

@ -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);
}
}

View file

@ -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);

View file

@ -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);
}
}

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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) {

View file

@ -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);

View file

@ -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) {

View file

@ -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);

View file

@ -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);
}
}

View file

@ -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);

View file

@ -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) {

View file

@ -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);
}
}

View file

@ -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);
}
}

View file

@ -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)) {