mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-28 02:31:15 +00:00
Improve match
This commit is contained in:
parent
fab09d9d37
commit
7e4dbd20a3
@ -257,7 +257,7 @@ LegoROI* LegoCharacterManager::CreateROI(const char* p_key)
|
|||||||
BoundingBox boundingBox;
|
BoundingBox boundingBox;
|
||||||
MxMatrix mat;
|
MxMatrix mat;
|
||||||
CompoundObject* comp;
|
CompoundObject* comp;
|
||||||
MxS32 i, j;
|
MxS32 i;
|
||||||
|
|
||||||
Tgl::Renderer* renderer = VideoManager()->GetRenderer();
|
Tgl::Renderer* renderer = VideoManager()->GetRenderer();
|
||||||
ViewLODListManager* lodManager = GetViewLODListManager();
|
ViewLODListManager* lodManager = GetViewLODListManager();
|
||||||
@ -302,13 +302,9 @@ LegoROI* LegoCharacterManager::CreateROI(const char* p_key)
|
|||||||
|
|
||||||
for (i = 0; i < _countof(g_characterLODs) - 1; i++) {
|
for (i = 0; i < _countof(g_characterLODs) - 1; i++) {
|
||||||
char lodName[256];
|
char lodName[256];
|
||||||
ViewLODList *lodList, *dupLodList;
|
|
||||||
LegoROI* childROI;
|
|
||||||
MxS32 lodSize;
|
|
||||||
const char* parentName;
|
|
||||||
|
|
||||||
LegoCharacterData::Part& part = data->m_parts[i];
|
LegoCharacterData::Part& part = data->m_parts[i];
|
||||||
|
|
||||||
|
const char* parentName;
|
||||||
if (i == 0 || i == 1) {
|
if (i == 0 || i == 1) {
|
||||||
parentName = part.m_unk0x04[part.m_unk0x00[part.m_unk0x08]];
|
parentName = part.m_unk0x04[part.m_unk0x00[part.m_unk0x08]];
|
||||||
}
|
}
|
||||||
@ -316,12 +312,12 @@ LegoROI* LegoCharacterManager::CreateROI(const char* p_key)
|
|||||||
parentName = g_characterLODs[i + 1].m_parentName;
|
parentName = g_characterLODs[i + 1].m_parentName;
|
||||||
}
|
}
|
||||||
|
|
||||||
lodList = lodManager->Lookup(parentName);
|
ViewLODList* lodList = lodManager->Lookup(parentName);
|
||||||
lodSize = lodList->Size();
|
MxS32 lodSize = lodList->Size();
|
||||||
sprintf(lodName, "%s%d", p_key, i);
|
sprintf(lodName, "%s%d", p_key, i);
|
||||||
dupLodList = lodManager->Create(lodName, lodSize);
|
ViewLODList* dupLodList = lodManager->Create(lodName, lodSize);
|
||||||
|
|
||||||
for (j = 0; j < lodSize; j++) {
|
for (MxS32 j = 0; j < lodSize; j++) {
|
||||||
LegoLOD* lod = (LegoLOD*) (*lodList)[j];
|
LegoLOD* lod = (LegoLOD*) (*lodList)[j];
|
||||||
LegoLOD* clone = lod->Clone(renderer);
|
LegoLOD* clone = lod->Clone(renderer);
|
||||||
dupLodList->PushBack(clone);
|
dupLodList->PushBack(clone);
|
||||||
@ -330,7 +326,7 @@ LegoROI* LegoCharacterManager::CreateROI(const char* p_key)
|
|||||||
lodList->Release();
|
lodList->Release();
|
||||||
lodList = dupLodList;
|
lodList = dupLodList;
|
||||||
|
|
||||||
childROI = new LegoROI(renderer, lodList);
|
LegoROI* childROI = new LegoROI(renderer, lodList);
|
||||||
lodList->Release();
|
lodList->Release();
|
||||||
|
|
||||||
childROI->SetName(g_characterLODs[i + 1].m_name);
|
childROI->SetName(g_characterLODs[i + 1].m_name);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user