summaryrefslogtreecommitdiff
path: root/src/libultra_code/guPerspectiveF.c
diff options
context:
space:
mode:
authorEthan Roseman <ethteck@gmail.com>2020-03-22 19:21:39 -0400
committerEthan Roseman <ethteck@gmail.com>2020-03-22 19:21:39 -0400
commitab976edca4f09dc017a7672596b232e6d2a98e07 (patch)
treece030691b1e00c2e224a0680033834e7043129de /src/libultra_code/guPerspectiveF.c
parent0f7cc04f430f0b98b98e51de08a94f2c326ba36e (diff)
parentd85168f0b088c8e5f661725f45946ca10cc82956 (diff)
Merge branch 'master' into ovl_Bg_Gate_Shutter
Diffstat (limited to 'src/libultra_code/guPerspectiveF.c')
-rw-r--r--src/libultra_code/guPerspectiveF.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/libultra_code/guPerspectiveF.c b/src/libultra_code/guPerspectiveF.c
index caef68560..503bcc25a 100644
--- a/src/libultra_code/guPerspectiveF.c
+++ b/src/libultra_code/guPerspectiveF.c
@@ -1,7 +1,6 @@
#include "libultra_internal.h"
-void guPerspectiveF(float mf[4][4], u16 *perspNorm, float fovy, float aspect, float near, float far,
- float scale) {
+void guPerspectiveF(float mf[4][4], u16* perspNorm, float fovy, float aspect, float near, float far, float scale) {
float yscale;
int row;
int col;
@@ -23,14 +22,14 @@ void guPerspectiveF(float mf[4][4], u16 *perspNorm, float fovy, float aspect, fl
if (near + far <= 2.0) {
*perspNorm = 65535;
} else {
- *perspNorm = (double) (1 << 17) / (near + far);
- if (*perspNorm <= 0)
+ *perspNorm = (double)(1 << 17) / (near + far);
+ if (*perspNorm <= 0) {
*perspNorm = 1;
+ }
}
}
}
-void guPerspective(Mtx *m, u16 *perspNorm, float fovy, float aspect, float near, float far,
- float scale) {
+void guPerspective(Mtx* m, u16* perspNorm, float fovy, float aspect, float near, float far, float scale) {
float mat[4][4];
guPerspectiveF(mat, perspNorm, fovy, aspect, near, far, scale);
guMtxF2L(mat, m);