Simplify function

This commit is contained in:
Christian Semmler
2023-10-20 15:41:03 -04:00
parent 19722d413c
commit d68297f658

View File

@@ -160,25 +160,23 @@ void MxRegionTopBottom::FUN_100c5280(MxS32 p_left, MxS32 p_right)
if (p_left > leftRight->m_left)
p_left = leftRight->m_left;
if (leftRight->m_left < p_right) {
do {
if (p_right < leftRight->m_right)
p_right = leftRight->m_right;
while (leftRight->m_left < p_right) {
if (p_right < leftRight->m_right)
p_right = leftRight->m_right;
// TODO: Currently inlined, shouldn't be
b = a;
b.Advance();
// TODO: Currently inlined, shouldn't be
b = a;
b.Advance();
if (a.HasMatch()) {
a.Destroy();
a.Detach();
}
if (a.HasMatch()) {
a.Destroy();
a.Detach();
}
if (!b.Current(leftRight))
break;
if (!b.Current(leftRight))
break;
a = b;
} while (leftRight->m_left < p_right);
a = b;
}
if (a.HasMatch()) {