mirror of
https://github.com/isledecomp/isle-portable.git
synced 2025-09-24 04:26:55 -04:00
Add BETA10 addresses for LegoROI
and others (#1569)
--------- Co-authored-by: jonschz <jonschz@users.noreply.github.com>
This commit is contained in:
parent
72eb194424
commit
f64af166c8
@ -725,6 +725,7 @@ void LegoAnimNodeData::SetName(LegoChar* p_name)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a03c0
|
||||
// FUNCTION: BETA10 0x1017f254
|
||||
LegoResult LegoAnimNodeData::CreateLocalTransform(LegoFloat p_time, Matrix4& p_matrix)
|
||||
{
|
||||
LegoU32 index;
|
||||
|
@ -58,8 +58,12 @@ ColorOverride g_colorOverride = NULL;
|
||||
TextureHandler g_textureHandler = NULL;
|
||||
|
||||
// FUNCTION: LEGO1 0x100a81b0
|
||||
void LegoROI::FUN_100a81b0(const LegoChar* p_error, const LegoChar* p_name)
|
||||
// FUNCTION: BETA10 0x101898c0
|
||||
// FUNCTION: ALPHA 0x100bb1c0
|
||||
void LegoROI::FUN_100a81b0(const LegoChar* p_error, ...)
|
||||
{
|
||||
// Probably a printf-like debug function that was removed early.
|
||||
// No known implementation in any of the binaries.
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a81c0
|
||||
@ -69,6 +73,7 @@ void LegoROI::configureLegoROI(int p_roiConfig)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a81d0
|
||||
// FUNCTION: BETA10 0x101898e8
|
||||
LegoROI::LegoROI(Tgl::Renderer* p_renderer) : ViewROI(p_renderer, NULL)
|
||||
{
|
||||
m_parentROI = NULL;
|
||||
@ -77,6 +82,7 @@ LegoROI::LegoROI(Tgl::Renderer* p_renderer) : ViewROI(p_renderer, NULL)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a82d0
|
||||
// FUNCTION: BETA10 0x10189994
|
||||
LegoROI::LegoROI(Tgl::Renderer* p_renderer, ViewLODList* p_lodList) : ViewROI(p_renderer, p_lodList)
|
||||
{
|
||||
m_parentROI = NULL;
|
||||
@ -85,6 +91,7 @@ LegoROI::LegoROI(Tgl::Renderer* p_renderer, ViewLODList* p_lodList) : ViewROI(p_
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a83c0
|
||||
// FUNCTION: BETA10 0x10189a42
|
||||
LegoROI::~LegoROI()
|
||||
{
|
||||
if (comp) {
|
||||
@ -105,6 +112,7 @@ LegoROI::~LegoROI()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a84a0
|
||||
// FUNCTION: BETA10 0x10189b99
|
||||
LegoResult LegoROI::Read(
|
||||
OrientableROI* p_unk0xd4,
|
||||
Tgl::Renderer* p_renderer,
|
||||
@ -337,6 +345,7 @@ done:
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a8cb0
|
||||
// FUNCTION: BETA10 0x1018a7e8
|
||||
LegoResult LegoROI::CreateLocalTransform(LegoAnimNodeData* p_data, LegoTime p_time, Matrix4& p_matrix)
|
||||
{
|
||||
p_matrix.SetIdentity();
|
||||
@ -379,6 +388,7 @@ LegoROI* LegoROI::FindChildROI(const LegoChar* p_name, LegoROI* p_roi)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a8da0
|
||||
// FUNCTION: BETA10 0x1018a9fb
|
||||
LegoResult LegoROI::ApplyAnimationTransformation(
|
||||
LegoTreeNode* p_node,
|
||||
const Matrix4& p_matrix,
|
||||
@ -473,6 +483,7 @@ void LegoROI::FUN_100a8fd0(LegoTreeNode* p_node, Matrix4& p_matrix, LegoTime p_t
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a90f0
|
||||
// FUNCTION: BETA10 0x1018ada8
|
||||
LegoResult LegoROI::SetFrame(LegoAnim* p_anim, LegoTime p_time)
|
||||
{
|
||||
LegoTreeNode* root = p_anim->GetRoot();
|
||||
@ -512,6 +523,7 @@ LegoResult LegoROI::SetLodColor(LegoFloat p_red, LegoFloat p_green, LegoFloat p_
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a9210
|
||||
// FUNCTION: BETA10 0x1018af25
|
||||
LegoResult LegoROI::SetTextureInfo(LegoTextureInfo* p_textureInfo)
|
||||
{
|
||||
LegoResult result = SUCCESS;
|
||||
@ -735,6 +747,7 @@ LegoU32 LegoROI::FUN_100a9410(
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a9a50
|
||||
// FUNCTION: BETA10 0x1018bb6b
|
||||
TimeROI::TimeROI(Tgl::Renderer* p_renderer, ViewLODList* p_lodList, LegoTime p_time) : LegoROI(p_renderer, p_lodList)
|
||||
{
|
||||
m_time = p_time;
|
||||
@ -760,6 +773,7 @@ void TimeROI::FUN_100a9b40(Matrix4& p_matrix, LegoTime p_time)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a9bf0
|
||||
// FUNCTION: BETA10 0x1018bc93
|
||||
LegoBool LegoROI::GetRGBAColor(const LegoChar* p_name, float& p_red, float& p_green, float& p_blue, float& p_alpha)
|
||||
{
|
||||
if (p_name == NULL) {
|
||||
@ -850,12 +864,14 @@ void LegoROI::SetDisplayBB(int p_displayBB)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100aa340
|
||||
// FUNCTION: BETA10 0x1018cca0
|
||||
float LegoROI::IntrinsicImportance() const
|
||||
{
|
||||
return .5;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100aa350
|
||||
// FUNCTION: BETA10 0x1018ccc0
|
||||
void LegoROI::UpdateWorldBoundingVolumes()
|
||||
{
|
||||
CalcWorldBoundingVolumes(m_sphere, m_local2world, m_world_bounding_box, m_world_bounding_sphere);
|
||||
|
@ -17,6 +17,7 @@ class LegoTreeNode;
|
||||
struct LegoAnimActorEntry;
|
||||
|
||||
// VTABLE: LEGO1 0x100dbe38
|
||||
// VTABLE: BETA10 0x101c3898
|
||||
// SIZE 0x108
|
||||
class LegoROI : public ViewROI {
|
||||
public:
|
||||
@ -57,7 +58,7 @@ public:
|
||||
void SetDisplayBB(int p_displayBB);
|
||||
|
||||
static LegoResult CreateLocalTransform(LegoAnimNodeData* p_data, LegoTime p_time, Matrix4& p_matrix);
|
||||
static void FUN_100a81b0(const LegoChar* p_error, const LegoChar* p_name);
|
||||
static void FUN_100a81b0(const LegoChar* p_error, ...);
|
||||
static void configureLegoROI(int p_roi);
|
||||
static void SetColorOverride(ColorOverride p_colorOverride);
|
||||
static LegoBool GetRGBAColor(const LegoChar* p_name, float& p_red, float& p_green, float& p_blue, float& p_alpha);
|
||||
@ -86,6 +87,7 @@ public:
|
||||
void SetBoundingBox(const BoundingBox& p_box) { m_bounding_box = p_box; }
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100a82b0
|
||||
// SYNTHETIC: BETA10 0x1018c490
|
||||
// LegoROI::`scalar deleting destructor'
|
||||
|
||||
private:
|
||||
@ -96,15 +98,20 @@ private:
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100dbea8
|
||||
// VTABLE: BETA10 0x101c38d0
|
||||
// SIZE 0x10c
|
||||
class TimeROI : public LegoROI {
|
||||
public:
|
||||
TimeROI(Tgl::Renderer* p_renderer, ViewLODList* p_lodList, LegoTime p_time);
|
||||
|
||||
void FUN_100a9b40(Matrix4& p_matrix, LegoTime p_time);
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100a9ad0
|
||||
// SYNTHETIC: BETA10 0x1018c540
|
||||
// TimeROI::`scalar deleting destructor'
|
||||
|
||||
void FUN_100a9b40(Matrix4& p_matrix, LegoTime p_time);
|
||||
// SYNTHETIC: BETA10 0x1018c580
|
||||
// TimeROI::~TimeROI
|
||||
|
||||
private:
|
||||
LegoTime m_time; // 0x108
|
||||
|
@ -108,6 +108,7 @@ void OrientableROI::SetLocal2World(const Matrix4& p_local2world)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a5910
|
||||
// FUNCTION: BETA10 0x10167bac
|
||||
void OrientableROI::UpdateWorldData()
|
||||
{
|
||||
UpdateWorldBoundingVolumes();
|
||||
@ -115,6 +116,7 @@ void OrientableROI::UpdateWorldData()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a5930
|
||||
// FUNCTION: BETA10 0x10167bd8
|
||||
void OrientableROI::SetLocal2WorldWithWorldDataUpdate(const Matrix4& p_transform)
|
||||
{
|
||||
m_local2world = p_transform;
|
||||
@ -123,6 +125,7 @@ void OrientableROI::SetLocal2WorldWithWorldDataUpdate(const Matrix4& p_transform
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a5960
|
||||
// FUNCTION: BETA10 0x10167c19
|
||||
void OrientableROI::UpdateWorldDataWithTransform(const Matrix4& p_transform)
|
||||
{
|
||||
MxMatrix l_matrix(m_local2world);
|
||||
@ -132,6 +135,7 @@ void OrientableROI::UpdateWorldDataWithTransform(const Matrix4& p_transform)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a59b0
|
||||
// FUNCTION: BETA10 0x10167c6d
|
||||
void OrientableROI::UpdateWorldDataWithTransformAndChildren(const Matrix4& p_transform)
|
||||
{
|
||||
MxMatrix l_matrix(m_local2world);
|
||||
@ -155,11 +159,13 @@ void OrientableROI::SetWorldVelocity(const Vector3& p_world_velocity)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a5a50
|
||||
// FUNCTION: BETA10 0x10167d65
|
||||
void OrientableROI::UpdateWorldVelocity()
|
||||
{
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a5a60
|
||||
// FUNCTION: BETA10 0x10167d7b
|
||||
void CalcWorldBoundingVolumes(
|
||||
const BoundingSphere& modelling_sphere,
|
||||
const Matrix4& local2world,
|
||||
@ -186,18 +192,21 @@ void CalcWorldBoundingVolumes(
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a5d80
|
||||
// FUNCTION: BETA10 0x10168760
|
||||
const float* OrientableROI::GetWorldVelocity() const
|
||||
{
|
||||
return m_world_velocity.GetData();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a5d90
|
||||
// FUNCTION: BETA10 0x10168790
|
||||
const BoundingBox& OrientableROI::GetWorldBoundingBox() const
|
||||
{
|
||||
return m_world_bounding_box;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a5da0
|
||||
// FUNCTION: BETA10 0x101687b0
|
||||
const BoundingSphere& OrientableROI::GetWorldBoundingSphere() const
|
||||
{
|
||||
return m_world_bounding_sphere;
|
||||
|
@ -23,6 +23,7 @@ public:
|
||||
const BoundingSphere& GetWorldBoundingSphere() const override; // vtable+0x10
|
||||
|
||||
// FUNCTION: LEGO1 0x100a5db0
|
||||
// FUNCTION: BETA10 0x101687d0
|
||||
virtual void WrappedUpdateWorldData() { UpdateWorldData(); } // vtable+0x14
|
||||
|
||||
virtual void UpdateWorldBoundingVolumes() = 0; // vtable+0x18
|
||||
@ -81,6 +82,7 @@ protected:
|
||||
// OrientableROI::`scalar deleting destructor'
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100aa2f0
|
||||
// SYNTHETIC: BETA10 0x10168600
|
||||
// OrientableROI::~OrientableROI
|
||||
|
||||
#endif // ORIENTABLEROI_H
|
||||
|
@ -15,9 +15,16 @@
|
||||
// SIZE 0x28
|
||||
class BoundingBox {
|
||||
public:
|
||||
// The BETA10 matches may reference the wrong version
|
||||
|
||||
// FUNCTION: BETA10 0x1004a7a0
|
||||
const Vector3& Min() const { return min; }
|
||||
|
||||
Vector3& Min() { return min; }
|
||||
|
||||
// FUNCTION: BETA10 0x1004a7c0
|
||||
const Vector3& Max() const { return max; }
|
||||
|
||||
Vector3& Max() { return max; }
|
||||
|
||||
private:
|
||||
@ -31,14 +38,26 @@ private:
|
||||
// SIZE 0x18
|
||||
class BoundingSphere {
|
||||
public:
|
||||
// The BETA10 matches may reference the wrong version
|
||||
|
||||
// FUNCTION: BETA10 0x1001fac0
|
||||
const Vector3& Center() const { return center; }
|
||||
|
||||
// FUNCTION: BETA10 0x100d55a0
|
||||
Vector3& Center() { return center; }
|
||||
|
||||
// FUNCTION: BETA10 0x1001fd30
|
||||
const float& Radius() const { return radius; }
|
||||
|
||||
// FUNCTION: BETA10 0x1001fae0
|
||||
float& Radius() { return radius; }
|
||||
|
||||
// SYNTHETIC: BETA10 0x1001fb90
|
||||
// BoundingSphere::operator=
|
||||
|
||||
// SYNTHETIC: BETA10 0x1001fc50
|
||||
// BoundingSphere::BoundingSphere
|
||||
|
||||
private:
|
||||
Mx3DPointFloat center; // 0x00
|
||||
float radius; // 0x14
|
||||
@ -136,6 +155,7 @@ protected:
|
||||
// list<ROI *,allocator<ROI *> >::~list<ROI *,allocator<ROI *> >
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100a5d50
|
||||
// SYNTHETIC: BETA10 0x101686a0
|
||||
// ROI::~ROI
|
||||
|
||||
#endif // ROI_H
|
||||
|
@ -16,65 +16,60 @@ float ViewROI::IntrinsicImportance() const
|
||||
} // for now
|
||||
|
||||
// FUNCTION: LEGO1 0x100a9ec0
|
||||
// FUNCTION: BETA10 0x1018c740
|
||||
Tgl::Group* ViewROI::GetGeometry()
|
||||
{
|
||||
return geometry;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a9ed0
|
||||
// FUNCTION: BETA10 0x1018c760
|
||||
const Tgl::Group* ViewROI::GetGeometry() const
|
||||
{
|
||||
return geometry;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a9ee0
|
||||
// FUNCTION: BETA10 0x1018c780
|
||||
void ViewROI::UpdateWorldDataWithTransformAndChildren(const Matrix4& parent2world)
|
||||
{
|
||||
OrientableROI::UpdateWorldDataWithTransformAndChildren(parent2world);
|
||||
SetGeometryTransformation();
|
||||
}
|
||||
|
||||
// FUNCTION: BETA10 0x1018c7b0
|
||||
inline void ViewROI::SetGeometryTransformation()
|
||||
{
|
||||
if (geometry) {
|
||||
Tgl::FloatMatrix4 matrix;
|
||||
Matrix4 in(matrix);
|
||||
SETMAT4(in, m_local2world);
|
||||
Tgl::Result result = geometry->SetTransformation(matrix);
|
||||
// assert(Tgl::Succeeded(result));
|
||||
geometry->SetTransformation(matrix);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a9fc0
|
||||
// FUNCTION: BETA10 0x1018cad0
|
||||
void ViewROI::UpdateWorldDataWithTransform(const Matrix4& p_transform)
|
||||
{
|
||||
OrientableROI::UpdateWorldDataWithTransform(p_transform);
|
||||
if (geometry) {
|
||||
Tgl::FloatMatrix4 matrix;
|
||||
Matrix4 in(matrix);
|
||||
SETMAT4(in, m_local2world);
|
||||
geometry->SetTransformation(matrix);
|
||||
}
|
||||
SetGeometryTransformation();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100aa0a0
|
||||
// FUNCTION: BETA10 0x1018cb00
|
||||
void ViewROI::SetLocal2WorldWithWorldDataUpdate(const Matrix4& p_transform)
|
||||
{
|
||||
OrientableROI::SetLocal2WorldWithWorldDataUpdate(p_transform);
|
||||
if (geometry) {
|
||||
Tgl::FloatMatrix4 matrix;
|
||||
Matrix4 in(matrix);
|
||||
SETMAT4(in, m_local2world);
|
||||
geometry->SetTransformation(matrix);
|
||||
}
|
||||
SetGeometryTransformation();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100aa180
|
||||
// FUNCTION: BETA10 0x1018cb30
|
||||
void ViewROI::UpdateWorldData()
|
||||
{
|
||||
OrientableROI::UpdateWorldData();
|
||||
if (geometry) {
|
||||
Tgl::FloatMatrix4 matrix;
|
||||
Matrix4 in(matrix);
|
||||
SETMAT4(in, m_local2world);
|
||||
geometry->SetTransformation(matrix);
|
||||
}
|
||||
SetGeometryTransformation();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100aa500
|
||||
|
@ -13,6 +13,7 @@
|
||||
*/
|
||||
|
||||
// VTABLE: LEGO1 0x100dbe70
|
||||
// VTABLE: BETA10 0x101c3908
|
||||
// SIZE 0xe4
|
||||
class ViewROI : public OrientableROI {
|
||||
public:
|
||||
@ -21,6 +22,7 @@ public:
|
||||
c_lodLevelInvisible = -2,
|
||||
};
|
||||
|
||||
// FUNCTION: BETA10 0x1018c5e0
|
||||
ViewROI(Tgl::Renderer* pRenderer, ViewLODList* lodList)
|
||||
{
|
||||
SetLODList(lodList);
|
||||
@ -29,6 +31,7 @@ public:
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a9e20
|
||||
// FUNCTION: BETA10 0x1018c680
|
||||
~ViewROI() override
|
||||
{
|
||||
// SetLODList() will decrease refCount of LODList
|
||||
@ -36,6 +39,7 @@ public:
|
||||
delete geometry;
|
||||
}
|
||||
|
||||
// FUNCTION: BETA10 0x1007b540
|
||||
void SetLODList(ViewLODList* lodList)
|
||||
{
|
||||
// ??? inherently type unsafe - kind of... because, now, ROI
|
||||
@ -69,6 +73,8 @@ public:
|
||||
protected:
|
||||
void UpdateWorldDataWithTransformAndChildren(const Matrix4& parent2world) override; // vtable+0x28
|
||||
|
||||
void SetGeometryTransformation();
|
||||
|
||||
Tgl::Group* geometry; // 0xdc
|
||||
int m_lodLevel; // 0xe0
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user