2023-04-27 22:19:39 -04:00
|
|
|
#ifndef LEGOROI_H
|
|
|
|
#define LEGOROI_H
|
|
|
|
|
2024-02-23 10:06:16 -05:00
|
|
|
#include "misc/legotypes.h"
|
2024-03-04 16:57:35 -05:00
|
|
|
#include "viewmanager/viewlod.h"
|
2023-12-14 11:50:29 -05:00
|
|
|
#include "viewmanager/viewroi.h"
|
2023-11-01 11:12:03 -04:00
|
|
|
|
2024-03-05 12:38:53 -05:00
|
|
|
typedef unsigned char (*ROIHandler)(const char*, char*, unsigned int);
|
2023-11-01 11:12:03 -04:00
|
|
|
|
2024-01-16 14:33:03 -05:00
|
|
|
class LegoEntity;
|
2024-02-24 11:48:16 -05:00
|
|
|
class LegoTextureContainer;
|
2024-03-05 12:38:53 -05:00
|
|
|
struct LegoTextureInfo;
|
2024-02-24 11:48:16 -05:00
|
|
|
class LegoStorage;
|
|
|
|
class LegoAnim;
|
2024-01-16 14:33:03 -05:00
|
|
|
|
2024-03-04 16:57:35 -05:00
|
|
|
// VTABLE: LEGO1 0x100dbf10
|
|
|
|
// SIZE 0x20
|
|
|
|
class LegoLOD : public ViewLOD {
|
|
|
|
public:
|
|
|
|
LegoLOD(Tgl::Renderer*);
|
|
|
|
~LegoLOD() override;
|
|
|
|
|
|
|
|
// FUNCTION: LEGO1 0x100aae70
|
|
|
|
int NumPolys() const override { return m_numPolys; } // vtable+0x0c
|
|
|
|
|
|
|
|
// FUNCTION: LEGO1 0x100aae80
|
|
|
|
float VTable0x10() override { return 0.0; } // vtable+0x10
|
|
|
|
|
2024-03-05 12:38:53 -05:00
|
|
|
LegoResult Read(Tgl::Renderer*, LegoTextureContainer* p_textureContainer, LegoStorage* p_storage);
|
|
|
|
|
2024-03-04 16:57:35 -05:00
|
|
|
// SYNTHETIC: LEGO1 0x100aa430
|
|
|
|
// LegoLOD::`scalar deleting destructor'
|
|
|
|
|
|
|
|
protected:
|
|
|
|
// TODO: Review 1996 version
|
|
|
|
undefined4 m_unk0x0c; // 0x0c
|
|
|
|
undefined4 m_unk0x10; // 0x10
|
|
|
|
undefined4 m_unk0x14; // 0x14
|
|
|
|
LegoU32 m_numPolys; // 0x18
|
|
|
|
undefined4 m_unk0x1c; // 0x1c
|
|
|
|
};
|
|
|
|
|
2024-02-17 10:07:34 -05:00
|
|
|
// VTABLE: LEGO1 0x100dbe38
|
|
|
|
// SIZE 0x108
|
2023-12-14 11:50:29 -05:00
|
|
|
class LegoROI : public ViewROI {
|
2023-04-27 22:19:39 -04:00
|
|
|
public:
|
2024-02-17 10:07:34 -05:00
|
|
|
LegoROI(Tgl::Renderer* p_renderer);
|
|
|
|
LegoROI(Tgl::Renderer* p_renderer, ViewLODList* p_lodList);
|
|
|
|
~LegoROI() override;
|
2024-01-01 19:17:38 -05:00
|
|
|
|
2024-02-24 11:48:16 -05:00
|
|
|
LegoResult Read(
|
|
|
|
OrientableROI* p_unk0xd4,
|
|
|
|
Tgl::Renderer* p_renderer,
|
|
|
|
ViewLODListManager* p_viewLODListManager,
|
|
|
|
LegoTextureContainer* p_textureContainer,
|
|
|
|
LegoStorage* p_storage
|
|
|
|
);
|
2024-03-05 12:38:53 -05:00
|
|
|
LegoResult FUN_100a9170(LegoFloat, LegoFloat, LegoFloat, LegoFloat);
|
|
|
|
LegoResult FUN_100a9210(LegoTextureInfo* p_textureInfo);
|
2024-02-24 11:48:16 -05:00
|
|
|
LegoResult SetFrame(LegoAnim* p_anim, LegoTime p_time);
|
|
|
|
|
2024-02-01 15:42:10 -05:00
|
|
|
float IntrinsicImportance() const override; // vtable+0x04
|
|
|
|
void UpdateWorldBoundingVolumes() override; // vtable+0x18
|
2024-01-16 14:33:03 -05:00
|
|
|
|
2024-01-24 21:16:29 -05:00
|
|
|
void SetDisplayBB(int p_displayBB);
|
|
|
|
static void configureLegoROI(int p_roi);
|
2023-11-01 11:12:03 -04:00
|
|
|
|
2024-03-05 12:38:53 -05:00
|
|
|
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,
|
2024-01-24 21:16:29 -05:00
|
|
|
float& p_red,
|
|
|
|
float& p_green,
|
|
|
|
float& p_blue,
|
|
|
|
float& p_other
|
2023-11-01 11:12:03 -04:00
|
|
|
);
|
2024-01-01 19:17:38 -05:00
|
|
|
|
2024-03-04 16:57:35 -05:00
|
|
|
inline const LegoChar* GetName() const { return m_name; }
|
2024-01-16 14:33:03 -05:00
|
|
|
inline LegoEntity* GetUnknown0x104() { return m_unk0x104; }
|
2024-01-28 09:20:21 -05:00
|
|
|
|
2024-01-16 14:33:03 -05:00
|
|
|
inline void SetUnknown0x104(LegoEntity* p_unk0x104) { m_unk0x104 = p_unk0x104; }
|
2024-01-01 19:17:38 -05:00
|
|
|
|
2024-02-17 10:07:34 -05:00
|
|
|
// SYNTHETIC: LEGO1 0x100a82b0
|
2024-01-18 08:34:14 -05:00
|
|
|
// LegoROI::`scalar deleting destructor'
|
|
|
|
|
2024-01-01 19:17:38 -05:00
|
|
|
private:
|
2024-02-18 12:43:42 -05:00
|
|
|
LegoChar* m_name; // 0xe4
|
2024-02-17 10:07:34 -05:00
|
|
|
BoundingSphere m_sphere; // 0xe8
|
2024-03-05 12:38:53 -05:00
|
|
|
undefined m_unk0x100; // 0x100
|
2024-02-17 10:07:34 -05:00
|
|
|
LegoEntity* m_unk0x104; // 0x104
|
|
|
|
};
|
|
|
|
|
|
|
|
// VTABLE: LEGO1 0x100dbea8
|
|
|
|
// SIZE 0x10c
|
|
|
|
class TimeROI : public LegoROI {
|
|
|
|
public:
|
2024-03-04 16:57:35 -05:00
|
|
|
TimeROI(Tgl::Renderer* p_renderer, ViewLODList* p_lodList, LegoTime p_time);
|
2024-02-17 10:07:34 -05:00
|
|
|
|
|
|
|
// SYNTHETIC: LEGO1 0x100a9ad0
|
|
|
|
// TimeROI::`scalar deleting destructor'
|
|
|
|
|
|
|
|
private:
|
2024-03-04 16:57:35 -05:00
|
|
|
LegoTime m_time; // 0x108
|
2023-04-27 22:19:39 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // LEGOROI_H
|