2023-06-29 04:10:08 -04:00
|
|
|
#ifndef LEGOPLANTMANAGER_H
|
|
|
|
#define LEGOPLANTMANAGER_H
|
|
|
|
|
2024-01-12 17:27:07 -05:00
|
|
|
#include "decomp.h"
|
2023-06-29 04:10:08 -04:00
|
|
|
#include "mxcore.h"
|
|
|
|
|
2024-03-15 22:20:44 -04:00
|
|
|
class LegoEntity;
|
2024-06-17 14:11:27 -04:00
|
|
|
class LegoPathBoundary;
|
2024-06-19 12:57:05 -04:00
|
|
|
struct LegoPlantInfo;
|
2024-03-06 14:12:20 -05:00
|
|
|
class LegoROI;
|
2024-05-03 12:19:12 -04:00
|
|
|
class LegoStorage;
|
2024-06-18 13:35:03 -04:00
|
|
|
class LegoWorld;
|
2024-03-06 14:12:20 -05:00
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// VTABLE: LEGO1 0x100d6758
|
2023-06-29 04:10:08 -04:00
|
|
|
// SIZE 0x2c
|
2023-10-24 19:38:27 -04:00
|
|
|
class LegoPlantManager : public MxCore {
|
2023-06-29 04:10:08 -04:00
|
|
|
public:
|
2024-07-01 19:14:04 -04:00
|
|
|
// SIZE 0x0c
|
|
|
|
struct AnimEntry {
|
|
|
|
LegoEntity* m_entity; // 0x00
|
|
|
|
LegoROI* m_roi; // 0x04
|
|
|
|
MxLong m_time; // 0x08
|
|
|
|
};
|
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
LegoPlantManager();
|
2024-02-01 15:42:10 -05:00
|
|
|
~LegoPlantManager() override; // vtable+0x00
|
2023-06-29 04:10:08 -04:00
|
|
|
|
2024-02-01 15:42:10 -05:00
|
|
|
MxResult Tickle() override; // vtable+0x08
|
2023-06-29 04:10:08 -04:00
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// FUNCTION: LEGO1 0x10026290
|
2024-01-29 16:17:17 -05:00
|
|
|
inline const char* ClassName() const override // vtable+0x0c
|
2023-10-24 19:38:27 -04:00
|
|
|
{
|
2023-12-27 15:59:42 -05:00
|
|
|
// STRING: LEGO1 0x100f318c
|
2023-10-24 19:38:27 -04:00
|
|
|
return "LegoPlantManager";
|
|
|
|
}
|
2023-06-29 04:10:08 -04:00
|
|
|
|
2024-02-28 15:03:27 -05:00
|
|
|
void Init();
|
2024-06-18 13:35:03 -04:00
|
|
|
void LoadWorldInfo(MxS32 p_worldId);
|
2024-06-19 12:02:54 -04:00
|
|
|
void Reset(MxS32 p_worldId);
|
2024-06-17 14:11:27 -04:00
|
|
|
MxResult Write(LegoStorage* p_storage);
|
2024-04-21 09:42:08 -04:00
|
|
|
MxResult Read(LegoStorage* p_storage);
|
2024-06-05 13:40:44 -04:00
|
|
|
MxBool SwitchColor(LegoEntity* p_entity);
|
|
|
|
MxBool SwitchVariant(LegoEntity* p_entity);
|
|
|
|
MxBool SwitchSound(LegoEntity* p_entity);
|
|
|
|
MxBool SwitchMove(LegoEntity* p_entity);
|
|
|
|
MxBool SwitchMood(LegoEntity* p_entity);
|
2024-06-19 12:57:05 -04:00
|
|
|
MxU32 GetAnimationId(LegoEntity* p_entity);
|
|
|
|
MxU32 GetSoundId(LegoEntity* p_entity, MxBool p_state);
|
2024-06-25 11:28:10 -04:00
|
|
|
MxBool FUN_10026c50(LegoEntity* p_entity);
|
2024-07-01 19:14:04 -04:00
|
|
|
void ScheduleAnimation(LegoEntity* p_entity, MxLong p_length);
|
2024-02-05 12:35:26 -05:00
|
|
|
void FUN_10027120();
|
2024-01-12 17:27:07 -05:00
|
|
|
|
2024-02-21 15:30:02 -05:00
|
|
|
static void SetCustomizeAnimFile(const char* p_value);
|
2024-06-05 13:00:46 -04:00
|
|
|
static const char* GetCustomizeAnimFile() { return g_customizeAnimFile; }
|
2024-02-21 15:30:02 -05:00
|
|
|
|
2024-01-18 08:34:14 -05:00
|
|
|
// SYNTHETIC: LEGO1 0x100262a0
|
|
|
|
// LegoPlantManager::`scalar deleting destructor'
|
|
|
|
|
2023-06-29 04:10:08 -04:00
|
|
|
private:
|
2024-06-18 13:35:03 -04:00
|
|
|
LegoEntity* CreatePlant(MxS32 p_index, LegoWorld* p_world, MxS32 p_worldId);
|
2024-06-19 12:02:54 -04:00
|
|
|
void RemovePlant(MxS32 p_index, MxS32 p_worldId);
|
|
|
|
void FUN_10026860(MxS32 p_index);
|
2024-06-19 12:57:05 -04:00
|
|
|
LegoPlantInfo* GetInfo(LegoEntity* p_entity);
|
2024-06-25 11:28:10 -04:00
|
|
|
MxBool FUN_10026c80(MxS32 p_index);
|
2024-07-01 19:14:04 -04:00
|
|
|
void FUN_100271b0(LegoEntity* p_entity, MxS32 p_adjust);
|
2024-06-18 13:35:03 -04:00
|
|
|
|
2024-02-21 15:30:02 -05:00
|
|
|
static char* g_customizeAnimFile;
|
2024-06-19 12:57:05 -04:00
|
|
|
static MxS32 g_maxMove[4];
|
|
|
|
static MxU32 g_maxSound;
|
2024-02-21 15:30:02 -05:00
|
|
|
|
2024-06-19 12:02:54 -04:00
|
|
|
MxS32 m_worldId; // 0x08
|
|
|
|
undefined m_unk0x0c; // 0x0c
|
2024-07-01 19:14:04 -04:00
|
|
|
AnimEntry* m_entries[5]; // 0x10
|
|
|
|
MxS8 m_numEntries; // 0x24
|
|
|
|
LegoWorld* m_world; // 0x28
|
2023-06-29 04:10:08 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // LEGOPLANTMANAGER_H
|