Implement/match ViewManager::RemoveAll (#616)

* Implement/match ViewManager::RemoveAll

* Use const_iterator

* const

* Naming
This commit is contained in:
Christian Semmler
2024-03-02 14:26:19 -05:00
committed by GitHub
parent 6de17cf1b6
commit de5cd98b76
7 changed files with 52 additions and 18 deletions

View File

@@ -32,8 +32,39 @@ ViewManager::~ViewManager()
SetPOVSource(NULL);
}
// STUB: LEGO1 0x100a64d0
void ViewManager::RemoveAll(ViewROI*)
// FUNCTION: LEGO1 0x100a64d0
void ViewManager::RemoveAll(ViewROI* p_roi)
{
if (p_roi == NULL) {
for (CompoundObject::iterator it = rois.begin(); !(it == rois.end()); it++) {
ViewROI* roi = (ViewROI*) *it;
RemoveAll(roi);
}
rois.erase(rois.begin(), rois.end());
}
else {
if (p_roi->GetUnknown0xe0() >= 0) {
FUN_100a66a0(p_roi);
}
p_roi->SetUnknown0xe0(-1);
const CompoundObject* comp = p_roi->GetComp();
if (comp != NULL) {
for (CompoundObject::const_iterator it = comp->begin(); !(it == comp->end()); it++) {
ViewROI* roi = (ViewROI*) *it;
if (roi != NULL) {
RemoveAll(roi);
}
}
}
}
}
// STUB: LEGO1 0x100a66a0
void ViewManager::FUN_100a66a0(ViewROI* p_roi)
{
// TODO
}