mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-20 23:01:16 +00:00
Clear visibility unknowns in animation presenters
This commit is contained in:
parent
79edd0fa4f
commit
176910157d
@ -317,7 +317,7 @@ class LegoHideAnimPresenter : public LegoLoopingAnimPresenter {
|
||||
void EndAction() override; // vtable+0x40
|
||||
void PutFrame() override; // vtable+0x6c
|
||||
|
||||
void FUN_1006db40(LegoTime p_time);
|
||||
void ApplyVisibility(LegoTime p_time);
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1006d9d0
|
||||
// LegoHideAnimPresenter::`scalar deleting destructor'
|
||||
@ -325,7 +325,7 @@ class LegoHideAnimPresenter : public LegoLoopingAnimPresenter {
|
||||
private:
|
||||
void Init();
|
||||
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 BuildMap(LegoHideAnimStructMap& p_map, LegoTreeNode* p_node);
|
||||
void CheckedAdd(
|
||||
|
||||
@ -70,7 +70,7 @@ void Doors::Animate(float p_time)
|
||||
assert(m_ltDoor && m_rtDoor);
|
||||
|
||||
// TODO: Match
|
||||
m_roi->SetVisibility(m_boundary->GetFlag0x10());
|
||||
m_roi->SetVisibility(m_boundary->GetVisibility());
|
||||
|
||||
switch (m_state) {
|
||||
case e_none:
|
||||
|
||||
@ -109,7 +109,7 @@ MxResult LegoAnimActor::AnimateWithTransform(float p_time, Matrix4& p_transform)
|
||||
LegoROI** roiMap = m_animMaps[m_curAnim]->m_roiMap;
|
||||
MxU32 numROIs = m_animMaps[m_curAnim]->m_numROIs;
|
||||
|
||||
if (!m_boundary->GetFlag0x10()) {
|
||||
if (!m_boundary->GetVisibility()) {
|
||||
MxU32 i;
|
||||
m_roi->SetVisibility(FALSE);
|
||||
|
||||
|
||||
@ -68,7 +68,7 @@ MxBool LegoPathStruct::HandleTrigger(LegoPathActor* p_actor, MxBool p_direction,
|
||||
case c_h: {
|
||||
LegoHideAnimPresenter* presenter = m_world->GetHideAnimPresenter();
|
||||
if (presenter != NULL) {
|
||||
presenter->FUN_1006db40(p_data * 100);
|
||||
presenter->ApplyVisibility(p_data * 100);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@ -117,7 +117,7 @@ void CarRace::ReadyWorld()
|
||||
{
|
||||
assert(m_hideAnim);
|
||||
LegoWorld::ReadyWorld();
|
||||
m_hideAnim->FUN_1006db40(0);
|
||||
m_hideAnim->ApplyVisibility(0);
|
||||
|
||||
MxDSAction action;
|
||||
action.SetAtomId(*g_jukeboxScript);
|
||||
|
||||
@ -81,7 +81,7 @@ void JetskiRace::ReadyWorld()
|
||||
{
|
||||
assert(m_hideAnim);
|
||||
LegoWorld::ReadyWorld();
|
||||
m_hideAnim->FUN_1006db40(0);
|
||||
m_hideAnim->ApplyVisibility(0);
|
||||
|
||||
MxDSAction action;
|
||||
action.SetAtomId(*g_jukeboxScript);
|
||||
@ -213,7 +213,7 @@ MxLong JetskiRace::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
||||
result = 1;
|
||||
}
|
||||
else if (m_playerLastPathStruct == 0xf) {
|
||||
m_hideAnim->FUN_1006db40(m_playerLaps * 200 + 100);
|
||||
m_hideAnim->ApplyVisibility(m_playerLaps * 200 + 100);
|
||||
result = 1;
|
||||
}
|
||||
|
||||
|
||||
@ -1535,20 +1535,20 @@ void LegoHideAnimPresenter::StartingTickle()
|
||||
|
||||
if (m_currentTickleState == e_streaming) {
|
||||
AssignIndiciesWithMap();
|
||||
FUN_1006db40(0);
|
||||
ApplyVisibility(0);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006db40
|
||||
// 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: 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();
|
||||
MxBool newB = FALSE;
|
||||
@ -1569,13 +1569,13 @@ void LegoHideAnimPresenter::FUN_1006db60(LegoTreeNode* p_node, LegoTime p_time)
|
||||
|
||||
if (boundary != NULL) {
|
||||
newB = data->GetVisibility(p_time);
|
||||
previousB = boundary->GetFlag0x10();
|
||||
boundary->SetFlag0x10(newB);
|
||||
previousB = boundary->GetVisibility();
|
||||
boundary->SetVisibility(newB);
|
||||
}
|
||||
}
|
||||
|
||||
for (MxS32 i = 0; i < p_node->GetNumChildren(); i++) {
|
||||
FUN_1006db60(p_node->GetChild(i), p_time);
|
||||
ApplyVisibility(p_node->GetChild(i), p_time);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ class LegoWEGEdge : public LegoWEEdge {
|
||||
c_bit1 = 0x01,
|
||||
c_bit2 = 0x02,
|
||||
c_bit3 = 0x04,
|
||||
c_bit5 = 0x10
|
||||
c_visible = 0x10
|
||||
};
|
||||
|
||||
LegoWEGEdge();
|
||||
@ -46,9 +46,9 @@ class LegoWEGEdge : public LegoWEEdge {
|
||||
LegoS32 LinkEdgesAndFaces() override; // vtable+0x04
|
||||
|
||||
// FUNCTION: BETA10 0x100270c0
|
||||
LegoU32 GetFlag0x10()
|
||||
LegoU32 GetVisibility()
|
||||
{
|
||||
if (m_flags & c_bit5) {
|
||||
if (m_flags & c_visible) {
|
||||
return FALSE;
|
||||
}
|
||||
else {
|
||||
@ -67,13 +67,13 @@ class LegoWEGEdge : public LegoWEEdge {
|
||||
const LegoChar* GetName() { return m_name; }
|
||||
|
||||
// FUNCTION: BETA10 0x1005d5f0
|
||||
void SetFlag0x10(LegoU32 p_disable)
|
||||
void SetVisibility(LegoU32 p_disable)
|
||||
{
|
||||
if (p_disable) {
|
||||
m_flags &= ~c_bit5;
|
||||
m_flags &= ~c_visible;
|
||||
}
|
||||
else {
|
||||
m_flags |= c_bit5;
|
||||
m_flags |= c_visible;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user