Implement/match LegoAnimPresenter::FUN_1006c8a0 (#794)

This commit is contained in:
Christian Semmler 2024-04-13 10:11:24 -04:00 committed by GitHub
parent 4502737fe2
commit 93257a7c8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 4 deletions

View file

@ -92,7 +92,7 @@ class LegoAnimPresenter : public MxVideoPresenter {
LegoBool FUN_1006aba0(); LegoBool FUN_1006aba0();
LegoBool FUN_1006abb0(LegoTreeNode*, undefined4); LegoBool FUN_1006abb0(LegoTreeNode*, undefined4);
void FUN_1006ac90(); void FUN_1006ac90();
void FUN_1006c8a0(LegoBool); void FUN_1006c8a0(MxBool p_bool);
LegoAnim* m_anim; // 0x64 LegoAnim* m_anim; // 0x64
LegoROI** m_unk0x68; // 0x68 LegoROI** m_unk0x68; // 0x68

View file

@ -80,6 +80,8 @@ class LegoEntity : public MxEntity {
inline void SetFlags(MxU8 p_flags) { m_flags = p_flags; } inline void SetFlags(MxU8 p_flags) { m_flags = p_flags; }
inline void SetFlag(MxU8 p_flag) { m_flags |= p_flag; } inline void SetFlag(MxU8 p_flag) { m_flags |= p_flag; }
inline void ClearFlag(MxU8 p_flag) { m_flags &= ~p_flag; } inline void ClearFlag(MxU8 p_flag) { m_flags &= ~p_flag; }
inline void SetUnknown0x10Flag(MxU8 p_flag) { m_unk0x10 |= p_flag; }
inline void ClearUnknown0x10Flag(MxU8 p_flag) { m_unk0x10 &= ~p_flag; }
protected: protected:
void Init(); void Init();

View file

@ -638,10 +638,23 @@ void LegoAnimPresenter::VTable0x90()
// TODO // TODO
} }
// STUB: LEGO1 0x1006c8a0 // FUNCTION: LEGO1 0x1006c8a0
void LegoAnimPresenter::FUN_1006c8a0(LegoBool) void LegoAnimPresenter::FUN_1006c8a0(MxBool p_bool)
{ {
// TODO if (m_unk0x6c != 0 && m_unk0x68 != NULL) {
for (MxU32 i = 1; i <= m_unk0x6c; i++) {
LegoEntity* entity = m_unk0x68[i]->GetEntity();
if (entity != NULL) {
if (p_bool) {
entity->SetUnknown0x10Flag(LegoEntity::c_altBit1);
}
else {
entity->ClearUnknown0x10Flag(LegoEntity::c_altBit1);
}
}
}
}
} }
// STUB: LEGO1 0x1006c8f0 // STUB: LEGO1 0x1006c8f0