mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 00:14:22 +00:00
Clear global unknowns in LegoROI
(#1611)
This commit is contained in:
@@ -43,13 +43,13 @@ ROIColorAlias g_roiColorAliases[22] = {
|
|||||||
int g_roiConfig = 100;
|
int g_roiConfig = 100;
|
||||||
|
|
||||||
// GLOBAL: LEGO1 0x10101370
|
// GLOBAL: LEGO1 0x10101370
|
||||||
const char* g_unk0x10101370[] = {"bike", "moto", NULL};
|
const char* g_sharedModelsHigh[] = {"bike", "moto", NULL};
|
||||||
|
|
||||||
// GLOBAL: LEGO1 0x10101380
|
// GLOBAL: LEGO1 0x10101380
|
||||||
const char* g_unk0x10101380[] = {"bike", "moto", "haus", NULL};
|
const char* g_sharedModelsLow[] = {"bike", "moto", "haus", NULL};
|
||||||
|
|
||||||
// GLOBAL: LEGO1 0x10101390
|
// GLOBAL: LEGO1 0x10101390
|
||||||
const char* g_unk0x10101390[] = {"rcuser", "jsuser", "dunebugy", "chtrblad", "chtrbody", "chtrshld", NULL};
|
const char* g_alwaysLoadNames[] = {"rcuser", "jsuser", "dunebugy", "chtrblad", "chtrbody", "chtrshld", NULL};
|
||||||
|
|
||||||
// GLOBAL: LEGO1 0x101013ac
|
// GLOBAL: LEGO1 0x101013ac
|
||||||
ColorOverride g_colorOverride = NULL;
|
ColorOverride g_colorOverride = NULL;
|
||||||
@@ -224,30 +224,30 @@ LegoResult LegoROI::Read(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (g_roiConfig <= 2) {
|
if (g_roiConfig <= 2) {
|
||||||
for (i = 0; g_unk0x10101380[i] != NULL; i++) {
|
for (i = 0; g_sharedModelsLow[i] != NULL; i++) {
|
||||||
if (!strnicmp(m_name, g_unk0x10101380[i], 4)) {
|
if (!strnicmp(m_name, g_sharedModelsLow[i], 4)) {
|
||||||
roiName = g_unk0x10101380[i];
|
roiName = g_sharedModelsLow[i];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
for (i = 0; g_unk0x10101370[i] != NULL; i++) {
|
for (i = 0; g_sharedModelsHigh[i] != NULL; i++) {
|
||||||
if (!strnicmp(m_name, g_unk0x10101370[i], 4)) {
|
if (!strnicmp(m_name, g_sharedModelsHigh[i], 4)) {
|
||||||
roiName = g_unk0x10101370[i];
|
roiName = g_sharedModelsHigh[i];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((lodList = p_viewLODListManager->Lookup(roiName))) {
|
if ((lodList = p_viewLODListManager->Lookup(roiName))) {
|
||||||
for (j = 0; g_unk0x10101390[j] != NULL; j++) {
|
for (j = 0; g_alwaysLoadNames[j] != NULL; j++) {
|
||||||
if (!strcmpi(g_unk0x10101390[j], roiName)) {
|
if (!strcmpi(g_alwaysLoadNames[j], roiName)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_unk0x10101390[j] != NULL) {
|
if (g_alwaysLoadNames[j] != NULL) {
|
||||||
while (lodList->Size()) {
|
while (lodList->Size()) {
|
||||||
delete const_cast<ViewLOD*>(lodList->PopBack());
|
delete const_cast<ViewLOD*>(lodList->PopBack());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user