mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-21 06:21:16 +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:
parent
b9b40805f7
commit
9984c267d9
24 changed files with 210 additions and 170 deletions
|
@ -1408,9 +1408,9 @@ void Environment_DrawLensFlare(GlobalContext* globalCtx, EnvironmentContext* env
|
|||
dist = Math3D_Vec3f_DistXYZ(&pos, &view->eye) / 12.0f;
|
||||
|
||||
// compute a unit vector in the look direction
|
||||
tempX = view->lookAt.x - view->eye.x;
|
||||
tempY = view->lookAt.y - view->eye.y;
|
||||
tempZ = view->lookAt.z - view->eye.z;
|
||||
tempX = view->at.x - view->eye.x;
|
||||
tempY = view->at.y - view->eye.y;
|
||||
tempZ = view->at.z - view->eye.z;
|
||||
|
||||
length = sqrtf(SQ(tempX) + SQ(tempY) + SQ(tempZ));
|
||||
|
||||
|
@ -1584,9 +1584,9 @@ void Environment_DrawRain(GlobalContext* globalCtx, View* view, GraphicsContext*
|
|||
if (!(globalCtx->cameraPtrs[0]->unk_14C & 0x100) && (globalCtx->envCtx.unk_EE[2] == 0)) {
|
||||
OPEN_DISPS(gfxCtx, "../z_kankyo.c", 2799);
|
||||
|
||||
vec.x = view->lookAt.x - view->eye.x;
|
||||
vec.y = view->lookAt.y - view->eye.y;
|
||||
vec.z = view->lookAt.z - view->eye.z;
|
||||
vec.x = view->at.x - view->eye.x;
|
||||
vec.y = view->at.y - view->eye.y;
|
||||
vec.z = view->at.z - view->eye.z;
|
||||
|
||||
length = sqrtf(SQXYZ(vec));
|
||||
|
||||
|
@ -1859,8 +1859,8 @@ void Environment_DrawLightning(GlobalContext* globalCtx, s32 unused) {
|
|||
for (i = 0; i < ARRAY_COUNT(sLightningBolts); i++) {
|
||||
switch (sLightningBolts[i].state) {
|
||||
case LIGHTNING_BOLT_START:
|
||||
dx = globalCtx->view.lookAt.x - globalCtx->view.eye.x;
|
||||
dz = globalCtx->view.lookAt.z - globalCtx->view.eye.z;
|
||||
dx = globalCtx->view.at.x - globalCtx->view.eye.x;
|
||||
dz = globalCtx->view.at.z - globalCtx->view.eye.z;
|
||||
|
||||
x = dx / sqrtf(SQ(dx) + SQ(dz));
|
||||
z = dz / sqrtf(SQ(dx) + SQ(dz));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue