mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 00:14:22 +00:00

committed by
GitHub

parent
45cba2c00e
commit
309997fddc
@@ -1,5 +1,6 @@
|
||||
#include "legoroi.h"
|
||||
|
||||
#include "anim/legoanim.h"
|
||||
#include "geom/legobox.h"
|
||||
#include "geom/legosphere.h"
|
||||
#include "legolod.h"
|
||||
@@ -54,6 +55,11 @@ const char* g_unk0x10101390[] = {"rcuser", "jsuser", "dunebugy", "chtrblad", "ch
|
||||
// GLOBAL: LEGO1 0x101013ac
|
||||
ROIHandler g_unk0x101013ac = NULL;
|
||||
|
||||
// FUNCTION: LEGO1 0x100a81b0
|
||||
void LegoROI::FUN_100a81b0(const LegoChar* p_error, const LegoChar* p_name)
|
||||
{
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a81c0
|
||||
void LegoROI::configureLegoROI(int p_roiConfig)
|
||||
{
|
||||
@@ -328,11 +334,88 @@ done:
|
||||
return result;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100a90f0
|
||||
// FUNCTION: LEGO1 0x100a8cb0
|
||||
LegoResult LegoROI::FUN_100a8cb0(LegoAnimNodeData* p_data, LegoTime p_time, Matrix4& p_matrix)
|
||||
{
|
||||
p_matrix.SetIdentity();
|
||||
p_data->FUN_100a03c0(p_time, p_matrix);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a8ce0
|
||||
LegoROI* LegoROI::FUN_100a8ce0(const LegoChar* p_name, LegoROI* p_roi)
|
||||
{
|
||||
CompoundObject::iterator it;
|
||||
const LegoChar* name = p_roi->GetName();
|
||||
|
||||
if (name != NULL && *name != '\0' && !strcmpi(name, p_name)) {
|
||||
return p_roi;
|
||||
}
|
||||
|
||||
CompoundObject* comp = p_roi->comp;
|
||||
if (comp != NULL) {
|
||||
for (it = comp->begin(); it != comp->end(); it++) {
|
||||
LegoROI* roi = (LegoROI*) *it;
|
||||
name = roi->GetName();
|
||||
|
||||
if (name != NULL && *name != '\0' && !strcmpi(name, p_name)) {
|
||||
return roi;
|
||||
}
|
||||
}
|
||||
|
||||
for (it = comp->begin(); it != comp->end(); it++) {
|
||||
LegoROI* roi = FUN_100a8ce0(p_name, (LegoROI*) *it);
|
||||
|
||||
if (roi != NULL) {
|
||||
return roi;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a8da0
|
||||
LegoResult LegoROI::FUN_100a8da0(LegoTreeNode* p_node, const Matrix4& p_matrix, LegoTime p_time, LegoROI* p_roi)
|
||||
{
|
||||
MxMatrix mat;
|
||||
LegoAnimNodeData* data = (LegoAnimNodeData*) p_node->GetData();
|
||||
const LegoChar* name = data->GetName();
|
||||
LegoROI* roi = FUN_100a8ce0(name, p_roi);
|
||||
|
||||
if (roi == NULL) {
|
||||
roi = FUN_100a8ce0(name, this);
|
||||
}
|
||||
|
||||
if (roi != NULL) {
|
||||
FUN_100a8cb0(data, p_time, mat);
|
||||
roi->m_local2world.Product(mat, p_matrix);
|
||||
roi->VTable0x1c();
|
||||
|
||||
LegoBool und = data->FUN_100a0990(p_time);
|
||||
roi->SetUnknown0x0c(und);
|
||||
|
||||
for (LegoU32 i = 0; i < p_node->GetNumChildren(); i++) {
|
||||
FUN_100a8da0(p_node->GetChild(i), roi->m_local2world, p_time, roi);
|
||||
}
|
||||
}
|
||||
else {
|
||||
FUN_100a81b0("%s ROI Not found\n", name);
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a90f0
|
||||
LegoResult LegoROI::SetFrame(LegoAnim* p_anim, LegoTime p_time)
|
||||
{
|
||||
// TODO
|
||||
return SUCCESS;
|
||||
LegoTreeNode* root = p_anim->GetRoot();
|
||||
MxMatrix mat;
|
||||
|
||||
mat = m_local2world;
|
||||
mat.SetIdentity();
|
||||
|
||||
return FUN_100a8da0(root, mat, p_time, this);
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100a9170
|
||||
|
@@ -11,6 +11,8 @@ class LegoTextureContainer;
|
||||
struct LegoTextureInfo;
|
||||
class LegoStorage;
|
||||
class LegoAnim;
|
||||
class LegoAnimNodeData;
|
||||
class LegoTreeNode;
|
||||
|
||||
// VTABLE: LEGO1 0x100dbe38
|
||||
// SIZE 0x108
|
||||
@@ -27,16 +29,20 @@ public:
|
||||
LegoTextureContainer* p_textureContainer,
|
||||
LegoStorage* p_storage
|
||||
);
|
||||
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 SetFrame(LegoAnim* p_anim, LegoTime p_time);
|
||||
LegoResult FUN_100a9170(LegoFloat, LegoFloat, LegoFloat, LegoFloat);
|
||||
LegoResult FUN_100a9210(LegoTextureInfo* p_textureInfo);
|
||||
LegoResult SetFrame(LegoAnim* p_anim, LegoTime p_time);
|
||||
|
||||
float IntrinsicImportance() const override; // vtable+0x04
|
||||
void UpdateWorldBoundingVolumes() override; // vtable+0x18
|
||||
|
||||
void SetDisplayBB(int p_displayBB);
|
||||
static void configureLegoROI(int p_roi);
|
||||
|
||||
static LegoResult FUN_100a8cb0(LegoAnimNodeData* p_data, LegoTime p_time, Matrix4& p_matrix);
|
||||
static void FUN_100a81b0(const LegoChar* p_error, const LegoChar* p_name);
|
||||
static void configureLegoROI(int p_roi);
|
||||
static void FUN_100a9d30(ROIHandler p_func);
|
||||
static LegoBool FUN_100a9bf0(const LegoChar* p_param, float& p_red, float& p_green, float& p_blue, float& p_alpha);
|
||||
static LegoBool ColorAliasLookup(
|
||||
|
Reference in New Issue
Block a user