1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-11 03:39:59 +00:00

Match retail Title and Sample gamestates (#1692)

* match title and sample

* change to directive

* no bad return
This commit is contained in:
fig02 2024-02-01 19:52:52 -05:00 committed by GitHub
parent 9289b0211d
commit 8d0076b010
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 6 deletions

View file

@ -1182,7 +1182,7 @@ void View_InitDistortion(View* view);
void View_ClearDistortion(View* view); void View_ClearDistortion(View* view);
void View_SetDistortion(View* view, Vec3f orientation, Vec3f scale, f32 speed); void View_SetDistortion(View* view, Vec3f orientation, Vec3f scale, f32 speed);
s32 View_StepDistortion(View* view, Mtx* projectionMtx); s32 View_StepDistortion(View* view, Mtx* projectionMtx);
void View_Apply(View* view, s32 mask); s32 View_Apply(View* view, s32 mask);
s32 View_ApplyOrthoToOverlay(View* view); s32 View_ApplyOrthoToOverlay(View* view);
s32 View_ApplyPerspectiveToOverlay(View* view); s32 View_ApplyPerspectiveToOverlay(View* view);
s32 View_UpdateViewingMatrix(View* view); s32 View_UpdateViewingMatrix(View* view);

View file

@ -275,13 +275,13 @@ s32 View_StepDistortion(View* view, Mtx* projectionMtx) {
/** /**
* Apply view to POLY_OPA_DISP, POLY_XLU_DISP (and OVERLAY_DISP if ortho) * Apply view to POLY_OPA_DISP, POLY_XLU_DISP (and OVERLAY_DISP if ortho)
*/ */
void View_Apply(View* view, s32 mask) { s32 View_Apply(View* view, s32 mask) {
mask = (view->flags & mask) | (mask >> 4); mask = (view->flags & mask) | (mask >> 4);
if (mask & VIEW_PROJECTION_ORTHO) { if (mask & VIEW_PROJECTION_ORTHO) {
View_ApplyOrtho(view); return View_ApplyOrtho(view);
} else { } else {
View_ApplyPerspective(view); return View_ApplyPerspective(view);
} }
} }

View file

@ -8,6 +8,7 @@
#include "alloca.h" #include "alloca.h"
#include "assets/textures/nintendo_rogo_static/nintendo_rogo_static.h" #include "assets/textures/nintendo_rogo_static/nintendo_rogo_static.h"
#if OOT_DEBUG
void ConsoleLogo_PrintBuildInfo(Gfx** gfxP) { void ConsoleLogo_PrintBuildInfo(Gfx** gfxP) {
Gfx* gfx; Gfx* gfx;
GfxPrint* printer; GfxPrint* printer;
@ -29,6 +30,7 @@ void ConsoleLogo_PrintBuildInfo(Gfx** gfxP) {
GfxPrint_Destroy(printer); GfxPrint_Destroy(printer);
*gfxP = gfx; *gfxP = gfx;
} }
#endif
// Note: In other rom versions this function also updates unk_1D4, coverAlpha, addAlpha, visibleDuration to calculate // Note: In other rom versions this function also updates unk_1D4, coverAlpha, addAlpha, visibleDuration to calculate
// the fade-in/fade-out + the duration of the n64 logo animation // the fade-in/fade-out + the duration of the n64 logo animation
@ -128,13 +130,14 @@ void ConsoleLogo_Main(GameState* thisx) {
ConsoleLogo_Calc(this); ConsoleLogo_Calc(this);
ConsoleLogo_Draw(this); ConsoleLogo_Draw(this);
if (OOT_DEBUG && gIsCtrlr2Valid) { #if OOT_DEBUG
if (gIsCtrlr2Valid) {
Gfx* gfx = POLY_OPA_DISP; Gfx* gfx = POLY_OPA_DISP;
s32 pad;
ConsoleLogo_PrintBuildInfo(&gfx); ConsoleLogo_PrintBuildInfo(&gfx);
POLY_OPA_DISP = gfx; POLY_OPA_DISP = gfx;
} }
#endif
if (this->exit) { if (this->exit) {
gSaveContext.seqId = (u8)NA_BGM_DISABLED; gSaveContext.seqId = (u8)NA_BGM_DISABLED;