mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-24 08:41:16 +00:00
Match LegoExtraActor::FUN_1002aae0
This commit is contained in:
parent
944a210e39
commit
a96c072c92
@ -93,15 +93,15 @@ void LegoExtraActor::VTable0xa4(MxU8& p_und1, MxS32& p_und2)
|
||||
case 1:
|
||||
p_und1 = 1;
|
||||
p_und2 = 1;
|
||||
return;
|
||||
break;
|
||||
case 2:
|
||||
p_und1 = 0;
|
||||
p_und2 = 1;
|
||||
return;
|
||||
break;
|
||||
default:
|
||||
p_und1 = 1;
|
||||
p_und2 = rand() % p_und2 + 1;
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -110,20 +110,24 @@ MxResult LegoExtraActor::FUN_1002aae0()
|
||||
{
|
||||
LegoPathBoundary* oldEdge = m_boundary;
|
||||
Vector3 dir(m_unk0xec[0]);
|
||||
Vector3 right(m_unk0xec[1]);
|
||||
Vector3 up(m_unk0xec[2]);
|
||||
float scale = -1.0f;
|
||||
float* right = m_unk0xec[1];
|
||||
up.Mul(scale);
|
||||
((Vector3&) dir).EqualsCrossImpl(right, up.GetData());
|
||||
Vector3 unused(m_unk0xec[3]);
|
||||
|
||||
up.Mul(-1.0f);
|
||||
dir.EqualsCross(&right, &up);
|
||||
|
||||
if (m_boundary == m_destEdge->m_faceA) {
|
||||
m_boundary = (LegoPathBoundary*) m_destEdge->m_faceB;
|
||||
}
|
||||
else {
|
||||
m_boundary = (LegoPathBoundary*) m_destEdge->m_faceA;
|
||||
}
|
||||
|
||||
if (!m_boundary) {
|
||||
m_boundary = oldEdge;
|
||||
}
|
||||
|
||||
LegoPathActor::VTable0x9c();
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@ -9,6 +9,9 @@ struct UnknownMatrixType {
|
||||
float m_data[4][4];
|
||||
};
|
||||
|
||||
// Note: Many functions most likely take const references/pointers instead of non-const.
|
||||
// The class needs to undergo a very careful refactoring to fix that (no matches should break).
|
||||
|
||||
// VTABLE: LEGO1 0x100d4350
|
||||
// SIZE 0x08
|
||||
class Matrix4 {
|
||||
|
||||
@ -6,6 +6,9 @@
|
||||
#include <math.h>
|
||||
#include <memory.h>
|
||||
|
||||
// Note: Many functions most likely take const references/pointers instead of non-const.
|
||||
// The class needs to undergo a very careful refactoring to fix that (no matches should break).
|
||||
|
||||
// VTABLE: LEGO1 0x100d4288
|
||||
// SIZE 0x08
|
||||
class Vector2 {
|
||||
@ -130,7 +133,7 @@ class Vector2 {
|
||||
virtual void Mul(Vector2* p_other) { MulVectorImpl(p_other->m_data); } // vtable+0x60
|
||||
|
||||
// FUNCTION: LEGO1 0x10002230
|
||||
virtual void Mul(float& p_value) { MulScalarImpl(&p_value); } // vtable+0x5c
|
||||
virtual void Mul(const float& p_value) { MulScalarImpl((float*) &p_value); } // vtable+0x5c
|
||||
|
||||
// FUNCTION: LEGO1 0x10002240
|
||||
virtual void Div(float& p_value) { DivScalarImpl(&p_value); } // vtable+0x68
|
||||
|
||||
Loading…
Reference in New Issue
Block a user