1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-08 00:44:42 +00:00

Names for some view things (#1191)

* Names for some view things

* Review: ORTHOGRAPHIC → ORTHO

* Review: dirty → dirtyFlags

* Review: Doc comment style

* Review: Define constants in terms of each other

* Review: Rename the ApplyToOverlay functions

* Update include/z64.h

Co-authored-by: fig02 <fig02srl@gmail.com>

* Review: Better View_LookAtInternal doc

* arg1 → mask

* View_LookAtInternal → View_LookAtUnsafe

* Review: View_SanityCheckEyePosition → View_ErrorCheckEyePosition

* sViewNotInitialized → sLogOnNextViewInit

* Remove VIEW_FORCE_ALL

* near/far → zNear/zFar

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* lookAt → at

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* near/far → zNear/zFar

* View_ApplyPerspective/Ortho: Remove from header instead of commenting

* lookAt → at

* Add fwd decls

* Fix external view->at accesses

* Missed these somehow

* lookAt → at

* Omit "Apply" in comments

* dirtyFlags → flags

* View_ApplyScissor → View_ApplyShrinkWindow

* Update src/code/z_view.c

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

Co-authored-by: fig02 <fig02srl@gmail.com>
Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
This commit is contained in:
Robin Allen 2022-04-08 23:50:28 +01:00 committed by GitHub
parent b9b40805f7
commit 9984c267d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 210 additions and 170 deletions

View file

@ -5097,9 +5097,9 @@ s32 Camera_Unique9(Camera* camera) {
anim->atTarget = anim->curKeyFrame->atTargetInit;
} else if (atInitFlags == 2) {
if (anim->isNewKeyFrame) {
anim->atTarget.x = camera->globalCtx->view.lookAt.x + anim->curKeyFrame->atTargetInit.x;
anim->atTarget.y = camera->globalCtx->view.lookAt.y + anim->curKeyFrame->atTargetInit.y;
anim->atTarget.z = camera->globalCtx->view.lookAt.z + anim->curKeyFrame->atTargetInit.z;
anim->atTarget.x = camera->globalCtx->view.at.x + anim->curKeyFrame->atTargetInit.x;
anim->atTarget.y = camera->globalCtx->view.at.y + anim->curKeyFrame->atTargetInit.y;
anim->atTarget.z = camera->globalCtx->view.at.z + anim->curKeyFrame->atTargetInit.z;
}
} else if (atInitFlags == 3) {
if (anim->isNewKeyFrame) {
@ -7473,7 +7473,7 @@ Vec3s Camera_Update(Camera* camera) {
if (gDbgCamEnabled) {
camera->globalCtx->view.fovy = D_8015BD80.fov;
DbCamera_Update(&D_8015BD80, camera);
func_800AA358(&camera->globalCtx->view, &D_8015BD80.eye, &D_8015BD80.at, &D_8015BD80.unk_1C);
View_LookAt(&camera->globalCtx->view, &D_8015BD80.eye, &D_8015BD80.at, &D_8015BD80.unk_1C);
if (R_DBG_CAM_UPDATE) {
osSyncPrintf("camera: debug out\n");
}
@ -7524,7 +7524,7 @@ Vec3s Camera_Update(Camera* camera) {
View_SetScale(&camera->globalCtx->view, 1.0f);
}
camera->globalCtx->view.fovy = viewFov;
func_800AA358(&camera->globalCtx->view, &viewEye, &viewAt, &viewUp);
View_LookAt(&camera->globalCtx->view, &viewEye, &viewAt, &viewUp);
camera->camDir.x = eyeAtAngle.pitch;
camera->camDir.y = eyeAtAngle.yaw;
camera->camDir.z = 0;