mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 00:14:22 +00:00
Implement LegoCharacterManager::CreateROI (#709)
* WIP * Create globals * Add Read * Name Init * Add LegoCharacter init data * Add define for NULL * Use MxS8 * Add LegoCharacterLOD * WIP CreateROI * Fix * WIP * Match * Match * Match, implement Find * Fix MeshBuilder * Fix * space
This commit is contained in:

committed by
GitHub

parent
8cffa7cf8c
commit
68bb20f04f
@@ -31,50 +31,27 @@ struct LegoCharacter {
|
||||
MxU32 m_refCount; // 0x04
|
||||
};
|
||||
|
||||
typedef map<const char*, LegoCharacter*, LegoCharacterComparator> LegoCharacterMap;
|
||||
struct LegoCharacterData;
|
||||
|
||||
struct LegoSaveDataEntry3 {
|
||||
char* m_name;
|
||||
void* m_unk0x04;
|
||||
LegoActor* m_actor;
|
||||
MxS32 m_savePart1;
|
||||
MxS32 m_savePart2;
|
||||
MxU8 m_savePart3;
|
||||
undefined4 m_unk0x18[6];
|
||||
MxU8 m_frameOffsetInDwords; // 0x30
|
||||
MxS32* m_pFrameData;
|
||||
MxU8 m_currentFrame;
|
||||
undefined4 m_unk0x3c[2];
|
||||
MxU8 m_savePart5; // 0x44
|
||||
undefined4 m_unk0x48[5];
|
||||
MxU8 m_savePart6; // 0x5c
|
||||
undefined4 m_unk0x60[11];
|
||||
MxU8 m_savePart7; // 0x8c
|
||||
undefined4 m_unk0x90[5];
|
||||
MxU8 m_savePart8; // 0xa4
|
||||
undefined4 m_unk0xa8[17];
|
||||
MxU8 m_savePart9; // 0xec
|
||||
undefined4 m_unk0xf0[5];
|
||||
MxU8 m_savePart10; // 0x104
|
||||
};
|
||||
typedef map<const char*, LegoCharacter*, LegoCharacterComparator> LegoCharacterMap;
|
||||
|
||||
// SIZE 0x08
|
||||
class LegoCharacterManager {
|
||||
public:
|
||||
LegoCharacterManager();
|
||||
|
||||
MxResult WriteSaveData3(LegoStorage* p_storage);
|
||||
MxResult ReadSaveData3(LegoStorage* p_storage);
|
||||
MxResult Write(LegoStorage* p_storage);
|
||||
MxResult Read(LegoStorage* p_storage);
|
||||
LegoROI* GetROI(const char* p_key, MxBool p_createEntity);
|
||||
|
||||
void InitSaveData();
|
||||
void Init();
|
||||
static void SetCustomizeAnimFile(const char* p_value);
|
||||
static MxBool FUN_10084c00(const LegoChar*);
|
||||
|
||||
void FUN_100832a0();
|
||||
void FUN_10083db0(LegoROI* p_roi);
|
||||
void FUN_10083f10(LegoROI* p_roi);
|
||||
LegoSaveDataEntry3* FUN_10084c60(const char* p_key);
|
||||
LegoCharacterData* Find(const char* p_key);
|
||||
MxBool FUN_10084ec0(LegoROI* p_roi);
|
||||
MxU32 FUN_10085140(LegoROI*, MxBool);
|
||||
LegoROI* FUN_10085210(const LegoChar*, LegoChar*, undefined);
|
||||
@@ -92,6 +69,12 @@ private:
|
||||
};
|
||||
|
||||
// clang-format off
|
||||
// TEMPLATE: LEGO1 0x1001a690
|
||||
// list<ROI *,allocator<ROI *> >::_Buynode
|
||||
|
||||
// TEMPLATE: LEGO1 0x10035790
|
||||
// _Construct
|
||||
|
||||
// TEMPLATE: LEGO1 0x10082b90
|
||||
// _Tree<char const *,pair<char const * const,LegoCharacter *>,map<char const *,LegoCharacter *,LegoCharacterComparator,allocator<LegoCharacter *> >::_Kfn,LegoCharacterComparator,allocator<LegoCharacter *> >::~_Tree<char const *,pair<char const * const,LegoCharacter *>,map<char const *,LegoCharacter *,LegoCharacterComparator,allocator<LegoCharacter *> >::_Kfn,LegoCharacterComparator,allocator<LegoCharacter *> >
|
||||
|
||||
|
51
LEGO1/lego/legoomni/include/legocharacters.h
Normal file
51
LEGO1/lego/legoomni/include/legocharacters.h
Normal file
@@ -0,0 +1,51 @@
|
||||
#ifndef LEGOCHARACTERS_H
|
||||
#define LEGOCHARACTERS_H
|
||||
|
||||
#include "decomp.h"
|
||||
#include "mxtypes.h"
|
||||
|
||||
class LegoActor;
|
||||
class LegoROI;
|
||||
|
||||
// SIZE 0x108
|
||||
struct LegoCharacterData {
|
||||
// SIZE 0x18
|
||||
struct Part {
|
||||
MxU8* m_unk0x00; // 0x00
|
||||
const char** m_unk0x04; // 0x04
|
||||
MxU8 m_unk0x08; // 0x08
|
||||
MxU8* m_unk0x0c; // 0x0c
|
||||
const char** m_unk0x10; // 0x10
|
||||
MxU8 m_unk0x14; // 0x14
|
||||
};
|
||||
|
||||
char* m_name; // 0x00
|
||||
LegoROI* m_roi; // 0x04
|
||||
LegoActor* m_actor; // 0x08
|
||||
MxS32 m_unk0x0c; // 0x0c
|
||||
MxS32 m_unk0x10; // 0x10
|
||||
MxU8 m_unk0x14; // 0x14
|
||||
Part m_parts[10]; // 0x18
|
||||
};
|
||||
|
||||
// SIZE 0x58
|
||||
struct LegoCharacterLOD {
|
||||
enum {
|
||||
c_flag1 = 0x01,
|
||||
c_flag2 = 0x02
|
||||
};
|
||||
|
||||
const char* m_name; // 0x00
|
||||
const char* m_parentName; // 0x04
|
||||
MxU32 m_flags; // 0x08
|
||||
float m_boundingSphere[4]; // 0x0c
|
||||
float m_boundingBox[6]; // 0x1c
|
||||
float m_position[3]; // 0x34
|
||||
float m_direction[3]; // 0x40
|
||||
float m_up[3]; // 0x4c
|
||||
};
|
||||
|
||||
extern LegoCharacterData g_characterDataInit[66];
|
||||
extern LegoCharacterLOD g_characterLODs[11];
|
||||
|
||||
#endif // LEGOCHARACTERS_H
|
Reference in New Issue
Block a user