2017-03-20 20:51:11 +00:00
|
|
|
#include "RSP.h"
|
2018-05-31 07:59:35 +00:00
|
|
|
#include "GBI.h"
|
2017-03-20 20:51:11 +00:00
|
|
|
|
|
|
|
void RSP_LoadMatrix( f32 mtx[4][4], u32 address )
|
|
|
|
{
|
2018-06-09 10:29:01 +00:00
|
|
|
s32u32 value;
|
|
|
|
|
2017-03-20 20:51:11 +00:00
|
|
|
struct _N64Matrix
|
|
|
|
{
|
|
|
|
s16 integer[4][4];
|
|
|
|
u16 fraction[4][4];
|
|
|
|
} *n64Mat = (struct _N64Matrix *)&RDRAM[address];
|
|
|
|
|
|
|
|
int i, j;
|
|
|
|
|
|
|
|
for (i = 0; i < 4; i++)
|
|
|
|
for (j = 0; j < 4; j++)
|
2018-06-09 10:29:01 +00:00
|
|
|
{
|
|
|
|
value.s = (s32)n64Mat->integer[i][j^1] << 16;
|
|
|
|
value.u += n64Mat->fraction[i][j^1];
|
|
|
|
mtx[i][j] = _FIXED2FLOAT(value.s,16);
|
|
|
|
}
|
2017-03-20 20:51:11 +00:00
|
|
|
}
|