mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-05-25 23:15:08 -04:00
match a bunch of gu funcs
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#ifndef GU_H
|
||||
#define GU_H
|
||||
#include <PR/gbi.h">
|
||||
#include "types.h"
|
||||
#include "libultra/u64types.h"
|
||||
|
||||
@@ -24,5 +25,16 @@ void guMtxIdentF(float mf[4][4]);
|
||||
void guTranslate(Mtx *m, float x, float y, float z);
|
||||
void guScale(Mtx *m, float x, float y, float z);
|
||||
|
||||
void guMtxIdent(Mtx *m);
|
||||
void guNormalize(float* x, float* y, float* z);
|
||||
void guOrtho(Mtx *m, float l, float r, float b, float t, float n, float f, float scale);
|
||||
|
||||
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*/
|
||||
|
||||
#endif
|
||||
@@ -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);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
#include "libultra/gu.h"
|
||||
|
||||
void guMtxIdent(Mtx *m) {
|
||||
float mf[4][4];
|
||||
guMtxIdentF(mf);
|
||||
guMtxF2L(mf, m);
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
+1
-1
Submodule tools/ppcdis updated: eca3f3015a...83260829c5
Reference in New Issue
Block a user