diff --git a/LEGO1/lego/legoomni/include/animstate.h b/LEGO1/lego/legoomni/include/animstate.h index 1cdf489c..b1b08fee 100644 --- a/LEGO1/lego/legoomni/include/animstate.h +++ b/LEGO1/lego/legoomni/include/animstate.h @@ -22,7 +22,7 @@ struct AnimInfo { MxU8 m_unk0x0b; // 0x0b MxU8 m_unk0x0c; // 0x0c MxU8 m_unk0x0d; // 0x0d - MxU32 m_unk0x10[4]; // 0x10 + float m_unk0x10[4]; // 0x10 MxU8 m_modelCount; // 0x20 MxU16 m_unk0x22; // 0x22 ModelInfo* m_models; // 0x24 diff --git a/LEGO1/lego/legoomni/include/legoanimationmanager.h b/LEGO1/lego/legoomni/include/legoanimationmanager.h index 9d2122ab..707af659 100644 --- a/LEGO1/lego/legoomni/include/legoanimationmanager.h +++ b/LEGO1/lego/legoomni/include/legoanimationmanager.h @@ -138,7 +138,9 @@ class LegoAnimationManager : public MxCore { ); MxS8 GetCharacterIndex(const char* p_name); MxBool FUN_100623a0(AnimInfo& p_info); + MxBool FUN_10062520(AnimInfo& p_info, const char*); void FUN_10062580(AnimInfo& p_info); + MxBool FUN_10062650(Vector3&, float, LegoROI*); MxBool FUN_10062710(AnimInfo& p_info); void FUN_10063aa0(); void FUN_10063d10(); diff --git a/LEGO1/lego/legoomni/include/legoworld.h b/LEGO1/lego/legoomni/include/legoworld.h index 782c9212..1c13b099 100644 --- a/LEGO1/lego/legoomni/include/legoworld.h +++ b/LEGO1/lego/legoomni/include/legoworld.h @@ -90,6 +90,7 @@ class LegoWorld : public LegoEntity { MxCore* Find(const MxAtomId& p_atom, MxS32 p_entityId); inline LegoCameraController* GetCamera() { return m_cameraController; } + inline LegoEntityList* GetEntityList() { return m_entityList; } inline MxS32 GetScriptIndex() { return m_scriptIndex; } inline MxCoreSet& GetUnknown0xd0() { return m_set0xd0; } inline list& GetROIList() { return m_roiList; } diff --git a/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp b/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp index 64004ef8..441711fa 100644 --- a/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp +++ b/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp @@ -1379,14 +1379,47 @@ MxS8 LegoAnimationManager::GetCharacterIndex(const char* p_name) return -1; } -// STUB: LEGO1 0x100623a0 +// FUNCTION: LEGO1 0x100623a0 // FUNCTION: BETA10 0x10043342 MxBool LegoAnimationManager::FUN_100623a0(AnimInfo& p_info) { - // TODO + LegoWorld* world = CurrentWorld(); + + if (world != NULL) { + LegoEntityList* entityList = world->GetEntityList(); + + if (entityList != NULL) { + Mx3DPointFloat vec(p_info.m_unk0x10[0], p_info.m_unk0x10[1], p_info.m_unk0x10[2]); + float und = p_info.m_unk0x10[3]; + + LegoEntityListCursor cursor(entityList); + LegoEntity* entity; + IslePathActor* actor = CurrentActor(); + + while (cursor.Next(entity)) { + if (entity != actor && entity->IsA("LegoPathActor")) { + LegoROI* roi = entity->GetROI(); + + if (roi->GetVisibility() && FUN_10062650(vec, und, roi)) { + if (!FUN_10062520(p_info, roi->GetName())) { + return TRUE; + } + } + } + } + } + } + return FALSE; } +// STUB: LEGO1 0x10062520 +// FUNCTION: BETA10 0x100434bf +MxBool LegoAnimationManager::FUN_10062520(AnimInfo& p_info, const char*) +{ + return TRUE; +} + // STUB: LEGO1 0x10062580 // FUNCTION: BETA10 0x10043552 void LegoAnimationManager::FUN_10062580(AnimInfo& p_info) @@ -1394,6 +1427,13 @@ void LegoAnimationManager::FUN_10062580(AnimInfo& p_info) // TODO } +// STUB: LEGO1 0x10062650 +// FUNCTION: BETA10 0x100436e2 +MxBool LegoAnimationManager::FUN_10062650(Vector3&, float, LegoROI*) +{ + return TRUE; +} + // STUB: LEGO1 0x10062710 // FUNCTION: BETA10 0x10043787 MxBool LegoAnimationManager::FUN_10062710(AnimInfo& p_info)