mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-24 08:54:15 +00:00
Match LegoActor and LegoPathActor in BETA10 (#1524)
* Match `LegoActor` in BETA10 * Cleanup --------- Co-authored-by: jonschz <jonschz@users.noreply.github.com>
This commit is contained in:
@@ -133,7 +133,6 @@ Act2Actor::Act2Actor()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10018940
|
||||
// FUNCTION: BETA10 0x1003d65f
|
||||
void Act2Actor::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2)
|
||||
{
|
||||
LegoAnimActor::SetROI(p_roi, p_bool1, p_bool2);
|
||||
|
||||
@@ -23,6 +23,7 @@ LegoActor::LegoActor()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1002d320
|
||||
// FUNCTION: BETA10 0x1003d08b
|
||||
LegoActor::~LegoActor()
|
||||
{
|
||||
if (m_sound) {
|
||||
@@ -31,6 +32,7 @@ LegoActor::~LegoActor()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1002d390
|
||||
// FUNCTION: BETA10 0x1003d10b
|
||||
void LegoActor::ParseAction(char* p_extra)
|
||||
{
|
||||
MxFloat speed = 0.0F;
|
||||
@@ -90,6 +92,8 @@ void LegoActor::ParseAction(char* p_extra)
|
||||
up[2] = atof(token);
|
||||
}
|
||||
|
||||
assert(token);
|
||||
|
||||
SetWorldTransform(location, direction, up);
|
||||
}
|
||||
else {
|
||||
@@ -122,6 +126,7 @@ const char* LegoActor::GetActorName(MxU8 p_id)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1002d670
|
||||
// FUNCTION: BETA10 0x1003d65f
|
||||
void LegoActor::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2)
|
||||
{
|
||||
if (p_roi) {
|
||||
|
||||
@@ -68,6 +68,7 @@ LegoPathActor::~LegoPathActor()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1002d8d0
|
||||
// FUNCTION: BETA10 0x100ae8cd
|
||||
MxResult LegoPathActor::VTable0x80(const Vector3& p_point1, Vector3& p_point2, Vector3& p_point3, Vector3& p_point4)
|
||||
{
|
||||
Mx3DPointFloat p1, p2, p3;
|
||||
@@ -84,8 +85,10 @@ MxResult LegoPathActor::VTable0x80(const Vector3& p_point1, Vector3& p_point2, V
|
||||
m_BADuration /= 0.001;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
return FAILURE;
|
||||
else {
|
||||
MxTrace("Warning: m_BADuration = %g, roi = %s\n", m_BADuration, m_roi->GetName());
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1002d9c0
|
||||
@@ -167,17 +170,22 @@ MxResult LegoPathActor::VTable0x88(
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1002de10
|
||||
// FUNCTION: BETA10 0x100aee61
|
||||
MxResult LegoPathActor::VTable0x84(
|
||||
LegoPathBoundary* p_boundary,
|
||||
float p_time,
|
||||
Vector3& p_p1,
|
||||
Vector3& p_p4,
|
||||
LegoOrientedEdge& p_destEdge,
|
||||
LegoOrientedEdge* p_destEdge,
|
||||
float p_destScale
|
||||
)
|
||||
{
|
||||
Vector3* v3 = p_destEdge.CWVertex(*p_boundary);
|
||||
Vector3* v4 = p_destEdge.CCWVertex(*p_boundary);
|
||||
assert(p_destEdge);
|
||||
|
||||
Vector3* v3 = p_destEdge->CWVertex(*p_boundary);
|
||||
Vector3* v4 = p_destEdge->CCWVertex(*p_boundary);
|
||||
|
||||
assert(v3 && v4);
|
||||
|
||||
Mx3DPointFloat p2, p3, p5;
|
||||
|
||||
@@ -187,12 +195,12 @@ MxResult LegoPathActor::VTable0x84(
|
||||
p2 += *v3;
|
||||
|
||||
m_boundary = p_boundary;
|
||||
m_destEdge = &p_destEdge;
|
||||
m_destEdge = p_destEdge;
|
||||
m_unk0xe4 = p_destScale;
|
||||
m_unk0x7c = 0;
|
||||
m_lastTime = p_time;
|
||||
m_actorTime = p_time;
|
||||
p_destEdge.GetFaceNormal(*p_boundary, p3);
|
||||
p_destEdge->GetFaceNormal(*p_boundary, p3);
|
||||
|
||||
MxMatrix matrix;
|
||||
Vector3 pos(matrix[3]);
|
||||
@@ -217,6 +225,7 @@ MxResult LegoPathActor::VTable0x84(
|
||||
p5.Unitize();
|
||||
|
||||
if (VTable0x80(p_p1, p_p4, p2, p5) == SUCCESS) {
|
||||
MxTrace("Warning: m_BADuration = %g, roi = %s\n", m_BADuration, m_roi->GetName());
|
||||
m_boundary->AddActor(this);
|
||||
}
|
||||
else {
|
||||
@@ -379,6 +388,7 @@ MxS32 LegoPathActor::VTable0x8c(float p_time, Matrix4& p_transform)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1002e740
|
||||
// FUNCTION: BETA10 0x100b0f70
|
||||
void LegoPathActor::VTable0x74(Matrix4& p_transform)
|
||||
{
|
||||
if (m_userNavFlag) {
|
||||
|
||||
@@ -298,7 +298,7 @@ MxResult LegoPathController::PlaceActor(
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
if (p_actor->VTable0x84(boundary, time, p_position, p_direction, *edge, 0.5f) == SUCCESS) {
|
||||
if (p_actor->VTable0x84(boundary, time, p_position, p_direction, edge, 0.5f) == SUCCESS) {
|
||||
p_actor->SetController(this);
|
||||
m_actors.insert(p_actor);
|
||||
return SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user