mirror of
https://github.com/isledecomp/isle-portable.git
synced 2025-09-26 14:13:55 -04:00
Implement/match LegoPathBoundary::FUN_100586e0 and FUN_10057fe0 (#962)
This commit is contained in:
parent
a88546baad
commit
60b747d7b2
@ -83,8 +83,12 @@ public:
|
|||||||
MxResult FUN_1006b140(LegoROI* p_roi);
|
MxResult FUN_1006b140(LegoROI* p_roi);
|
||||||
const char* GetActionObjectName();
|
const char* GetActionObjectName();
|
||||||
|
|
||||||
|
inline void SetCurrentWorld(LegoWorld* p_currentWorld) { m_currentWorld = p_currentWorld; }
|
||||||
|
|
||||||
inline LegoAnim* GetAnimation() { return m_anim; }
|
inline LegoAnim* GetAnimation() { return m_anim; }
|
||||||
|
|
||||||
|
friend class LegoPathBoundary;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void Init();
|
void Init();
|
||||||
void Destroy(MxBool p_fromDestructor);
|
void Destroy(MxBool p_fromDestructor);
|
||||||
|
@ -131,6 +131,39 @@ private:
|
|||||||
// TEMPLATE: LEGO1 0x100573e0
|
// TEMPLATE: LEGO1 0x100573e0
|
||||||
// _Tree<LegoPathActor *,LegoPathActor *,set<LegoPathActor *,LegoPathActorSetCompare,allocator<LegoPathActor *> >::_Kfn,LegoPathActorSetCompare,allocator<LegoPathActor *> >::begin
|
// _Tree<LegoPathActor *,LegoPathActor *,set<LegoPathActor *,LegoPathActorSetCompare,allocator<LegoPathActor *> >::_Kfn,LegoPathActorSetCompare,allocator<LegoPathActor *> >::begin
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x100580c0
|
||||||
|
// _Tree<LegoAnimPresenter *,LegoAnimPresenter *,set<LegoAnimPresenter *,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::_Kfn,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::insert
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x10058330
|
||||||
|
// _Tree<LegoAnimPresenter *,LegoAnimPresenter *,set<LegoAnimPresenter *,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::_Kfn,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::iterator::_Dec
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x10058380
|
||||||
|
// _Tree<LegoAnimPresenter *,LegoAnimPresenter *,set<LegoAnimPresenter *,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::_Kfn,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::_Buynode
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x100583a0
|
||||||
|
// _Tree<LegoAnimPresenter *,LegoAnimPresenter *,set<LegoAnimPresenter *,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::_Kfn,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::_Insert
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x10058620
|
||||||
|
// _Tree<LegoAnimPresenter *,LegoAnimPresenter *,set<LegoAnimPresenter *,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::_Kfn,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::_Lrotate
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x10058680
|
||||||
|
// _Tree<LegoAnimPresenter *,LegoAnimPresenter *,set<LegoAnimPresenter *,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::_Kfn,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::_Rrotate
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x10058820
|
||||||
|
// _Tree<LegoAnimPresenter *,LegoAnimPresenter *,set<LegoAnimPresenter *,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::_Kfn,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::erase
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x100588e0
|
||||||
|
// _Tree<LegoAnimPresenter *,LegoAnimPresenter *,set<LegoAnimPresenter *,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::_Kfn,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::equal_range
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x10058950
|
||||||
|
// _Tree<LegoAnimPresenter *,LegoAnimPresenter *,set<LegoAnimPresenter *,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::_Kfn,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::_Lbound
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x10058980
|
||||||
|
// _Construct
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x100589a0
|
||||||
|
// _Distance
|
||||||
|
|
||||||
// GLOBAL: LEGO1 0x100f11a4
|
// GLOBAL: LEGO1 0x100f11a4
|
||||||
// _Tree<LegoPathActor *,LegoPathActor *,set<LegoPathActor *,LegoPathActorSetCompare,allocator<LegoPathActor *> >::_Kfn,LegoPathActorSetCompare,allocator<LegoPathActor *> >::_Nil
|
// _Tree<LegoPathActor *,LegoPathActor *,set<LegoPathActor *,LegoPathActorSetCompare,allocator<LegoPathActor *> >::_Kfn,LegoPathActorSetCompare,allocator<LegoPathActor *> >::_Nil
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include "decomp.h"
|
#include "decomp.h"
|
||||||
#include "geom/legounkown100db7f4.h"
|
#include "geom/legounkown100db7f4.h"
|
||||||
|
#include "legolocomotionanimpresenter.h"
|
||||||
#include "legopathactor.h"
|
#include "legopathactor.h"
|
||||||
#include "legopathstruct.h"
|
#include "legopathstruct.h"
|
||||||
|
|
||||||
@ -337,18 +338,47 @@ MxU32 LegoPathBoundary::Intersect(
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10057fe0
|
// FUNCTION: LEGO1 0x10057fe0
|
||||||
// FUNCTION: BETA10 0x100b2220
|
// FUNCTION: BETA10 0x100b2220
|
||||||
MxU32 LegoPathBoundary::FUN_10057fe0(LegoAnimPresenter* p_presenter)
|
MxU32 LegoPathBoundary::FUN_10057fe0(LegoAnimPresenter* p_presenter)
|
||||||
{
|
{
|
||||||
// TODO
|
Mx3DPointFloat unk0x30;
|
||||||
|
|
||||||
|
unk0x30 = m_unk0x30;
|
||||||
|
((Vector3&) unk0x30).Sub(&p_presenter->m_unk0xa8);
|
||||||
|
|
||||||
|
float len = unk0x30.LenSquared();
|
||||||
|
float local20 = p_presenter->m_unk0xa4 + m_unk0x44;
|
||||||
|
|
||||||
|
if (len > 0.001 && len > local20 * local20) {
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: This only seems to match if the type is not the same as the type of the
|
||||||
|
// key value of the set. Figure out which type the set (or parameter) actually uses.
|
||||||
|
// Also see call to .find in LegoPathController::FUN_10046050
|
||||||
|
m_presenters.insert(static_cast<LegoLocomotionAnimPresenter*>(p_presenter));
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x100586e0
|
// FUNCTION: LEGO1 0x100586e0
|
||||||
// FUNCTION: BETA10 0x100b22d1
|
// FUNCTION: BETA10 0x100b22d1
|
||||||
MxU32 LegoPathBoundary::FUN_100586e0(LegoAnimPresenter* p_presenter)
|
MxU32 LegoPathBoundary::FUN_100586e0(LegoAnimPresenter* p_presenter)
|
||||||
{
|
{
|
||||||
// TODO
|
if (p_presenter != NULL) {
|
||||||
|
// TODO: This only seems to match if the type is not the same as the type of the
|
||||||
|
// key value of the set. Figure out which type the set (or parameter) actually uses.
|
||||||
|
// Also see call to .find in LegoPathController::FUN_10046050
|
||||||
|
if (m_presenters.find(static_cast<LegoLocomotionAnimPresenter*>(p_presenter)) != m_presenters.end()) {
|
||||||
|
m_presenters.erase(static_cast<LegoLocomotionAnimPresenter*>(p_presenter));
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
for (LegoAnimPresenterSet::iterator it = m_presenters.begin(); it != m_presenters.end(); it++) {
|
||||||
|
(*it)->SetCurrentWorld(NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ protected:
|
|||||||
Mx4DPointFloat m_unk0x14; // 0x14
|
Mx4DPointFloat m_unk0x14; // 0x14
|
||||||
Mx4DPointFloat* m_edgeNormals; // 0x2c
|
Mx4DPointFloat* m_edgeNormals; // 0x2c
|
||||||
Mx3DPointFloat m_unk0x30; // 0x30
|
Mx3DPointFloat m_unk0x30; // 0x30
|
||||||
LegoU32 m_unk0x44; // 0x44
|
float m_unk0x44; // 0x44
|
||||||
LegoU8 m_unk0x48; // 0x48
|
LegoU8 m_unk0x48; // 0x48
|
||||||
PathWithTrigger* m_pathTrigger; // 0x4c
|
PathWithTrigger* m_pathTrigger; // 0x4c
|
||||||
Mx3DPointFloat* m_unk0x50; // 0x50
|
Mx3DPointFloat* m_unk0x50; // 0x50
|
||||||
|
Loading…
x
Reference in New Issue
Block a user