Implement/match LegoAnimationManager::FUN_10062710 (#897)

This commit is contained in:
Christian Semmler 2024-05-09 16:32:06 -04:00 committed by GitHub
parent 556cbdaab3
commit 172db7b5d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 22 additions and 2 deletions

View file

@ -16,6 +16,8 @@ class MxVariable;
class MxVariableTable;
class MxString;
extern const char* g_actorNames[7];
// SIZE 0x08
struct ColorStringStruct {
const char* m_targetName; // 0x00
@ -164,6 +166,10 @@ class LegoGameState {
void Init();
inline MxU8 GetActorId() { return m_actorId; }
// FUNCTION: BETA10 0x1004a2d0
inline const char* GetActorName() { return g_actorNames[GetActorId()]; }
inline Act GetCurrentAct() { return m_currentAct; }
inline Act GetLoadedAct() { return m_loadedAct; }
inline Area GetCurrentArea() { return m_currentArea; }

View file

@ -1492,11 +1492,25 @@ MxBool LegoAnimationManager::FUN_10062650(Vector3& p_position, float p_und, Lego
return FALSE;
}
// STUB: LEGO1 0x10062710
// FUNCTION: LEGO1 0x10062710
// FUNCTION: BETA10 0x10043787
MxBool LegoAnimationManager::FUN_10062710(AnimInfo& p_info)
{
// TODO
MxU8 und = 0;
MxU8 actorId = GameState()->GetActorId();
if (actorId <= 5) {
und = g_unk0x100d8b28[actorId];
}
if (!(und & p_info.m_unk0x0c)) {
return TRUE;
}
if (ModelExists(p_info, GameState()->GetActorName())) {
return TRUE;
}
return FALSE;
}