Update C headers to be C++
This commit is contained in:
@@ -1,39 +1,8 @@
|
||||
# inline_n.h
|
||||
|
||||
This header is directly lifted from psx-redux and not my creation. I will try to give it my personal touch but the original implementation will be always from [pcsx-redux](https://github.com/grumpycoders/pcsx-redux) and the **grumpycoders**.
|
||||
|
||||
```c++
|
||||
MATRIX *HiRotMatrix(VECTOR *r, MATRIX *m) {
|
||||
# GTEMAC.H
|
||||
Great for reference! It is under `psyq\include\GTEMAC.H`
|
||||
|
||||
short s[3],c[3];
|
||||
MATRIX tm[3];
|
||||
|
||||
s[0] = hisin(r->vx); s[1] = hisin(r->vy); s[2] = hisin(r->vz);
|
||||
c[0] = hicos(r->vx); c[1] = hicos(r->vy); c[2] = hicos(r->vz);
|
||||
|
||||
// mX
|
||||
m->m[0][0] = ONE; m->m[0][1] = 0; m->m[0][2] = 0;
|
||||
m->m[1][0] = 0; m->m[1][1] = c[0]; m->m[1][2] = -s[0];
|
||||
m->m[2][0] = 0; m->m[2][1] = s[0]; m->m[2][2] = c[0];
|
||||
|
||||
// mY
|
||||
tm[0].m[0][0] = c[1]; tm[0].m[0][1] = 0; tm[0].m[0][2] = s[1];
|
||||
tm[0].m[1][0] = 0; tm[0].m[1][1] = ONE; tm[0].m[1][2] = 0;
|
||||
tm[0].m[2][0] = -s[1]; tm[0].m[2][1] = 0; tm[0].m[2][2] = c[1];
|
||||
|
||||
// mZ
|
||||
tm[1].m[0][0] = c[2]; tm[1].m[0][1] = -s[2]; tm[1].m[0][2] = 0;
|
||||
tm[1].m[1][0] = s[2]; tm[1].m[1][1] = c[2]; tm[1].m[1][2] = 0;
|
||||
tm[1].m[2][0] = 0; tm[1].m[2][1] = 0; tm[1].m[2][2] = ONE;
|
||||
|
||||
PushMatrix();
|
||||
|
||||
MulMatrix0( m, &tm[0], &tm[2] );
|
||||
MulMatrix0( &tm[2], &tm[1], m );
|
||||
|
||||
PopMatrix();
|
||||
|
||||
return m;
|
||||
|
||||
}
|
||||
```
|
||||
# LIBGTE.H
|
||||
Not so helpful but can be found under `psyq\include\LIBGTE.H`
|
||||
Reference in New Issue
Block a user