Implement/match LegoAnimationManager::FUN_100623a0 (#893)

This commit is contained in:
Christian Semmler 2024-05-09 15:33:48 -04:00 committed by GitHub
parent 001b46b2ab
commit 5629eb3c85
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 46 additions and 3 deletions

View file

@ -22,7 +22,7 @@ struct AnimInfo {
MxU8 m_unk0x0b; // 0x0b MxU8 m_unk0x0b; // 0x0b
MxU8 m_unk0x0c; // 0x0c MxU8 m_unk0x0c; // 0x0c
MxU8 m_unk0x0d; // 0x0d MxU8 m_unk0x0d; // 0x0d
MxU32 m_unk0x10[4]; // 0x10 float m_unk0x10[4]; // 0x10
MxU8 m_modelCount; // 0x20 MxU8 m_modelCount; // 0x20
MxU16 m_unk0x22; // 0x22 MxU16 m_unk0x22; // 0x22
ModelInfo* m_models; // 0x24 ModelInfo* m_models; // 0x24

View file

@ -138,7 +138,9 @@ class LegoAnimationManager : public MxCore {
); );
MxS8 GetCharacterIndex(const char* p_name); MxS8 GetCharacterIndex(const char* p_name);
MxBool FUN_100623a0(AnimInfo& p_info); MxBool FUN_100623a0(AnimInfo& p_info);
MxBool FUN_10062520(AnimInfo& p_info, const char*);
void FUN_10062580(AnimInfo& p_info); void FUN_10062580(AnimInfo& p_info);
MxBool FUN_10062650(Vector3&, float, LegoROI*);
MxBool FUN_10062710(AnimInfo& p_info); MxBool FUN_10062710(AnimInfo& p_info);
void FUN_10063aa0(); void FUN_10063aa0();
void FUN_10063d10(); void FUN_10063d10();

View file

@ -90,6 +90,7 @@ class LegoWorld : public LegoEntity {
MxCore* Find(const MxAtomId& p_atom, MxS32 p_entityId); MxCore* Find(const MxAtomId& p_atom, MxS32 p_entityId);
inline LegoCameraController* GetCamera() { return m_cameraController; } inline LegoCameraController* GetCamera() { return m_cameraController; }
inline LegoEntityList* GetEntityList() { return m_entityList; }
inline MxS32 GetScriptIndex() { return m_scriptIndex; } inline MxS32 GetScriptIndex() { return m_scriptIndex; }
inline MxCoreSet& GetUnknown0xd0() { return m_set0xd0; } inline MxCoreSet& GetUnknown0xd0() { return m_set0xd0; }
inline list<LegoROI*>& GetROIList() { return m_roiList; } inline list<LegoROI*>& GetROIList() { return m_roiList; }

View file

@ -1379,14 +1379,47 @@ MxS8 LegoAnimationManager::GetCharacterIndex(const char* p_name)
return -1; return -1;
} }
// STUB: LEGO1 0x100623a0 // FUNCTION: LEGO1 0x100623a0
// FUNCTION: BETA10 0x10043342 // FUNCTION: BETA10 0x10043342
MxBool LegoAnimationManager::FUN_100623a0(AnimInfo& p_info) 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; return FALSE;
} }
// STUB: LEGO1 0x10062520
// FUNCTION: BETA10 0x100434bf
MxBool LegoAnimationManager::FUN_10062520(AnimInfo& p_info, const char*)
{
return TRUE;
}
// STUB: LEGO1 0x10062580 // STUB: LEGO1 0x10062580
// FUNCTION: BETA10 0x10043552 // FUNCTION: BETA10 0x10043552
void LegoAnimationManager::FUN_10062580(AnimInfo& p_info) void LegoAnimationManager::FUN_10062580(AnimInfo& p_info)
@ -1394,6 +1427,13 @@ void LegoAnimationManager::FUN_10062580(AnimInfo& p_info)
// TODO // TODO
} }
// STUB: LEGO1 0x10062650
// FUNCTION: BETA10 0x100436e2
MxBool LegoAnimationManager::FUN_10062650(Vector3&, float, LegoROI*)
{
return TRUE;
}
// STUB: LEGO1 0x10062710 // STUB: LEGO1 0x10062710
// FUNCTION: BETA10 0x10043787 // FUNCTION: BETA10 0x10043787
MxBool LegoAnimationManager::FUN_10062710(AnimInfo& p_info) MxBool LegoAnimationManager::FUN_10062710(AnimInfo& p_info)