mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-19 06:21:16 +00:00
Cleanup part 1
This commit is contained in:
parent
4e0656da88
commit
72c39c733a
@ -189,7 +189,6 @@ void Act3List::FUN_100720d0(MxU32 p_objectId)
|
|||||||
// Removing it decreases the match.
|
// Removing it decreases the match.
|
||||||
Act3List::iterator it3;
|
Act3List::iterator it3;
|
||||||
|
|
||||||
|
|
||||||
// LINE: LEGO1 0x100720e6
|
// LINE: LEGO1 0x100720e6
|
||||||
if (!empty()) {
|
if (!empty()) {
|
||||||
|
|
||||||
@ -198,11 +197,13 @@ void Act3List::FUN_100720d0(MxU32 p_objectId)
|
|||||||
pop_front();
|
pop_front();
|
||||||
|
|
||||||
removed = TRUE;
|
removed = TRUE;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
// LINE: LEGO1 0x100720fa
|
// LINE: LEGO1 0x100720fa
|
||||||
for (it = begin(); it != end(); it++) {
|
for (it = begin(); it != end(); it++) {
|
||||||
Act3ListElement& current = *it;
|
Act3ListElement& current = *it;
|
||||||
|
// No idea why `current` is used in one but not the other,
|
||||||
|
// but this is what produces the best match.
|
||||||
if (current.m_hasStarted && (*it).m_objectId == p_objectId) {
|
if (current.m_hasStarted && (*it).m_objectId == p_objectId) {
|
||||||
|
|
||||||
erase(it);
|
erase(it);
|
||||||
@ -210,19 +211,11 @@ void Act3List::FUN_100720d0(MxU32 p_objectId)
|
|||||||
removed = TRUE;
|
removed = TRUE;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (removed && size() > 0) {
|
if (removed && size() > 0) {
|
||||||
|
|
||||||
// TODO: Something is wrong about these first two lines
|
|
||||||
// LINE: LEGO1 0x1007215f
|
// LINE: LEGO1 0x1007215f
|
||||||
it = begin();
|
it = begin();
|
||||||
it3 = it;
|
it3 = it;
|
||||||
@ -230,42 +223,33 @@ void Act3List::FUN_100720d0(MxU32 p_objectId)
|
|||||||
Act3ListElement& firstItem = front();
|
Act3ListElement& firstItem = front();
|
||||||
it++;
|
it++;
|
||||||
|
|
||||||
// // LINE: LEGO1 0x100721d4 Not pinnable, appears multiple times
|
for (; it != end();) {
|
||||||
for (; it != end(); ) {
|
|
||||||
// LINE: LEGO1 0x1007217c
|
// LINE: LEGO1 0x1007217c
|
||||||
if ((*it).m_unk0x04 == 1) {
|
if ((*it).m_unk0x04 == 1) {
|
||||||
// LINE: LEGO1 0x100721a0
|
// LINE: LEGO1 0x100721a0
|
||||||
for (Act3List::iterator it2 = begin(); it2 != it; ) {
|
for (Act3List::iterator it2 = begin(); it2 != it;) {
|
||||||
// LINE: LEGO1 0x10072191
|
// LINE: LEGO1 0x10072191
|
||||||
if ((*it2).m_hasStarted) {
|
if ((*it2).m_hasStarted) {
|
||||||
// LINE: LEGO1 0x10072202
|
// LINE: LEGO1 0x10072202
|
||||||
DeleteActionWrapper();
|
DeleteActionWrapper();
|
||||||
// LINE: LEGO1 0x10072209
|
// LINE: LEGO1 0x10072209
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
erase(it2++);
|
erase(it2++);
|
||||||
|
|
||||||
}
|
}
|
||||||
it++;
|
it++;
|
||||||
it3++;
|
it3++;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// LINE: LEGO1 0x100721d4
|
// LINE: LEGO1 0x100721d4
|
||||||
if (!firstItem.m_hasStarted) {
|
if (!firstItem.m_hasStarted) {
|
||||||
// LINE: LEGO1 0x100721de
|
// LINE: LEGO1 0x100721de
|
||||||
firstItem.m_hasStarted = TRUE;
|
firstItem.m_hasStarted = TRUE;
|
||||||
// // LINE: LEGO1 0x100721e4
|
// // LINE: LEGO1 0x100721e4
|
||||||
InvokeAction(Extra::e_start, *g_act3Script, firstItem.m_objectId, NULL);
|
InvokeAction(Extra::e_start, *g_act3Script, firstItem.m_objectId, NULL);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user