Clear visibility unknowns in animation presenters

This commit is contained in:
Florian Kaiser 2026-01-11 09:13:58 +01:00 committed by Fabian Neundorf
parent 79edd0fa4f
commit 176910157d
8 changed files with 21 additions and 21 deletions

View File

@ -317,7 +317,7 @@ class LegoHideAnimPresenter : public LegoLoopingAnimPresenter {
void EndAction() override; // vtable+0x40 void EndAction() override; // vtable+0x40
void PutFrame() override; // vtable+0x6c void PutFrame() override; // vtable+0x6c
void FUN_1006db40(LegoTime p_time); void ApplyVisibility(LegoTime p_time);
// SYNTHETIC: LEGO1 0x1006d9d0 // SYNTHETIC: LEGO1 0x1006d9d0
// LegoHideAnimPresenter::`scalar deleting destructor' // LegoHideAnimPresenter::`scalar deleting destructor'
@ -325,7 +325,7 @@ class LegoHideAnimPresenter : public LegoLoopingAnimPresenter {
private: private:
void Init(); void Init();
void Destroy(MxBool p_fromDestructor); void Destroy(MxBool p_fromDestructor);
void FUN_1006db60(LegoTreeNode* p_node, LegoTime p_time); void ApplyVisibility(LegoTreeNode* p_node, LegoTime p_time);
void AssignIndiciesWithMap(); void AssignIndiciesWithMap();
void BuildMap(LegoHideAnimStructMap& p_map, LegoTreeNode* p_node); void BuildMap(LegoHideAnimStructMap& p_map, LegoTreeNode* p_node);
void CheckedAdd( void CheckedAdd(

View File

@ -70,7 +70,7 @@ void Doors::Animate(float p_time)
assert(m_ltDoor && m_rtDoor); assert(m_ltDoor && m_rtDoor);
// TODO: Match // TODO: Match
m_roi->SetVisibility(m_boundary->GetFlag0x10()); m_roi->SetVisibility(m_boundary->GetVisibility());
switch (m_state) { switch (m_state) {
case e_none: case e_none:

View File

@ -109,7 +109,7 @@ MxResult LegoAnimActor::AnimateWithTransform(float p_time, Matrix4& p_transform)
LegoROI** roiMap = m_animMaps[m_curAnim]->m_roiMap; LegoROI** roiMap = m_animMaps[m_curAnim]->m_roiMap;
MxU32 numROIs = m_animMaps[m_curAnim]->m_numROIs; MxU32 numROIs = m_animMaps[m_curAnim]->m_numROIs;
if (!m_boundary->GetFlag0x10()) { if (!m_boundary->GetVisibility()) {
MxU32 i; MxU32 i;
m_roi->SetVisibility(FALSE); m_roi->SetVisibility(FALSE);

View File

@ -68,7 +68,7 @@ MxBool LegoPathStruct::HandleTrigger(LegoPathActor* p_actor, MxBool p_direction,
case c_h: { case c_h: {
LegoHideAnimPresenter* presenter = m_world->GetHideAnimPresenter(); LegoHideAnimPresenter* presenter = m_world->GetHideAnimPresenter();
if (presenter != NULL) { if (presenter != NULL) {
presenter->FUN_1006db40(p_data * 100); presenter->ApplyVisibility(p_data * 100);
} }
break; break;
} }

View File

@ -117,7 +117,7 @@ void CarRace::ReadyWorld()
{ {
assert(m_hideAnim); assert(m_hideAnim);
LegoWorld::ReadyWorld(); LegoWorld::ReadyWorld();
m_hideAnim->FUN_1006db40(0); m_hideAnim->ApplyVisibility(0);
MxDSAction action; MxDSAction action;
action.SetAtomId(*g_jukeboxScript); action.SetAtomId(*g_jukeboxScript);

View File

@ -81,7 +81,7 @@ void JetskiRace::ReadyWorld()
{ {
assert(m_hideAnim); assert(m_hideAnim);
LegoWorld::ReadyWorld(); LegoWorld::ReadyWorld();
m_hideAnim->FUN_1006db40(0); m_hideAnim->ApplyVisibility(0);
MxDSAction action; MxDSAction action;
action.SetAtomId(*g_jukeboxScript); action.SetAtomId(*g_jukeboxScript);
@ -213,7 +213,7 @@ MxLong JetskiRace::HandlePathStruct(LegoPathStructNotificationParam& p_param)
result = 1; result = 1;
} }
else if (m_playerLastPathStruct == 0xf) { else if (m_playerLastPathStruct == 0xf) {
m_hideAnim->FUN_1006db40(m_playerLaps * 200 + 100); m_hideAnim->ApplyVisibility(m_playerLaps * 200 + 100);
result = 1; result = 1;
} }

View File

@ -1535,20 +1535,20 @@ void LegoHideAnimPresenter::StartingTickle()
if (m_currentTickleState == e_streaming) { if (m_currentTickleState == e_streaming) {
AssignIndiciesWithMap(); AssignIndiciesWithMap();
FUN_1006db40(0); ApplyVisibility(0);
} }
} }
// FUNCTION: LEGO1 0x1006db40 // FUNCTION: LEGO1 0x1006db40
// FUNCTION: BETA10 0x100531ab // FUNCTION: BETA10 0x100531ab
void LegoHideAnimPresenter::FUN_1006db40(LegoTime p_time) void LegoHideAnimPresenter::ApplyVisibility(LegoTime p_time)
{ {
FUN_1006db60(m_anim->GetRoot(), p_time); ApplyVisibility(m_anim->GetRoot(), p_time);
} }
// FUNCTION: LEGO1 0x1006db60 // FUNCTION: LEGO1 0x1006db60
// FUNCTION: BETA10 0x100531de // FUNCTION: BETA10 0x100531de
void LegoHideAnimPresenter::FUN_1006db60(LegoTreeNode* p_node, LegoTime p_time) void LegoHideAnimPresenter::ApplyVisibility(LegoTreeNode* p_node, LegoTime p_time)
{ {
LegoAnimNodeData* data = (LegoAnimNodeData*) p_node->GetData(); LegoAnimNodeData* data = (LegoAnimNodeData*) p_node->GetData();
MxBool newB = FALSE; MxBool newB = FALSE;
@ -1569,13 +1569,13 @@ void LegoHideAnimPresenter::FUN_1006db60(LegoTreeNode* p_node, LegoTime p_time)
if (boundary != NULL) { if (boundary != NULL) {
newB = data->GetVisibility(p_time); newB = data->GetVisibility(p_time);
previousB = boundary->GetFlag0x10(); previousB = boundary->GetVisibility();
boundary->SetFlag0x10(newB); boundary->SetVisibility(newB);
} }
} }
for (MxS32 i = 0; i < p_node->GetNumChildren(); i++) { for (MxS32 i = 0; i < p_node->GetNumChildren(); i++) {
FUN_1006db60(p_node->GetChild(i), p_time); ApplyVisibility(p_node->GetChild(i), p_time);
} }
} }

View File

@ -37,7 +37,7 @@ class LegoWEGEdge : public LegoWEEdge {
c_bit1 = 0x01, c_bit1 = 0x01,
c_bit2 = 0x02, c_bit2 = 0x02,
c_bit3 = 0x04, c_bit3 = 0x04,
c_bit5 = 0x10 c_visible = 0x10
}; };
LegoWEGEdge(); LegoWEGEdge();
@ -46,9 +46,9 @@ class LegoWEGEdge : public LegoWEEdge {
LegoS32 LinkEdgesAndFaces() override; // vtable+0x04 LegoS32 LinkEdgesAndFaces() override; // vtable+0x04
// FUNCTION: BETA10 0x100270c0 // FUNCTION: BETA10 0x100270c0
LegoU32 GetFlag0x10() LegoU32 GetVisibility()
{ {
if (m_flags & c_bit5) { if (m_flags & c_visible) {
return FALSE; return FALSE;
} }
else { else {
@ -67,13 +67,13 @@ class LegoWEGEdge : public LegoWEEdge {
const LegoChar* GetName() { return m_name; } const LegoChar* GetName() { return m_name; }
// FUNCTION: BETA10 0x1005d5f0 // FUNCTION: BETA10 0x1005d5f0
void SetFlag0x10(LegoU32 p_disable) void SetVisibility(LegoU32 p_disable)
{ {
if (p_disable) { if (p_disable) {
m_flags &= ~c_bit5; m_flags &= ~c_visible;
} }
else { else {
m_flags |= c_bit5; m_flags |= c_visible;
} }
} }