Implement LegoROI::Read and geom library (#627)

* Implement LegoROI::Read and geom library

* Match

* Match

* Fixes

* Fix
This commit is contained in:
Christian Semmler
2024-03-05 12:38:53 -05:00
committed by GitHub
parent ec1fcce08c
commit f6e44b1c1b
12 changed files with 451 additions and 28 deletions

View File

@@ -5,10 +5,11 @@
#include "viewmanager/viewlod.h"
#include "viewmanager/viewroi.h"
typedef unsigned char (*ROIHandler)(char*, char*, unsigned int);
typedef unsigned char (*ROIHandler)(const char*, char*, unsigned int);
class LegoEntity;
class LegoTextureContainer;
struct LegoTextureInfo;
class LegoStorage;
class LegoAnim;
@@ -25,6 +26,8 @@ public:
// FUNCTION: LEGO1 0x100aae80
float VTable0x10() override { return 0.0; } // vtable+0x10
LegoResult Read(Tgl::Renderer*, LegoTextureContainer* p_textureContainer, LegoStorage* p_storage);
// SYNTHETIC: LEGO1 0x100aa430
// LegoLOD::`scalar deleting destructor'
@@ -52,6 +55,8 @@ public:
LegoTextureContainer* p_textureContainer,
LegoStorage* p_storage
);
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
@@ -60,15 +65,15 @@ public:
void SetDisplayBB(int p_displayBB);
static void configureLegoROI(int p_roi);
static void SetSomeHandlerFunction(ROIHandler p_func);
static unsigned char CallTheHandlerFunction(
char* p_param,
static void FUN_100a9d30(ROIHandler p_func);
static unsigned char FUN_100a9bf0(const char* p_param, float& p_red, float& p_green, float& p_blue, float& p_other);
static unsigned char ColorAliasLookup(
const char* p_param,
float& p_red,
float& p_green,
float& p_blue,
float& p_other
);
static unsigned char ColorAliasLookup(char* p_param, float& p_red, float& p_green, float& p_blue, float& p_other);
inline const LegoChar* GetName() const { return m_name; }
inline LegoEntity* GetUnknown0x104() { return m_unk0x104; }
@@ -81,7 +86,7 @@ public:
private:
LegoChar* m_name; // 0xe4
BoundingSphere m_sphere; // 0xe8
undefined4 m_unk0x100; // 0x100
undefined m_unk0x100; // 0x100
LegoEntity* m_unk0x104; // 0x104
};