mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-26 17:46:38 -05:00
Implement/match LegoROI::FUN_100a9170 (#639)
* Implement.match LegoROI::FUN_100a9170 * Add two LOD functions
This commit is contained in:
parent
d978cbe7f9
commit
32ae9f3803
4 changed files with 46 additions and 7 deletions
|
@ -311,10 +311,29 @@ LegoResult LegoLOD::Read(Tgl::Renderer* p_renderer, LegoTextureContainer* p_text
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x100aad00
|
// FUNCTION: LEGO1 0x100aacb0
|
||||||
|
LegoResult LegoLOD::FUN_100aacb0(LegoFloat p_red, LegoFloat p_green, LegoFloat p_blue, LegoFloat p_alpha)
|
||||||
|
{
|
||||||
|
for (LegoU32 i = m_unk0x1c; i < m_numMeshes; i++) {
|
||||||
|
if (!m_meshes[i].m_unk0x04) {
|
||||||
|
m_meshes[i].m_tglMesh->SetColor(p_red, p_green, p_blue, p_alpha);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x100aad00
|
||||||
LegoResult LegoLOD::FUN_100aad00(LegoTextureInfo* p_textureInfo)
|
LegoResult LegoLOD::FUN_100aad00(LegoTextureInfo* p_textureInfo)
|
||||||
{
|
{
|
||||||
// TODO
|
for (LegoU32 i = m_unk0x1c; i < m_numMeshes; i++) {
|
||||||
|
if (m_meshes[i].m_unk0x04) {
|
||||||
|
SetGroupTexture(m_meshes[i].m_tglMesh, p_textureInfo);
|
||||||
|
m_meshes[i].m_tglMesh->SetColor(1.0F, 1.0F, 1.0F, 0.0F);
|
||||||
|
m_meshes[i].m_unk0x04 = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@ class LegoLOD : public ViewLOD {
|
||||||
float VTable0x10() override { return 0.0; } // vtable+0x10
|
float VTable0x10() override { return 0.0; } // vtable+0x10
|
||||||
|
|
||||||
LegoResult Read(Tgl::Renderer*, LegoTextureContainer* p_textureContainer, LegoStorage* p_storage);
|
LegoResult Read(Tgl::Renderer*, LegoTextureContainer* p_textureContainer, LegoStorage* p_storage);
|
||||||
|
LegoResult FUN_100aacb0(LegoFloat p_red, LegoFloat p_green, LegoFloat p_blue, LegoFloat p_alpha);
|
||||||
LegoResult FUN_100aad00(LegoTextureInfo* p_textureInfo);
|
LegoResult FUN_100aad00(LegoTextureInfo* p_textureInfo);
|
||||||
|
|
||||||
static LegoBool FUN_100aae20(const LegoChar* p_name);
|
static LegoBool FUN_100aae20(const LegoChar* p_name);
|
||||||
|
|
|
@ -418,11 +418,30 @@ LegoResult LegoROI::SetFrame(LegoAnim* p_anim, LegoTime p_time)
|
||||||
return FUN_100a8da0(root, mat, p_time, this);
|
return FUN_100a8da0(root, mat, p_time, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x100a9170
|
// FUNCTION: LEGO1 0x100a9170
|
||||||
LegoResult LegoROI::FUN_100a9170(LegoFloat, LegoFloat, LegoFloat, LegoFloat)
|
LegoResult LegoROI::FUN_100a9170(LegoFloat p_red, LegoFloat p_green, LegoFloat p_blue, LegoFloat p_alpha)
|
||||||
{
|
{
|
||||||
// TODO
|
LegoResult result = SUCCESS;
|
||||||
return SUCCESS;
|
CompoundObject::iterator it;
|
||||||
|
|
||||||
|
int lodCount = GetLODCount();
|
||||||
|
for (LegoU32 i = 0; i < lodCount; i++) {
|
||||||
|
LegoLOD* lod = (LegoLOD*) GetLOD(i);
|
||||||
|
|
||||||
|
if (lod->FUN_100aacb0(p_red, p_green, p_blue, p_alpha) != SUCCESS) {
|
||||||
|
result = FAILURE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (comp != NULL) {
|
||||||
|
for (it = comp->begin(); it != comp->end(); it++) {
|
||||||
|
if (((LegoROI*) *it)->FUN_100a9170(p_red, p_green, p_blue, p_alpha) != SUCCESS) {
|
||||||
|
result = FAILURE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a9210
|
// FUNCTION: LEGO1 0x100a9210
|
||||||
|
|
|
@ -32,7 +32,7 @@ class LegoROI : public ViewROI {
|
||||||
LegoROI* FUN_100a8ce0(const LegoChar* p_name, LegoROI* p_roi);
|
LegoROI* FUN_100a8ce0(const LegoChar* p_name, LegoROI* p_roi);
|
||||||
LegoResult FUN_100a8da0(LegoTreeNode* p_node, const Matrix4& p_matrix, LegoTime p_time, LegoROI* p_roi);
|
LegoResult FUN_100a8da0(LegoTreeNode* p_node, const Matrix4& p_matrix, LegoTime p_time, LegoROI* p_roi);
|
||||||
LegoResult SetFrame(LegoAnim* p_anim, LegoTime p_time);
|
LegoResult SetFrame(LegoAnim* p_anim, LegoTime p_time);
|
||||||
LegoResult FUN_100a9170(LegoFloat, LegoFloat, LegoFloat, LegoFloat);
|
LegoResult FUN_100a9170(LegoFloat p_red, LegoFloat p_green, LegoFloat p_blue, LegoFloat p_alpha);
|
||||||
LegoResult FUN_100a9210(LegoTextureInfo* p_textureInfo);
|
LegoResult FUN_100a9210(LegoTextureInfo* p_textureInfo);
|
||||||
|
|
||||||
float IntrinsicImportance() const override; // vtable+0x04
|
float IntrinsicImportance() const override; // vtable+0x04
|
||||||
|
|
Loading…
Reference in a new issue