Prepare mult_matrix function
This commit is contained in:
@@ -55,6 +55,38 @@ namespace JabyEngine {
|
||||
__asm__ volatile("ctc2 $14, $7" :: "r"(&matrix) : "$12", "$13", "$14");
|
||||
}
|
||||
|
||||
/*
|
||||
MulMatrix0
|
||||
|
||||
m0: first input
|
||||
m1: second input
|
||||
result: result of multiplication
|
||||
returns: result
|
||||
|
||||
Multiplies two matrices m0 and m1.
|
||||
The function destroys the constant rotation matrix
|
||||
*/
|
||||
static MATRIX& mult_matrix(const MATRIX& m0, const MATRIX& m1, MATRIX& result) {
|
||||
/*
|
||||
Jaby: Somehow this code creates stack usage.... Investigate!!
|
||||
*/
|
||||
set_rot_matrix(m0);
|
||||
|
||||
ldclmv(m1, 0);
|
||||
rtir();
|
||||
stclmv(result, 0);
|
||||
|
||||
ldclmv(m1, 1);
|
||||
rtir();
|
||||
stclmv(result, 1);
|
||||
|
||||
ldclmv(m1, 2);
|
||||
rtir();
|
||||
stclmv(result, 2);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
SetGeomOffset(ofx,ofy)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user