mirror of
https://github.com/isledecomp/isle-portable.git
synced 2025-09-22 11:31:57 -04:00
Match FUN_1006b140()
and related functions (#1623)
* Match on BETA10 * Possible improvement on Matrix4::Swap * Document entropy build result * Comments at at Matrix4::Invert --------- Co-authored-by: jonschz <jonschz@users.noreply.github.com>
This commit is contained in:
parent
657720c825
commit
40c1a40d2b
@ -92,7 +92,11 @@ public:
|
||||
const char* GetActionObjectName();
|
||||
|
||||
void SetCurrentWorld(LegoWorld* p_currentWorld) { m_currentWorld = p_currentWorld; }
|
||||
|
||||
// FUNCTION: BETA10 0x1005aad0
|
||||
void SetUnknown0x0cTo1() { m_unk0x9c = 1; }
|
||||
|
||||
// FUNCTION: BETA10 0x1005ab00
|
||||
void SetUnknown0xa0(Matrix4* p_unk0xa0) { m_unk0xa0 = p_unk0xa0; }
|
||||
|
||||
LegoAnim* GetAnimation() { return m_anim; }
|
||||
|
@ -703,6 +703,9 @@ MxResult LegoAnimPresenter::FUN_1006b140(LegoROI* p_roi)
|
||||
if (p_roi == NULL) {
|
||||
return FAILURE;
|
||||
}
|
||||
#ifdef BETA10
|
||||
MxMatrix unused_matrix;
|
||||
#endif
|
||||
|
||||
Matrix4* mn = new MxMatrix();
|
||||
assert(mn);
|
||||
|
@ -290,6 +290,8 @@ void Matrix4::RotateZ(const float& p_angle)
|
||||
// FUNCTION: BETA10 0x1005a590
|
||||
int Matrix4::Invert(Matrix4& p_mat)
|
||||
{
|
||||
// Inlined at LEGO1 0x1006b2d3
|
||||
|
||||
float copyData[4][4];
|
||||
Matrix4 copy(copyData);
|
||||
copy = *this;
|
||||
@ -312,6 +314,7 @@ int Matrix4::Invert(Matrix4& p_mat)
|
||||
}
|
||||
|
||||
if (copy[i][i] < 0.001f && copy[i][i] > -0.001f) {
|
||||
// FAILURE from mxtypes.h
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -349,14 +352,19 @@ int Matrix4::Invert(Matrix4& p_mat)
|
||||
}
|
||||
}
|
||||
|
||||
// SUCCESS from mxtypes.h
|
||||
return 0;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006b500
|
||||
// FUNCTION: BETA10 0x1005aa20
|
||||
void Matrix4::Swap(int p_d1, int p_d2)
|
||||
{
|
||||
for (int i = 0; i < 4; i++) {
|
||||
float e = m_data[p_d1][i];
|
||||
// This function is affected by entropy even in debug builds
|
||||
int i;
|
||||
float e;
|
||||
for (i = 0; i < 4; i++) {
|
||||
e = m_data[p_d1][i];
|
||||
m_data[p_d1][i] = m_data[p_d2][i];
|
||||
m_data[p_d2][i] = e;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user