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"
|
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);
|
2024-11-10 11:35:44 -05:00
|
|
|
typedef unsigned char (*TextureHandler)(const char*, unsigned 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-09 10:49:13 -05:00
|
|
|
class LegoTextureInfo;
|
2024-02-24 11:48:16 -05:00
|
|
|
class LegoStorage;
|
|
|
|
class LegoAnim;
|
2024-03-08 14:28:52 -05:00
|
|
|
class LegoAnimNodeData;
|
|
|
|
class LegoTreeNode;
|
2024-03-26 13:51:52 -04:00
|
|
|
struct LegoAnimActorEntry;
|
2024-01-16 14:33:03 -05:00
|
|
|
|
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-04-16 10:07:13 -04:00
|
|
|
LegoROI* FindChildROI(const LegoChar* p_name, LegoROI* p_roi);
|
2024-03-08 14:28:52 -05:00
|
|
|
LegoResult FUN_100a8da0(LegoTreeNode* p_node, const Matrix4& p_matrix, LegoTime p_time, LegoROI* p_roi);
|
2024-04-24 08:51:20 -04:00
|
|
|
static void FUN_100a8e80(LegoTreeNode* p_node, Matrix4& p_matrix, LegoTime p_time, LegoROI** p_roiMap);
|
|
|
|
static void FUN_100a8fd0(LegoTreeNode* p_node, Matrix4& p_matrix, LegoTime p_time, LegoROI** p_roiMap);
|
2024-03-08 14:28:52 -05:00
|
|
|
LegoResult SetFrame(LegoAnim* p_anim, LegoTime p_time);
|
2024-03-08 15:29:16 -05:00
|
|
|
LegoResult FUN_100a9170(LegoFloat p_red, LegoFloat p_green, LegoFloat p_blue, LegoFloat p_alpha);
|
2024-03-05 12:38:53 -05:00
|
|
|
LegoResult FUN_100a9210(LegoTextureInfo* p_textureInfo);
|
2024-04-17 09:18:34 -04:00
|
|
|
LegoResult GetTexture(LegoTextureInfo*& p_textureInfo);
|
2024-11-05 15:33:51 -05:00
|
|
|
LegoResult FUN_100a9330(LegoFloat p_red, LegoFloat p_green, LegoFloat p_blue, LegoFloat p_alpha);
|
2024-10-05 19:20:45 -04:00
|
|
|
LegoResult FUN_100a9350(const LegoChar* p_color);
|
2024-11-05 15:33:51 -05:00
|
|
|
LegoResult FUN_100a93b0(const LegoChar* p_color);
|
2024-05-25 16:21:05 -04:00
|
|
|
LegoU32 FUN_100a9410(Vector3& p_v1, Vector3& p_v2, float p_f1, float p_f2, Vector3& p_v3, LegoBool p_collideBox);
|
2024-03-22 13:40:19 -04:00
|
|
|
void SetName(const LegoChar* p_name);
|
2024-02-24 11:48:16 -05:00
|
|
|
|
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-10-05 19:20:45 -04:00
|
|
|
void FUN_100a9dd0();
|
2024-01-24 21:16:29 -05:00
|
|
|
void SetDisplayBB(int p_displayBB);
|
2023-11-01 11:12:03 -04:00
|
|
|
|
2024-03-08 14:28:52 -05:00
|
|
|
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);
|
2024-03-05 12:38:53 -05:00
|
|
|
static void FUN_100a9d30(ROIHandler p_func);
|
2024-03-07 14:57:17 -05:00
|
|
|
static LegoBool FUN_100a9bf0(const LegoChar* p_param, float& p_red, float& p_green, float& p_blue, float& p_alpha);
|
|
|
|
static LegoBool ColorAliasLookup(
|
|
|
|
const LegoChar* p_param,
|
2024-01-24 21:16:29 -05:00
|
|
|
float& p_red,
|
|
|
|
float& p_green,
|
|
|
|
float& p_blue,
|
2024-03-07 14:57:17 -05:00
|
|
|
float& p_alpha
|
2023-11-01 11:12:03 -04:00
|
|
|
);
|
2024-03-07 14:57:17 -05:00
|
|
|
static LegoBool FUN_100a9cf0(const LegoChar* p_param, unsigned char* paletteEntries, LegoU32 p_numEntries);
|
2024-01-01 19:17:38 -05:00
|
|
|
|
2024-07-26 13:53:09 -04:00
|
|
|
// FUNCTION: BETA10 0x1000f320
|
2024-07-04 19:06:32 -04:00
|
|
|
const LegoChar* GetName() const { return m_name; }
|
2024-07-26 13:53:09 -04:00
|
|
|
|
2024-11-25 17:24:46 -05:00
|
|
|
// FUNCTION: BETA10 0x10015180
|
2024-07-04 19:06:32 -04:00
|
|
|
LegoEntity* GetEntity() { return m_entity; }
|
2024-11-25 17:24:46 -05:00
|
|
|
|
2024-08-21 16:30:27 -04:00
|
|
|
BoundingSphere& GetBoundingSphere() { return m_sphere; }
|
2024-01-28 09:20:21 -05:00
|
|
|
|
2024-07-04 19:06:32 -04:00
|
|
|
void SetEntity(LegoEntity* p_entity) { m_entity = p_entity; }
|
|
|
|
void SetComp(CompoundObject* p_comp) { comp = p_comp; }
|
|
|
|
void SetBoundingSphere(const BoundingSphere& p_sphere) { m_sphere = m_world_bounding_sphere = p_sphere; }
|
|
|
|
void SetUnknown0x80(const BoundingBox& p_unk0x80) { m_unk0x80 = p_unk0x80; }
|
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-03-05 13:35:28 -05:00
|
|
|
LegoEntity* m_entity; // 0x104
|
2024-02-17 10:07:34 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
// 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'
|
|
|
|
|
2024-03-13 13:46:20 -04:00
|
|
|
void FUN_100a9b40(Matrix4& p_matrix, LegoTime p_time);
|
|
|
|
|
2024-02-17 10:07:34 -05:00
|
|
|
private:
|
2024-03-04 16:57:35 -05:00
|
|
|
LegoTime m_time; // 0x108
|
2023-04-27 22:19:39 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // LEGOROI_H
|