forked from Ports/perfect_dark
port: make matrices work with GBI_FLOATS
add GBI_FLOATS=1 to DEFINES to enable it not enabling by default yet because not sure if it'll break anything
This commit is contained in:
1 parent
85e914c129
commit
2b27c2dc6a
3 files changed
+14
-1
No files matched your search
+3
-1
@@ -366,6 +366,8 @@ void mtxF2L(Mtxf *src, Mtxf *dst)
|
||||
dst->l[3][2] = src30 << 16 | (src31 & 0xffff);
|
||||
dst->l[3][3] = src32 << 16 | (src33 & 0xffff);
|
||||
#else
|
||||
bcopy(src, dst, sizeof(*dst));
|
||||
if (src != dst) {
|
||||
bcopy(src, dst, sizeof(*dst));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -2,6 +2,11 @@
|
||||
|
||||
void guMtxF2L(f32 mf[4][4], Mtx *m)
|
||||
{
|
||||
#ifdef GBI_FLOATS
|
||||
if ((Mtx *)mf != m) {
|
||||
bcopy(mf, m, sizeof(*m));
|
||||
}
|
||||
#else
|
||||
int i, j;
|
||||
int e1, e2;
|
||||
int *ai, *af;
|
||||
@@ -18,6 +23,7 @@ void guMtxF2L(f32 mf[4][4], Mtx *m)
|
||||
*(af++) = ((e1 << 16) & 0xffff0000) | (e2 & 0xffff);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void guMtxIdentF(float mf[4][4])
|
||||
|
||||
Reference in new issue
Block a user