1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-12 01:40:47 +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

@ -38,8 +38,8 @@ void FileChoose_SetView(FileChooseContext* this, f32 eyeX, f32 eyeY, f32 eyeZ) {
up.y = 1.0f;
func_800AA358(&this->view, &eye, &lookAt, &up);
func_800AAA50(&this->view, 0x7F);
View_LookAt(&this->view, &eye, &lookAt, &up);
View_Apply(&this->view, VIEW_ALL | VIEW_FORCE_VIEWING | VIEW_FORCE_VIEWPORT | VIEW_FORCE_PROJECTION_PERSPECTIVE);
}
Gfx* FileChoose_QuadTextureIA8(Gfx* gfx, void* texture, s16 width, s16 height, s16 point) {

View file

@ -643,7 +643,7 @@ void Select_DrawMenu(SelectContext* this) {
gSPSegment(POLY_OPA_DISP++, 0x00, NULL);
func_80095248(gfxCtx, 0, 0, 0);
SET_FULLSCREEN_VIEWPORT(&this->view);
func_800AAA50(&this->view, 0xF);
View_Apply(&this->view, VIEW_ALL);
func_80094140(gfxCtx);
printer = alloca(sizeof(GfxPrint));
@ -667,7 +667,7 @@ void Select_DrawLoadingScreen(SelectContext* this) {
gSPSegment(POLY_OPA_DISP++, 0x00, NULL);
func_80095248(gfxCtx, 0, 0, 0);
SET_FULLSCREEN_VIEWPORT(&this->view);
func_800AAA50(&this->view, 0xF);
View_Apply(&this->view, VIEW_ALL);
func_80094140(gfxCtx);
printer = alloca(sizeof(GfxPrint));
@ -688,7 +688,7 @@ void Select_Draw(SelectContext* this) {
gSPSegment(POLY_OPA_DISP++, 0x00, NULL);
func_80095248(gfxCtx, 0, 0, 0);
SET_FULLSCREEN_VIEWPORT(&this->view);
func_800AAA50(&this->view, 0xF);
View_Apply(&this->view, VIEW_ALL);
if (!this->state.running) {
Select_DrawLoadingScreen(this);
@ -733,7 +733,7 @@ void Select_Init(GameState* thisx) {
this->opt = 0;
this->count = ARRAY_COUNT(sScenes);
View_Init(&this->view, this->state.gfxCtx);
this->view.flags = (0x08 | 0x02);
this->view.flags = (VIEW_PROJECTION_ORTHO | VIEW_VIEWPORT);
this->verticalInputAccumulator = 0;
this->verticalInput = 0;
this->timerUp = 0;

View file

@ -49,9 +49,9 @@ void Title_SetupView(TitleContext* this, f32 x, f32 y, f32 z) {
lookAt.x = lookAt.y = lookAt.z = 0.0f;
up.y = 1.0f;
func_800AA460(view, 30.0f, 10.0f, 12800.0f);
func_800AA358(view, &eye, &lookAt, &up);
func_800AAA50(view, 0xF);
View_SetPerspective(view, 30.0f, 10.0f, 12800.0f);
View_LookAt(view, &eye, &lookAt, &up);
View_Apply(view, VIEW_ALL);
}
void Title_Draw(TitleContext* this) {