mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 00:14:22 +00:00
Clear unknowns in LegoROI and related classes (#1457)
* Clear unknowns in LegoROI and related classes * Update names * Consistently naming: `GetTextureInfo` --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
@@ -228,7 +228,7 @@ private:
|
||||
MxResult WriteEndOfVariables(LegoStorage* p_storage);
|
||||
MxS32 ReadVariable(LegoStorage* p_storage, MxVariableTable* p_to);
|
||||
void SetColors();
|
||||
void SetROIHandlerFunction();
|
||||
void SetROIColorOverride();
|
||||
|
||||
char* m_savePath; // 0x00
|
||||
MxS16 m_stateCount; // 0x04
|
||||
@@ -255,7 +255,7 @@ public:
|
||||
Area m_unk0x42c; // 0x42c
|
||||
};
|
||||
|
||||
MxBool ROIHandlerFunction(const char* p_input, char* p_output, MxU32 p_copyLen);
|
||||
MxBool ROIColorOverride(const char* p_input, char* p_output, MxU32 p_copyLen);
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1003c860
|
||||
// LegoGameState::ScoreItem::ScoreItem
|
||||
|
@@ -220,8 +220,8 @@ void LegoCarBuildAnimPresenter::StreamingTickle()
|
||||
LegoROI* roi = m_roiMap[j];
|
||||
|
||||
if (roi && roi->GetName() && (strcmpi(name, roi->GetName()) == 0)) {
|
||||
roi->FUN_100a9dd0();
|
||||
roi->FUN_100a9350("lego red");
|
||||
roi->ClearMeshOffset();
|
||||
roi->SetLodColor("lego red");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -567,14 +567,14 @@ LegoROI* LegoCharacterManager::CreateActorROI(const char* p_key)
|
||||
LegoTextureInfo* textureInfo = textureContainer->Get(part.m_unk0x10[part.m_unk0x0c[part.m_unk0x14]]);
|
||||
|
||||
if (textureInfo != NULL) {
|
||||
childROI->FUN_100a9210(textureInfo);
|
||||
childROI->FUN_100a9170(1.0F, 1.0F, 1.0F, 0.0F);
|
||||
childROI->SetTextureInfo(textureInfo);
|
||||
childROI->SetLodColor(1.0F, 1.0F, 1.0F, 0.0F);
|
||||
}
|
||||
}
|
||||
else if (g_actorLODs[i + 1].m_flags & LegoActorLOD::c_flag2 || (i == 0 && part.m_unk0x00[part.m_unk0x08] == 0)) {
|
||||
LegoFloat red, green, blue, alpha;
|
||||
childROI->FUN_100a9bf0(part.m_unk0x10[part.m_unk0x0c[part.m_unk0x14]], red, green, blue, alpha);
|
||||
childROI->FUN_100a9170(red, green, blue, alpha);
|
||||
childROI->GetRGBAColor(part.m_unk0x10[part.m_unk0x0c[part.m_unk0x14]], red, green, blue, alpha);
|
||||
childROI->SetLodColor(red, green, blue, alpha);
|
||||
}
|
||||
|
||||
comp->push_back(childROI);
|
||||
@@ -796,8 +796,8 @@ MxBool LegoCharacterManager::SwitchColor(LegoROI* p_roi, LegoROI* p_targetROI)
|
||||
}
|
||||
|
||||
LegoFloat red, green, blue, alpha;
|
||||
LegoROI::FUN_100a9bf0(part.m_unk0x10[part.m_unk0x0c[part.m_unk0x14]], red, green, blue, alpha);
|
||||
p_targetROI->FUN_100a9170(red, green, blue, alpha);
|
||||
LegoROI::GetRGBAColor(part.m_unk0x10[part.m_unk0x0c[part.m_unk0x14]], red, green, blue, alpha);
|
||||
p_targetROI->SetLodColor(red, green, blue, alpha);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -832,12 +832,12 @@ MxBool LegoCharacterManager::SwitchVariant(LegoROI* p_roi)
|
||||
|
||||
Tgl::Renderer* renderer = VideoManager()->GetRenderer();
|
||||
LegoFloat red, green, blue, alpha;
|
||||
LegoROI::FUN_100a9bf0(part.m_unk0x10[part.m_unk0x0c[part.m_unk0x14]], red, green, blue, alpha);
|
||||
LegoROI::GetRGBAColor(part.m_unk0x10[part.m_unk0x0c[part.m_unk0x14]], red, green, blue, alpha);
|
||||
|
||||
for (MxS32 i = 0; i < lodSize; i++) {
|
||||
LegoLOD* lod = (LegoLOD*) (*lodList)[i];
|
||||
LegoLOD* clone = lod->Clone(renderer);
|
||||
clone->FUN_100aacb0(red, green, blue, alpha);
|
||||
clone->SetColor(red, green, blue, alpha);
|
||||
dupLodList->PushBack(clone);
|
||||
}
|
||||
|
||||
|
@@ -145,7 +145,7 @@ const char* g_strDisable = "disable";
|
||||
LegoGameState::LegoGameState()
|
||||
{
|
||||
SetColors();
|
||||
SetROIHandlerFunction();
|
||||
SetROIColorOverride();
|
||||
|
||||
m_stateCount = 0;
|
||||
m_actorId = 0;
|
||||
@@ -176,7 +176,7 @@ LegoGameState::LegoGameState()
|
||||
// FUNCTION: LEGO1 0x10039720
|
||||
LegoGameState::~LegoGameState()
|
||||
{
|
||||
LegoROI::FUN_100a9d30(NULL);
|
||||
LegoROI::SetColorOverride(NULL);
|
||||
|
||||
if (m_stateCount) {
|
||||
for (MxS16 i = 0; i < m_stateCount; i++) {
|
||||
@@ -1060,13 +1060,13 @@ void LegoGameState::SetColors()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1003bac0
|
||||
void LegoGameState::SetROIHandlerFunction()
|
||||
void LegoGameState::SetROIColorOverride()
|
||||
{
|
||||
LegoROI::FUN_100a9d30(&ROIHandlerFunction);
|
||||
LegoROI::SetColorOverride(&ROIColorOverride);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1003bad0
|
||||
MxBool ROIHandlerFunction(const char* p_input, char* p_output, MxU32 p_copyLen)
|
||||
MxBool ROIColorOverride(const char* p_input, char* p_output, MxU32 p_copyLen)
|
||||
{
|
||||
if (p_output != NULL && p_copyLen != 0 &&
|
||||
(strnicmp(p_input, "INDIR-F-", strlen("INDIR-F-")) == 0 ||
|
||||
|
@@ -56,7 +56,7 @@ void LegoPhonemePresenter::StartingTickle()
|
||||
}
|
||||
|
||||
head = entityROI->FindChildROI("head", entityROI);
|
||||
head->GetTexture(m_textureInfo);
|
||||
head->GetTextureInfo(m_textureInfo);
|
||||
|
||||
LegoPhonemeList* phonemeList = VideoManager()->GetPhonemeList();
|
||||
LegoPhoneme* phoneme = new LegoPhoneme(m_roiName.GetData(), 1);
|
||||
|
Reference in New Issue
Block a user