mirror of
https://github.com/blawar/ooot.git
synced 2024-06-30 16:29:55 +00:00
Fixed Fullscreen Effects (#165)
* Fixed fullscreen effects: circular fade, Saria's Song Effect and Epona's Song Effect. * typo * Improved the code. Added #include "gfx_align.h", removed the N64_VERSION flag Co-authored-by: DaMarkov <DaMarkovZED@gmail.com> Co-authored-by: DaMarkov <damarkov@gmail.com>
This commit is contained in:
parent
2e837de83e
commit
0d14e3efc5
|
@ -4,6 +4,7 @@
|
|||
#include "z64transition.h"
|
||||
#include "z64audio.h"
|
||||
#include "sfx.h"
|
||||
#include "gfx_align.h"
|
||||
|
||||
// unused
|
||||
Gfx sCircleNullDList[] = {
|
||||
|
@ -152,7 +153,8 @@ void TransitionCircle_Draw(void* thisx, Gfx** gfxP) {
|
|||
// These variables are a best guess based on the other transition types.
|
||||
f32 tPos = 0.0f;
|
||||
f32 rot = 0.0f;
|
||||
f32 scale = 14.8f;
|
||||
const float correction_factor = (gfx_width() * 3.0f) / (gfx_height() * 4.0f); // Should be 1 on a 4:3 display
|
||||
f32 scale = 14.8f * correction_factor;
|
||||
|
||||
modelView = pthis->modelView[pthis->frame];
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "def/z_lib.h"
|
||||
#include "def/z_parameter.h"
|
||||
#include "def/z_rcp.h"
|
||||
#include "gfx_align.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25)
|
||||
|
||||
|
@ -103,7 +104,8 @@ void OceffWipe2_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
func_80093D84(globalCtx->state.gfxCtx);
|
||||
|
||||
Matrix_Translate(eye.x + vec.x, eye.y + vec.y, eye.z + vec.z, MTXMODE_NEW);
|
||||
Matrix_Scale(0.1f, 0.1f, 0.1f, MTXMODE_APPLY);
|
||||
const float correction_factor = (gfx_width() * 3.0f) / (gfx_height() * 4.0f); // Should be 1 on a 4:3 display
|
||||
Matrix_Scale(0.1f * correction_factor, 0.1f, 0.1f, MTXMODE_APPLY);
|
||||
func_800D1FD4(&globalCtx->billboardMtxF);
|
||||
Matrix_Translate(0.0f, 0.0f, -z, MTXMODE_APPLY);
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "def/z_lib.h"
|
||||
#include "def/z_parameter.h"
|
||||
#include "def/z_rcp.h"
|
||||
#include "gfx_align.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25)
|
||||
|
||||
|
@ -104,7 +105,8 @@ void OceffWipe3_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
func_80093D84(globalCtx->state.gfxCtx);
|
||||
|
||||
Matrix_Translate(eye.x + vec.x, eye.y + vec.y, eye.z + vec.z, MTXMODE_NEW);
|
||||
Matrix_Scale(0.1f, 0.1f, 0.1f, MTXMODE_APPLY);
|
||||
const float correction_factor = (gfx_width() * 3.0f) / (gfx_height() * 4.0f); // Should be 1 on a 4:3 display
|
||||
Matrix_Scale(0.1f * correction_factor, 0.1f, 0.1f, MTXMODE_APPLY);
|
||||
func_800D1FD4(&globalCtx->billboardMtxF);
|
||||
Matrix_Translate(0.0f, 0.0f, -z, MTXMODE_APPLY);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user