diff --git a/LEGO1/lego/legoomni/include/legopathactor.h b/LEGO1/lego/legoomni/include/legopathactor.h index 3002ccfe..6566c6fb 100644 --- a/LEGO1/lego/legoomni/include/legopathactor.h +++ b/LEGO1/lego/legoomni/include/legopathactor.h @@ -51,9 +51,11 @@ class LegoPathActor : public LegoActor { virtual void VTable0x74(Matrix4& p_transform); // vtable+0x74 // FUNCTION: LEGO1 0x10002d20 + // FUNCTION: BETA10 0x1000f500 virtual void SetUserNavFlag(MxBool p_userNavFlag) { m_userNavFlag = p_userNavFlag; } // vtable+0x78 // FUNCTION: LEGO1 0x10002d30 + // FUNCTION: BETA10 0x1000f530 virtual MxBool GetUserNavFlag() { return m_userNavFlag; } // vtable+0x7c virtual MxResult VTable0x80( @@ -67,7 +69,7 @@ class LegoPathActor : public LegoActor { float p_time, Vector3& p_p1, Vector3& p_p4, - LegoOrientedEdge& p_destEdge, + LegoOrientedEdge* p_destEdge, float p_destScale ); // vtable+0x84 virtual MxResult VTable0x88( @@ -81,9 +83,11 @@ class LegoPathActor : public LegoActor { virtual MxS32 VTable0x8c(float p_time, Matrix4& p_transform); // vtable+0x8c // FUNCTION: LEGO1 0x10002d40 + // FUNCTION: BETA10 0x1000f560 virtual MxU32 VTable0x90(float, Matrix4&) { return FALSE; } // vtable+0x90 // FUNCTION: LEGO1 0x10002d50 + // FUNCTION: BETA10 0x1000f800 virtual MxResult HitActor(LegoPathActor*, MxBool) { return 0; } // vtable+0x94 virtual void SwitchBoundary( @@ -94,30 +98,38 @@ class LegoPathActor : public LegoActor { virtual MxResult VTable0x9c(); // vtable+0x9c // FUNCTION: LEGO1 0x10002d60 + // FUNCTION: BETA10 0x1000f820 virtual MxS32 VTable0xa0() { return 0; } // vtable+0xa0 virtual void VTable0xa4(MxBool& p_und1, MxS32& p_und2); // vtable+0xa4 virtual void VTable0xa8(); // vtable+0xa8 // FUNCTION: LEGO1 0x10002d70 + // FUNCTION: BETA10 0x1000f580 virtual void SetMaxLinearVel(MxFloat p_maxLinearVel) { m_maxLinearVel = p_maxLinearVel; } // vtable+0xac // FUNCTION: LEGO1 0x10002d80 + // FUNCTION: BETA10 0x1000f5b0 virtual MxFloat GetMaxLinearVel() { return m_maxLinearVel; } // vtable+0xb0 // FUNCTION: LEGO1 0x10002d90 + // FUNCTION: BETA10 0x1000f5e0 virtual MxFloat VTable0xb4() { return m_unk0x140; } // vtable+0xb4 // FUNCTION: LEGO1 0x10002da0 + // FUNCTION: BETA10 0x1000f610 virtual MxFloat VTable0xb8() { return m_unk0x144; } // vtable+0xb8 // FUNCTION: LEGO1 0x10002db0 + // FUNCTION: BETA10 0x1000f640 virtual void VTable0xbc(MxFloat p_unk0x140) { m_unk0x140 = p_unk0x140; } // vtable+0xbc // FUNCTION: LEGO1 0x10002dc0 + // FUNCTION: BETA10 0x1000f670 virtual void VTable0xc0(MxFloat p_unk0x144) { m_unk0x144 = p_unk0x144; } // vtable+0xc0 // FUNCTION: LEGO1 0x10002dd0 + // FUNCTION: BETA10 0x1000f6a0 virtual void VTable0xc4() {} // vtable+0xc4 // FUNCTION: LEGO1 0x10002de0 @@ -132,6 +144,7 @@ class LegoPathActor : public LegoActor { } // FUNCTION: LEGO1 0x1000c440 + // FUNCTION: BETA10 0x100124c0 MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, LegoPathActor::ClassName()) || LegoActor::IsA(p_name); @@ -161,6 +174,7 @@ class LegoPathActor : public LegoActor { void PlaceActor(LegoNamedPlane& p_namedPlane); // SYNTHETIC: LEGO1 0x1002d800 + // SYNTHETIC: BETA10 0x100b04d0 // LegoPathActor::`scalar deleting destructor' protected: diff --git a/LEGO1/lego/legoomni/src/paths/legopathactor.cpp b/LEGO1/lego/legoomni/src/paths/legopathactor.cpp index c360794f..d366bfbc 100644 --- a/LEGO1/lego/legoomni/src/paths/legopathactor.cpp +++ b/LEGO1/lego/legoomni/src/paths/legopathactor.cpp @@ -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) { diff --git a/LEGO1/lego/legoomni/src/paths/legopathcontroller.cpp b/LEGO1/lego/legoomni/src/paths/legopathcontroller.cpp index 0f6ee835..4f84883a 100644 --- a/LEGO1/lego/legoomni/src/paths/legopathcontroller.cpp +++ b/LEGO1/lego/legoomni/src/paths/legopathcontroller.cpp @@ -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;