Match MxControlPresenter::StartAction

This commit is contained in:
Christian Semmler 2024-01-15 14:02:31 -05:00
parent 16d1eb6e1f
commit 0989707d74
2 changed files with 7 additions and 16 deletions

View File

@ -42,7 +42,7 @@ class MxControlPresenter : public MxCompositePresenter {
void FUN_10044540(undefined2); void FUN_10044540(undefined2);
undefined2 m_unk0x4c; // 0x4c undefined2 m_unk0x4c; // 0x4c
MxU16 m_unk0x4e; // 0x4e MxS16 m_unk0x4e; // 0x4e
MxBool m_unk0x50; // 0x50 MxBool m_unk0x50; // 0x50
undefined2 m_unk0x52; // 0x52 undefined2 m_unk0x52; // 0x52
undefined2 m_unk0x54; // 0x54 undefined2 m_unk0x54; // 0x54

View File

@ -52,30 +52,21 @@ MxResult MxControlPresenter::AddToManager()
MxResult MxControlPresenter::StartAction(MxStreamController* p_controller, MxDSAction* p_action) MxResult MxControlPresenter::StartAction(MxStreamController* p_controller, MxDSAction* p_action)
{ {
MxResult result = MxCompositePresenter::StartAction(p_controller, p_action); MxResult result = MxCompositePresenter::StartAction(p_controller, p_action);
MxU8 i = 0;
FUN_100b7220(m_action, 0x81, TRUE); FUN_100b7220(m_action, 0x81, TRUE);
ParseExtra(); ParseExtra();
MxS16 i = 0;
for (MxCompositePresenterList::iterator it = m_list.begin(); it != m_list.end(); it++) { for (MxCompositePresenterList::iterator it = m_list.begin(); it != m_list.end(); it++) {
MxBool toggle; (*it)->Enable((m_unk0x4c != 3 || m_unk0x4e) && IsEnabled() ? m_unk0x4e == i : FALSE);
if (m_unk0x4c == 3 && m_unk0x4e == 0) {
toggle = FALSE;
}
else {
if (!IsEnabled()) {
toggle = FALSE;
}
toggle = m_unk0x4e == i;
}
i++; i++;
(*it)->Enable(toggle);
} }
if (m_unk0x4c == 3) { if (m_unk0x4c == 3) {
(*m_list.end())->GetAction()->SetFlags((*m_list.end())->GetAction()->GetFlags() | 0x400); MxDSAction* action = (*m_list.begin())->GetAction();
action->SetFlags(action->GetFlags() | MxDSAction::Flag_Bit11);
} }
TickleManager()->RegisterClient(this, 200); TickleManager()->RegisterClient(this, 200);
return result; return result;
@ -130,7 +121,7 @@ void MxControlPresenter::Enable(MxBool p_enable)
if (MxPresenter::IsEnabled() != p_enable) { if (MxPresenter::IsEnabled() != p_enable) {
MxPresenter::Enable(p_enable); MxPresenter::Enable(p_enable);
MxU16 i = 0; MxS16 i = 0;
for (MxCompositePresenterList::iterator it = m_list.begin(); it != m_list.end(); it++) { for (MxCompositePresenterList::iterator it = m_list.begin(); it != m_list.end(); it++) {
if (i == m_unk0x4e) { if (i == m_unk0x4e) {
(*it)->Enable((m_unk0x4c != 3 || i != 0) ? p_enable : 0); (*it)->Enable((m_unk0x4c != 3 || i != 0) ? p_enable : 0);