2024-03-09 15:07:52 -05:00
|
|
|
#ifndef LEGOCHARACTERMANAGER_H
|
|
|
|
#define LEGOCHARACTERMANAGER_H
|
2023-10-12 12:18:24 -04:00
|
|
|
|
|
|
|
#include "decomp.h"
|
2024-03-23 10:09:20 -04:00
|
|
|
#include "legoextraactor.h"
|
2024-02-21 15:30:02 -05:00
|
|
|
#include "legovariables.h"
|
2024-02-23 10:06:16 -05:00
|
|
|
#include "misc/legostorage.h"
|
2024-02-21 15:30:02 -05:00
|
|
|
#include "mxstl/stlcompat.h"
|
2023-10-24 19:38:27 -04:00
|
|
|
#include "mxtypes.h"
|
2023-10-12 12:18:24 -04:00
|
|
|
|
2024-03-19 14:23:34 -04:00
|
|
|
class LegoActor;
|
2024-01-16 14:33:03 -05:00
|
|
|
class LegoROI;
|
2023-10-12 12:18:24 -04:00
|
|
|
|
2024-02-21 15:30:02 -05:00
|
|
|
#pragma warning(disable : 4237)
|
|
|
|
|
|
|
|
// TODO: generic string comparator?
|
2024-03-19 14:23:34 -04:00
|
|
|
struct LegoCharacterComparator {
|
|
|
|
MxBool operator()(const char* const& p_a, const char* const& p_b) const { return strcmpi(p_a, p_b) < 0; }
|
2024-02-21 15:30:02 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
// SIZE 0x08
|
2024-03-19 14:23:34 -04:00
|
|
|
struct LegoCharacter {
|
|
|
|
LegoCharacter(LegoROI* p_roi)
|
|
|
|
{
|
|
|
|
m_roi = p_roi;
|
|
|
|
m_refCount = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void AddRef() { m_refCount++; }
|
2024-03-19 15:54:13 -04:00
|
|
|
|
|
|
|
LegoROI* m_roi; // 0x00
|
|
|
|
MxU32 m_refCount; // 0x04
|
2024-02-21 15:30:02 -05:00
|
|
|
};
|
|
|
|
|
2024-03-22 13:40:19 -04:00
|
|
|
struct LegoCharacterData;
|
2024-02-21 15:30:02 -05:00
|
|
|
|
2024-03-22 13:40:19 -04:00
|
|
|
typedef map<const char*, LegoCharacter*, LegoCharacterComparator> LegoCharacterMap;
|
2023-10-12 12:18:24 -04:00
|
|
|
|
2024-02-10 20:52:16 -05:00
|
|
|
// SIZE 0x08
|
2024-03-09 15:07:52 -05:00
|
|
|
class LegoCharacterManager {
|
2024-01-16 14:33:03 -05:00
|
|
|
public:
|
2024-03-09 15:07:52 -05:00
|
|
|
LegoCharacterManager();
|
2024-02-10 20:52:16 -05:00
|
|
|
|
2024-03-22 13:40:19 -04:00
|
|
|
MxResult Write(LegoStorage* p_storage);
|
|
|
|
MxResult Read(LegoStorage* p_storage);
|
2024-03-19 14:23:34 -04:00
|
|
|
LegoROI* GetROI(const char* p_key, MxBool p_createEntity);
|
2024-02-21 15:30:02 -05:00
|
|
|
|
2024-03-22 13:40:19 -04:00
|
|
|
void Init();
|
2024-02-21 15:30:02 -05:00
|
|
|
static void SetCustomizeAnimFile(const char* p_value);
|
2024-03-29 13:30:46 -04:00
|
|
|
static MxBool Exists(const char* p_key);
|
2024-02-21 15:30:02 -05:00
|
|
|
|
2024-02-05 12:35:26 -05:00
|
|
|
void FUN_100832a0();
|
2024-03-29 13:30:31 -04:00
|
|
|
MxU32 GetRefCount(LegoROI* p_roi);
|
2024-01-16 14:33:03 -05:00
|
|
|
void FUN_10083db0(LegoROI* p_roi);
|
2024-02-13 18:34:14 -05:00
|
|
|
void FUN_10083f10(LegoROI* p_roi);
|
2024-03-29 13:30:46 -04:00
|
|
|
LegoExtraActor* GetActor(const char* p_key);
|
|
|
|
LegoCharacterData* GetData(const char* p_key);
|
2024-03-15 22:20:44 -04:00
|
|
|
MxBool FUN_10084ec0(LegoROI* p_roi);
|
2024-03-06 14:12:20 -05:00
|
|
|
MxU32 FUN_10085140(LegoROI*, MxBool);
|
2024-03-29 13:30:46 -04:00
|
|
|
LegoROI* FUN_10085210(const char*, char*, undefined);
|
|
|
|
LegoROI* FUN_10085a80(char* p_und1, char* p_und2, undefined p_und3);
|
2024-02-10 20:52:16 -05:00
|
|
|
|
2024-03-06 14:12:20 -05:00
|
|
|
static const char* GetCustomizeAnimFile() { return g_customizeAnimFile; }
|
|
|
|
|
2024-02-10 20:52:16 -05:00
|
|
|
private:
|
2024-03-19 14:23:34 -04:00
|
|
|
LegoROI* CreateROI(const char* p_key);
|
|
|
|
|
2024-02-21 15:30:02 -05:00
|
|
|
static char* g_customizeAnimFile;
|
|
|
|
|
2024-03-19 14:23:34 -04:00
|
|
|
LegoCharacterMap* m_characters; // 0x00
|
2024-02-21 15:30:02 -05:00
|
|
|
CustomizeAnimFileVariable* m_customizeAnimFile; // 0x04
|
2023-10-12 12:18:24 -04:00
|
|
|
};
|
|
|
|
|
2024-02-21 15:30:02 -05:00
|
|
|
// clang-format off
|
2024-03-22 13:40:19 -04:00
|
|
|
// TEMPLATE: LEGO1 0x1001a690
|
|
|
|
// list<ROI *,allocator<ROI *> >::_Buynode
|
|
|
|
|
|
|
|
// TEMPLATE: LEGO1 0x10035790
|
|
|
|
// _Construct
|
|
|
|
|
2024-03-19 14:23:34 -04:00
|
|
|
// 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 *> >
|
|
|
|
|
|
|
|
// TEMPLATE: LEGO1 0x10082c60
|
|
|
|
// _Tree<char const *,pair<char const * const,LegoCharacter *>,map<char const *,LegoCharacter *,LegoCharacterComparator,allocator<LegoCharacter *> >::_Kfn,LegoCharacterComparator,allocator<LegoCharacter *> >::iterator::_Inc
|
|
|
|
|
|
|
|
// TEMPLATE: LEGO1 0x10082ca0
|
|
|
|
// _Tree<char const *,pair<char const * const,LegoCharacter *>,map<char const *,LegoCharacter *,LegoCharacterComparator,allocator<LegoCharacter *> >::_Kfn,LegoCharacterComparator,allocator<LegoCharacter *> >::erase
|
2024-02-21 15:30:02 -05:00
|
|
|
|
2024-03-19 14:23:34 -04:00
|
|
|
// TEMPLATE: LEGO1 0x100830f0
|
|
|
|
// _Tree<char const *,pair<char const * const,LegoCharacter *>,map<char const *,LegoCharacter *,LegoCharacterComparator,allocator<LegoCharacter *> >::_Kfn,LegoCharacterComparator,allocator<LegoCharacter *> >::_Erase
|
2024-02-21 15:30:02 -05:00
|
|
|
|
2024-03-19 14:23:34 -04:00
|
|
|
// TEMPLATE: LEGO1 0x10083130
|
|
|
|
// map<char *,LegoCharacter *,LegoCharacterComparator,allocator<LegoCharacter *> >::~map<char *,LegoCharacter *,LegoCharacterComparator,allocator<LegoCharacter *> >
|
2024-02-21 15:30:02 -05:00
|
|
|
|
2024-03-19 14:23:34 -04:00
|
|
|
// TEMPLATE: LEGO1 0x10083840
|
|
|
|
// _Tree<char const *,pair<char const * const,LegoCharacter *>,map<char const *,LegoCharacter *,LegoCharacterComparator,allocator<LegoCharacter *> >::_Kfn,LegoCharacterComparator,allocator<LegoCharacter *> >::iterator::_Dec
|
2024-02-21 15:30:02 -05:00
|
|
|
|
2024-03-19 14:23:34 -04:00
|
|
|
// TEMPLATE: LEGO1 0x10083890
|
|
|
|
// _Tree<char const *,pair<char const * const,LegoCharacter *>,map<char const *,LegoCharacter *,LegoCharacterComparator,allocator<LegoCharacter *> >::_Kfn,LegoCharacterComparator,allocator<LegoCharacter *> >::_Insert
|
2024-02-21 15:30:02 -05:00
|
|
|
|
|
|
|
// GLOBAL: LEGO1 0x100fc508
|
2024-03-19 14:23:34 -04:00
|
|
|
// _Tree<char const *,pair<char const * const,LegoCharacter *>,map<char const *,LegoCharacter *,LegoCharacterComparator,allocator<LegoCharacter *> >::_Kfn,LegoCharacterComparator,allocator<LegoCharacter *> >::_Nil
|
2024-02-21 15:30:02 -05:00
|
|
|
// clang-format on
|
|
|
|
|
2024-03-09 15:07:52 -05:00
|
|
|
#endif // LEGOCHARACTERMANAGER_H
|