mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-22 15:48:09 -05:00
Implement/match ViewManager::Remove (#624)
This commit is contained in:
parent
00c05aa80b
commit
b8aa16ff80
2 changed files with 27 additions and 10 deletions
|
@ -16,7 +16,7 @@
|
|||
#include "roi/legoroi.h"
|
||||
|
||||
// GLOBAL: LEGO1 0x100f7ae0
|
||||
int g_modelPresenterConfig = 1;
|
||||
MxS32 g_modelPresenterConfig = 1;
|
||||
|
||||
// GLOBAL: LEGO1 0x10102054
|
||||
// STRING: LEGO1 0x10102018
|
||||
|
|
|
@ -32,19 +32,38 @@ ViewManager::~ViewManager()
|
|||
SetPOVSource(NULL);
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100a6410
|
||||
// FUNCTION: LEGO1 0x100a6410
|
||||
void ViewManager::Remove(ViewROI* p_roi)
|
||||
{
|
||||
// TODO
|
||||
for (CompoundObject::iterator it = rois.begin(); it != rois.end(); it++) {
|
||||
if (*it == p_roi) {
|
||||
rois.erase(it);
|
||||
|
||||
if (p_roi->GetUnknown0xe0() >= 0) {
|
||||
FUN_100a66a0(p_roi);
|
||||
}
|
||||
|
||||
const CompoundObject* comp = p_roi->GetComp();
|
||||
|
||||
if (comp != NULL) {
|
||||
for (CompoundObject::const_iterator it = comp->begin(); !(it == comp->end()); it++) {
|
||||
if (((ViewROI*) *it)->GetUnknown0xe0() >= 0) {
|
||||
FUN_100a66a0((ViewROI*) *it);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 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);
|
||||
for (CompoundObject::iterator it = rois.begin(); it != rois.end(); it++) {
|
||||
RemoveAll((ViewROI*) *it);
|
||||
}
|
||||
|
||||
rois.erase(rois.begin(), rois.end());
|
||||
|
@ -59,10 +78,8 @@ void ViewManager::RemoveAll(ViewROI* p_roi)
|
|||
|
||||
if (comp != NULL) {
|
||||
for (CompoundObject::const_iterator it = comp->begin(); !(it == comp->end()); it++) {
|
||||
ViewROI* roi = (ViewROI*) *it;
|
||||
|
||||
if (roi != NULL) {
|
||||
RemoveAll(roi);
|
||||
if ((ViewROI*) *it != NULL) {
|
||||
RemoveAll((ViewROI*) *it);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue