match a bunch of gu funcs

This commit is contained in:
Prakxo
2023-02-24 21:29:19 +01:00
parent 018de2aa8d
commit 2589c294e2
6 changed files with 56 additions and 1 deletions
+18
View File
@@ -0,0 +1,18 @@
#include "libultra/gu.h"
void guLookAtHilite (Mtx *m, LookAt *l, Hilite *h,
float xEye, float yEye, float zEye,
float xAt, float yAt, float zAt,
float xUp, float yUp, float zUp,
float xl1, float yl1, float zl1, /* light 1 direction */
float xl2, float yl2, float zl2, /* light 2 direction */
int twidth, int theight) /* highlight txtr size*/
{
float mf[4][4];
guLookAtHiliteF(mf, l, h, xEye, yEye, zEye, xAt, yAt, zAt,
xUp, yUp, zUp, xl1, yl1, zl1, xl2, yl2, zl2,
twidth, theight);
guMtxF2L(mf, m);
}
+7
View File
@@ -0,0 +1,7 @@
#include "libultra/gu.h"
void guMtxIdent(Mtx *m) {
float mf[4][4];
guMtxIdentF(mf);
guMtxF2L(mf, m);
}
+10
View File
@@ -0,0 +1,10 @@
#include "libultra/gu.h"
void guNormalize(float* x, float* y, float* z) {
float norm = sqrtf(*x * *x + *y * *y + *z * *z);
norm = 1.0f / norm;
*x *= norm;
*y *= norm;
*z *= norm;
// might return norm
}
+8
View File
@@ -0,0 +1,8 @@
#include "libultra/gu.h"
void guOrtho(Mtx *m, float l, float r, float b, float t, float n, float f, float scale)
{
float mf[4][4];
guOrthoF(mf, l, r, b, t, n, f, scale);
guMtxF2L(mf, m);
}