1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-21 22:41:14 +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

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