mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-25 17:34:05 +00:00
Improve match of LegoPathActor::FUN_1002edd0, reorder (#1332)
* Relocate annotation
* Improve match of `LegoBuildingManager::ScheduleAnimation`
* try fix
* Revert "try fix"
This reverts commit e8f5db6fec.
* Order isle
* Move annotation
This commit is contained in:
committed by
GitHub
parent
5c57b805de
commit
f95eedd0ce
@@ -118,6 +118,9 @@ public:
|
|||||||
|
|
||||||
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x10030900
|
||||||
|
MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10030910
|
// FUNCTION: LEGO1 0x10030910
|
||||||
// FUNCTION: BETA10 0x10035d70
|
// FUNCTION: BETA10 0x10035d70
|
||||||
const char* ClassName() const override // vtable+0x0c
|
const char* ClassName() const override // vtable+0x0c
|
||||||
@@ -135,16 +138,10 @@ public:
|
|||||||
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
|
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
|
||||||
void ReadyWorld() override; // vtable+0x50
|
void ReadyWorld() override; // vtable+0x50
|
||||||
void Add(MxCore* p_object) override; // vtable+0x58
|
void Add(MxCore* p_object) override; // vtable+0x58
|
||||||
|
void VTable0x60() override; // vtable+0x60
|
||||||
// FUNCTION: LEGO1 0x10030900
|
MxBool Escape() override; // vtable+0x64
|
||||||
MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c
|
void Enable(MxBool p_enable) override; // vtable+0x68
|
||||||
|
virtual void VTable0x6c(LegoPathActor* p_actor); // vtable+0x6c
|
||||||
// FUNCTION: LEGO1 0x10033170
|
|
||||||
void VTable0x60() override {} // vtable+60
|
|
||||||
|
|
||||||
MxBool Escape() override; // vtable+0x64
|
|
||||||
void Enable(MxBool p_enable) override; // vtable+0x68
|
|
||||||
virtual void VTable0x6c(LegoPathActor* p_actor); // vtable+0x6c
|
|
||||||
|
|
||||||
void SetDestLocation(LegoGameState::Area p_destLocation) { m_destLocation = p_destLocation; }
|
void SetDestLocation(LegoGameState::Area p_destLocation) { m_destLocation = p_destLocation; }
|
||||||
MxBool HasHelicopter() { return m_helicopter != NULL; }
|
MxBool HasHelicopter() { return m_helicopter != NULL; }
|
||||||
|
|||||||
@@ -198,6 +198,9 @@ protected:
|
|||||||
MxFloat m_unk0x150; // 0x150
|
MxFloat m_unk0x150; // 0x150
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x1002edd0
|
||||||
|
// LegoPathActor::FUN_1002edd0
|
||||||
|
|
||||||
// TEMPLATE: LEGO1 0x10018b70
|
// TEMPLATE: LEGO1 0x10018b70
|
||||||
// List<LegoBoundaryEdge>::~List<LegoBoundaryEdge>
|
// List<LegoBoundaryEdge>::~List<LegoBoundaryEdge>
|
||||||
|
|
||||||
|
|||||||
@@ -680,7 +680,11 @@ void LegoBuildingManager::ScheduleAnimation(LegoEntity* p_entity, MxLong p_lengt
|
|||||||
|
|
||||||
entry->m_entity = p_entity;
|
entry->m_entity = p_entity;
|
||||||
entry->m_roi = p_entity->GetROI();
|
entry->m_roi = p_entity->GetROI();
|
||||||
entry->m_time = Timer()->GetTime() + p_length + 1000;
|
|
||||||
|
MxLong time = Timer()->GetTime();
|
||||||
|
time += p_length;
|
||||||
|
entry->m_time = time + 1000;
|
||||||
|
|
||||||
entry->m_unk0x0c = entry->m_roi->GetWorldPosition()[1];
|
entry->m_unk0x0c = entry->m_roi->GetWorldPosition()[1];
|
||||||
entry->m_muted = p_haveSound == FALSE;
|
entry->m_muted = p_haveSound == FALSE;
|
||||||
FUN_100307b0(p_entity, -2);
|
FUN_100307b0(p_entity, -2);
|
||||||
|
|||||||
@@ -491,29 +491,6 @@ MxU32 LegoPathActor::VTable0x6c(
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1002ebe0
|
|
||||||
// FUNCTION: BETA10 0x100af35e
|
|
||||||
MxS32 LegoPathActor::VTable0x68(Vector3& p_v1, Vector3& p_v2, Vector3& p_v3)
|
|
||||||
{
|
|
||||||
Mx3DPointFloat v2(p_v2);
|
|
||||||
v2 -= p_v1;
|
|
||||||
|
|
||||||
float len = v2.LenSquared();
|
|
||||||
|
|
||||||
if (len <= 0.001) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
len = sqrt(len);
|
|
||||||
v2 /= len;
|
|
||||||
|
|
||||||
float radius = m_roi->GetWorldBoundingSphere().Radius();
|
|
||||||
list<LegoPathBoundary*> boundaries;
|
|
||||||
|
|
||||||
return FUN_1002edd0(boundaries, m_boundary, p_v1, v2, len, radius, p_v3, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1002edd0
|
|
||||||
inline MxU32 LegoPathActor::FUN_1002edd0(
|
inline MxU32 LegoPathActor::FUN_1002edd0(
|
||||||
list<LegoPathBoundary*>& p_boundaries,
|
list<LegoPathBoundary*>& p_boundaries,
|
||||||
LegoPathBoundary* p_boundary,
|
LegoPathBoundary* p_boundary,
|
||||||
@@ -527,41 +504,65 @@ inline MxU32 LegoPathActor::FUN_1002edd0(
|
|||||||
{
|
{
|
||||||
MxU32 result = VTable0x6c(p_boundary, p_v1, p_v2, p_f1, p_f2, p_v3);
|
MxU32 result = VTable0x6c(p_boundary, p_v1, p_v2, p_f1, p_f2, p_v3);
|
||||||
|
|
||||||
if (result == 0) {
|
if (result != 0) {
|
||||||
p_boundaries.push_back(p_boundary);
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
if (p_und >= 2) {
|
p_boundaries.push_back(p_boundary);
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
LegoS32 numEdges = p_boundary->GetNumEdges();
|
if (p_und >= 2) {
|
||||||
for (MxS32 i = 0; i < numEdges; i++) {
|
return 0;
|
||||||
LegoUnknown100db7f4* edge = ((LegoUnknown100db7f4*) p_boundary->GetEdges()[i]);
|
}
|
||||||
LegoPathBoundary* boundary = (LegoPathBoundary*) edge->OtherFace(p_boundary);
|
|
||||||
|
|
||||||
if (boundary != NULL) {
|
LegoS32 numEdges = p_boundary->GetNumEdges();
|
||||||
list<LegoPathBoundary*>::iterator it;
|
for (MxS32 i = 0; i < numEdges; i++) {
|
||||||
|
LegoUnknown100db7f4* edge = p_boundary->GetEdges()[i];
|
||||||
|
LegoPathBoundary* boundary = (LegoPathBoundary*) edge->OtherFace(p_boundary);
|
||||||
|
|
||||||
for (it = p_boundaries.begin(); it != p_boundaries.end(); it++) {
|
if (boundary != NULL) {
|
||||||
if ((*it) == boundary) {
|
list<LegoPathBoundary*>::const_iterator it;
|
||||||
break;
|
|
||||||
}
|
for (it = p_boundaries.begin(); !(it == p_boundaries.end()); it++) {
|
||||||
|
if ((*it) == boundary) {
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (it == p_boundaries.end()) {
|
if (it == p_boundaries.end()) {
|
||||||
result = FUN_1002edd0(p_boundaries, boundary, p_v1, p_v2, p_f1, p_f2, p_v3, p_und + 1);
|
result = FUN_1002edd0(p_boundaries, boundary, p_v1, p_v2, p_f1, p_f2, p_v3, p_und + 1);
|
||||||
|
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
return result;
|
return result;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
result = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x1002ebe0
|
||||||
|
// FUNCTION: BETA10 0x100af35e
|
||||||
|
MxS32 LegoPathActor::VTable0x68(Vector3& p_v1, Vector3& p_v2, Vector3& p_v3)
|
||||||
|
{
|
||||||
|
assert(m_boundary && m_roi);
|
||||||
|
|
||||||
|
Mx3DPointFloat v2(p_v2);
|
||||||
|
v2 -= p_v1;
|
||||||
|
|
||||||
|
float len = v2.LenSquared();
|
||||||
|
|
||||||
|
if (len <= 0.001) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
len = sqrt((double) len);
|
||||||
|
v2 /= len;
|
||||||
|
|
||||||
|
float radius = m_roi->GetWorldBoundingSphere().Radius();
|
||||||
|
list<LegoPathBoundary*> boundaries;
|
||||||
|
|
||||||
|
return FUN_1002edd0(boundaries, m_boundary, p_v1, v2, len, radius, p_v3, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1002f020
|
// FUNCTION: LEGO1 0x1002f020
|
||||||
|
|||||||
@@ -1186,6 +1186,12 @@ void Isle::CreateState()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x10033170
|
||||||
|
void Isle::VTable0x60()
|
||||||
|
{
|
||||||
|
// empty
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10033180
|
// FUNCTION: LEGO1 0x10033180
|
||||||
MxBool Isle::Escape()
|
MxBool Isle::Escape()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user