2023-04-27 22:19:39 -04:00
|
|
|
#ifndef LEGOANIMATIONMANAGER_H
|
|
|
|
#define LEGOANIMATIONMANAGER_H
|
|
|
|
|
2024-03-19 15:54:13 -04:00
|
|
|
#include "actionsfwd.h"
|
2024-01-12 17:27:07 -05:00
|
|
|
#include "decomp.h"
|
2024-05-10 14:07:38 -04:00
|
|
|
#include "legolocations.h"
|
2024-06-03 12:53:25 -04:00
|
|
|
#include "legostate.h"
|
2024-03-15 20:43:45 -04:00
|
|
|
#include "legotraninfolist.h"
|
2023-06-29 04:10:08 -04:00
|
|
|
#include "mxcore.h"
|
2024-05-03 12:19:12 -04:00
|
|
|
#include "mxgeometry/mxgeometry3d.h"
|
2023-06-29 04:10:08 -04:00
|
|
|
|
2024-04-23 04:03:10 -04:00
|
|
|
class LegoAnimPresenter;
|
2024-05-02 09:22:09 -04:00
|
|
|
class LegoEntity;
|
2024-05-10 14:07:38 -04:00
|
|
|
class LegoExtraActor;
|
2024-05-03 12:19:12 -04:00
|
|
|
class LegoFile;
|
2024-05-21 15:03:50 -04:00
|
|
|
class LegoPathActor;
|
2024-05-02 09:22:09 -04:00
|
|
|
class LegoPathBoundary;
|
2024-04-23 04:03:10 -04:00
|
|
|
class LegoROIList;
|
2024-05-18 11:48:07 -04:00
|
|
|
struct LegoUnknown100db7f4;
|
2024-05-10 14:07:38 -04:00
|
|
|
class LegoWorld;
|
2024-05-02 09:22:09 -04:00
|
|
|
class MxDSAction;
|
2024-04-23 04:03:10 -04:00
|
|
|
|
2024-06-03 12:53:25 -04:00
|
|
|
// SIZE 0x30
|
|
|
|
struct ModelInfo {
|
|
|
|
char* m_name; // 0x00
|
|
|
|
MxU8 m_unk0x04; // 0x04
|
|
|
|
float m_location[3]; // 0x08
|
|
|
|
float m_direction[3]; // 0x14
|
|
|
|
float m_up[3]; // 0x20
|
|
|
|
MxU8 m_unk0x2c; // 0x2c
|
|
|
|
};
|
|
|
|
|
|
|
|
// SIZE 0x30
|
|
|
|
struct AnimInfo {
|
|
|
|
char* m_name; // 0x00
|
|
|
|
MxU32 m_objectId; // 0x04
|
|
|
|
MxS16 m_location; // 0x08
|
|
|
|
MxBool m_unk0x0a; // 0x0a
|
|
|
|
MxU8 m_unk0x0b; // 0x0b
|
|
|
|
MxU8 m_unk0x0c; // 0x0c
|
|
|
|
MxU8 m_unk0x0d; // 0x0d
|
|
|
|
float m_unk0x10[4]; // 0x10
|
|
|
|
MxU8 m_modelCount; // 0x20
|
|
|
|
MxU16 m_unk0x22; // 0x22
|
|
|
|
ModelInfo* m_models; // 0x24
|
|
|
|
MxS8 m_unk0x28; // 0x28
|
|
|
|
MxBool m_unk0x29; // 0x29
|
|
|
|
MxS8 m_unk0x2a[3]; // 0x2a
|
|
|
|
};
|
|
|
|
|
|
|
|
// VTABLE: LEGO1 0x100d8d80
|
|
|
|
// SIZE 0x1c
|
|
|
|
class AnimState : public LegoState {
|
|
|
|
public:
|
|
|
|
AnimState();
|
|
|
|
~AnimState() override; // vtable+0x00
|
|
|
|
|
|
|
|
// FUNCTION: LEGO1 0x10065070
|
|
|
|
inline const char* ClassName() const override // vtable+0x0c
|
|
|
|
{
|
|
|
|
// STRING: LEGO1 0x100f0460
|
|
|
|
return "AnimState";
|
|
|
|
}
|
|
|
|
|
|
|
|
// FUNCTION: LEGO1 0x10065080
|
|
|
|
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
|
|
|
{
|
|
|
|
return !strcmp(p_name, AnimState::ClassName()) || LegoState::IsA(p_name);
|
|
|
|
}
|
|
|
|
|
2024-06-14 17:24:34 -04:00
|
|
|
MxBool SetFlag() override; // vtable+0x18
|
|
|
|
MxResult Serialize(LegoFile* p_file) override; // vtable+0x1c
|
2024-06-03 12:53:25 -04:00
|
|
|
|
2024-06-21 14:41:01 -04:00
|
|
|
void CopyToAnims(MxU32, AnimInfo* p_anims, MxU32& p_outExtraCharacterId);
|
|
|
|
void InitFromAnims(MxU32 p_animsLength, AnimInfo* p_anims, MxU32 p_extraCharacterId);
|
2024-06-03 12:53:25 -04:00
|
|
|
|
|
|
|
// SYNTHETIC: LEGO1 0x10065130
|
|
|
|
// AnimState::`scalar deleting destructor'
|
|
|
|
|
|
|
|
private:
|
2024-06-21 14:41:01 -04:00
|
|
|
MxU32 m_extraCharacterId; // 0x08
|
|
|
|
|
2024-06-14 17:24:34 -04:00
|
|
|
// appears to store the length of m_unk0x10
|
2024-06-21 14:41:01 -04:00
|
|
|
MxU32 m_unk0x0c; // 0x0c
|
|
|
|
// dynamically sized array of MxU16, corresponding to AnimInfo::m_unk0x22
|
|
|
|
MxU16* m_unk0x10; // 0x10
|
|
|
|
|
|
|
|
MxU32 m_locationsFlagsLength; // 0x14
|
|
|
|
// dynamically sized array of bools, corresponding to LegoLocation.m_unk0x5c
|
|
|
|
MxBool* m_locationsFlags; // 0x18
|
2024-06-03 12:53:25 -04:00
|
|
|
};
|
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// VTABLE: LEGO1 0x100d8c18
|
2023-06-29 04:10:08 -04:00
|
|
|
// SIZE 0x500
|
2023-10-24 19:38:27 -04:00
|
|
|
class LegoAnimationManager : public MxCore {
|
2023-04-27 22:19:39 -04:00
|
|
|
public:
|
2024-05-10 10:23:47 -04:00
|
|
|
// SIZE 0x18
|
|
|
|
struct Character {
|
|
|
|
char* m_name; // 0x00
|
2024-05-29 13:24:08 -04:00
|
|
|
MxBool m_inExtras; // 0x04
|
2024-05-10 10:23:47 -04:00
|
|
|
MxS8 m_vehicleId; // 0x05
|
|
|
|
undefined m_unk0x06; // 0x06 (unused?)
|
|
|
|
MxBool m_unk0x07; // 0x07
|
|
|
|
MxBool m_unk0x08; // 0x08
|
|
|
|
MxBool m_unk0x09; // 0x09
|
2024-05-17 10:20:04 -04:00
|
|
|
MxS32 m_unk0x0c; // 0x0c
|
2024-05-10 10:23:47 -04:00
|
|
|
MxS32 m_unk0x10; // 0x10
|
|
|
|
MxBool m_active; // 0x14
|
|
|
|
MxU8 m_unk0x15; // 0x15
|
2024-05-17 14:21:48 -04:00
|
|
|
MxS8 m_unk0x16; // 0x16
|
2024-05-10 10:23:47 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
// SIZE 0x08
|
|
|
|
struct Vehicle {
|
2024-05-10 14:07:38 -04:00
|
|
|
char* m_name; // 0x00
|
|
|
|
MxBool m_unk0x04; // 0x04
|
|
|
|
MxBool m_unk0x05; // 0x05
|
2024-05-10 10:23:47 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
// SIZE 0x18
|
|
|
|
struct Extra {
|
|
|
|
LegoROI* m_roi; // 0x00
|
|
|
|
MxS32 m_characterId; // 0x04
|
|
|
|
MxLong m_unk0x08; // 0x08
|
2024-05-17 10:20:04 -04:00
|
|
|
MxBool m_unk0x0c; // 0x0c
|
2024-05-10 10:23:47 -04:00
|
|
|
MxBool m_unk0x0d; // 0x0d
|
2024-05-17 14:21:48 -04:00
|
|
|
float m_speed; // 0x10
|
2024-05-10 10:23:47 -04:00
|
|
|
MxBool m_unk0x14; // 0x14
|
|
|
|
};
|
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
LegoAnimationManager();
|
2024-03-15 20:43:45 -04:00
|
|
|
~LegoAnimationManager() override;
|
2023-06-29 04:10:08 -04:00
|
|
|
|
2024-02-01 15:42:10 -05:00
|
|
|
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
|
|
|
MxResult Tickle() override; // vtable+0x08
|
2023-06-29 04:10:08 -04:00
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// FUNCTION: LEGO1 0x1005ec80
|
2024-02-01 15:42:10 -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 0x100f7508
|
2023-10-24 19:38:27 -04:00
|
|
|
return "LegoAnimationManager";
|
|
|
|
}
|
2023-06-29 04:10:08 -04:00
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// FUNCTION: LEGO1 0x1005ec90
|
2024-02-01 15:42:10 -05:00
|
|
|
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
2023-10-24 19:38:27 -04:00
|
|
|
{
|
2023-12-13 05:48:14 -05:00
|
|
|
return !strcmp(p_name, ClassName()) || MxCore::IsA(p_name);
|
2023-10-24 19:38:27 -04:00
|
|
|
}
|
2023-06-29 04:10:08 -04:00
|
|
|
|
2024-04-27 10:31:50 -04:00
|
|
|
void Reset(MxBool p_und);
|
2024-04-30 04:27:57 -04:00
|
|
|
void Suspend();
|
|
|
|
void Resume();
|
2024-04-30 06:38:55 -04:00
|
|
|
void FUN_1005f6d0(MxBool p_unk0x400);
|
2024-05-18 14:43:19 -04:00
|
|
|
void EnableCamAnims(MxBool p_enableCamAnims);
|
2024-06-18 13:35:03 -04:00
|
|
|
MxResult LoadWorldInfo(MxS32 p_worldId);
|
2024-03-29 11:50:16 -04:00
|
|
|
MxBool FindVehicle(const char* p_name, MxU32& p_index);
|
2024-03-15 20:43:45 -04:00
|
|
|
MxResult ReadAnimInfo(LegoFile* p_file, AnimInfo* p_info);
|
|
|
|
MxResult ReadModelInfo(LegoFile* p_file, ModelInfo* p_info);
|
2024-05-17 21:42:21 -04:00
|
|
|
void FUN_100604d0(MxBool p_unk0x08);
|
|
|
|
void FUN_10060540(MxBool p_unk0x29);
|
2024-05-07 10:54:06 -04:00
|
|
|
void FUN_10060570(MxBool p_unk0x1a);
|
2024-04-19 11:42:28 -04:00
|
|
|
MxResult StartEntityAction(MxDSAction& p_dsAction, LegoEntity* p_entity);
|
2024-04-26 11:37:07 -04:00
|
|
|
MxResult FUN_10060dc0(
|
|
|
|
IsleScript::Script p_objectId,
|
|
|
|
MxMatrix* p_matrix,
|
2024-04-30 10:02:58 -04:00
|
|
|
MxBool p_param3,
|
2024-05-01 07:36:58 -04:00
|
|
|
MxBool p_param4,
|
2024-04-30 10:02:58 -04:00
|
|
|
LegoROI* p_roi,
|
|
|
|
MxBool p_param6,
|
2024-04-26 11:37:07 -04:00
|
|
|
MxBool p_param7,
|
|
|
|
MxBool p_param8,
|
2024-04-30 10:02:58 -04:00
|
|
|
MxBool p_param9
|
2024-03-16 14:20:44 -04:00
|
|
|
);
|
2024-05-22 14:09:06 -04:00
|
|
|
void CameraTriggerFire(LegoPathActor* p_actor, MxBool, MxU32 p_location, MxBool p_bool);
|
2024-05-07 15:59:46 -04:00
|
|
|
void FUN_10061010(MxBool p_und);
|
2024-04-20 09:32:10 -04:00
|
|
|
LegoTranInfo* GetTranInfo(MxU32 p_index);
|
2024-04-19 11:42:28 -04:00
|
|
|
void FUN_10062770();
|
2024-05-10 10:23:47 -04:00
|
|
|
void PurgeExtra(MxBool p_und);
|
2024-05-10 14:07:38 -04:00
|
|
|
void AddExtra(MxS32 p_location, MxBool p_und);
|
2024-05-29 11:05:50 -04:00
|
|
|
void FUN_10063270(LegoROIList* p_list, LegoAnimPresenter* p_presenter);
|
2024-04-27 09:19:55 -04:00
|
|
|
void FUN_10063780(LegoROIList* p_list);
|
2024-05-17 15:58:35 -04:00
|
|
|
MxResult FUN_10064670(Vector3* p_position);
|
|
|
|
MxResult FUN_10064740(Vector3* p_position);
|
2024-05-24 21:23:41 -04:00
|
|
|
MxResult FUN_10064880(const char* p_name, MxS32 p_unk0x0c, MxS32 p_unk0x10);
|
2023-10-24 08:37:02 -04:00
|
|
|
|
2024-01-24 21:16:29 -05:00
|
|
|
static void configureLegoAnimationManager(MxS32 p_legoAnimationManagerConfig);
|
2023-06-29 04:10:08 -04:00
|
|
|
|
2024-01-18 08:34:14 -05:00
|
|
|
// SYNTHETIC: LEGO1 0x1005ed10
|
|
|
|
// LegoAnimationManager::`scalar deleting destructor'
|
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
private:
|
|
|
|
void Init();
|
2024-04-26 11:37:07 -04:00
|
|
|
MxResult FUN_100605e0(
|
|
|
|
MxU32 p_index,
|
2024-04-30 10:02:58 -04:00
|
|
|
MxBool p_unk0x0a,
|
2024-04-26 11:37:07 -04:00
|
|
|
MxMatrix* p_matrix,
|
2024-04-30 10:02:58 -04:00
|
|
|
MxBool p_bool1,
|
|
|
|
LegoROI* p_roi,
|
|
|
|
MxBool p_bool2,
|
|
|
|
MxBool p_bool3,
|
|
|
|
MxBool p_bool4,
|
|
|
|
MxBool p_bool5
|
2024-04-26 11:37:07 -04:00
|
|
|
);
|
|
|
|
MxResult FUN_100609f0(MxU32 p_objectId, MxMatrix* p_matrix, MxBool p_und1, MxBool p_und2);
|
2024-04-27 08:52:28 -04:00
|
|
|
void DeleteAnimations();
|
2024-05-02 09:22:09 -04:00
|
|
|
void FUN_10061530();
|
2024-05-09 10:30:34 -04:00
|
|
|
MxResult FUN_100617c0(MxS32 p_unk0x08, MxU16& p_unk0x0e, MxU16& p_unk0x10);
|
2024-05-02 09:22:09 -04:00
|
|
|
MxU16 FUN_10062110(
|
|
|
|
LegoROI* p_roi,
|
|
|
|
Vector3& p_direction,
|
|
|
|
Vector3& p_position,
|
|
|
|
LegoPathBoundary* p_boundary,
|
|
|
|
float p_speed,
|
2024-05-09 12:49:43 -04:00
|
|
|
MxU8 p_unk0x0c,
|
2024-05-02 09:22:09 -04:00
|
|
|
MxBool p_unk0x14
|
|
|
|
);
|
2024-04-27 09:59:00 -04:00
|
|
|
MxS8 GetCharacterIndex(const char* p_name);
|
2024-04-30 10:02:58 -04:00
|
|
|
MxBool FUN_100623a0(AnimInfo& p_info);
|
2024-05-09 15:53:13 -04:00
|
|
|
MxBool ModelExists(AnimInfo& p_info, const char* p_name);
|
2024-04-30 10:02:58 -04:00
|
|
|
void FUN_10062580(AnimInfo& p_info);
|
2024-05-09 16:24:45 -04:00
|
|
|
MxBool FUN_10062650(Vector3& p_position, float p_und, LegoROI* p_roi);
|
2024-04-30 10:02:58 -04:00
|
|
|
MxBool FUN_10062710(AnimInfo& p_info);
|
2024-05-29 11:05:50 -04:00
|
|
|
MxBool FUN_10062e20(LegoROI* p_roi, LegoAnimPresenter* p_presenter);
|
|
|
|
void FUN_10063950(LegoROI* p_roi);
|
2024-04-27 08:52:28 -04:00
|
|
|
void FUN_10063aa0();
|
2024-05-25 10:40:10 -04:00
|
|
|
MxBool FUN_10063b90(LegoWorld* p_world, LegoExtraActor* p_actor, MxU8 p_mood, MxU32 p_characterId);
|
2024-05-02 09:22:09 -04:00
|
|
|
void FUN_10063d10();
|
2024-05-29 11:05:50 -04:00
|
|
|
void FUN_10063e40(LegoAnimPresenter* p_presenter);
|
2024-05-10 14:07:38 -04:00
|
|
|
MxBool FUN_10063fb0(LegoLocation::Boundary* p_boundary, LegoWorld* p_world);
|
2024-05-18 12:26:32 -04:00
|
|
|
MxBool FUN_10064010(LegoPathBoundary* p_boundary, LegoUnknown100db7f4* p_edge, float p_destScale);
|
2024-05-18 11:48:07 -04:00
|
|
|
MxBool FUN_10064120(LegoLocation::Boundary* p_boundary, MxBool p_bool1, MxBool p_bool2);
|
2024-05-17 14:21:48 -04:00
|
|
|
MxResult FUN_10064380(
|
|
|
|
const char* p_name,
|
|
|
|
const char* p_boundaryName,
|
|
|
|
MxS32 p_src,
|
|
|
|
float p_srcScale,
|
|
|
|
MxS32 p_dest,
|
|
|
|
float p_destScale,
|
|
|
|
MxU32 p_undIdx1,
|
|
|
|
MxS32 p_unk0x0c,
|
|
|
|
MxU32 p_undIdx2,
|
|
|
|
MxS32 p_unk0x10,
|
|
|
|
float p_speed
|
|
|
|
);
|
2024-05-25 11:18:24 -04:00
|
|
|
void FUN_100648f0(LegoTranInfo* p_tranInfo, MxLong p_unk0x404);
|
2024-05-02 09:22:09 -04:00
|
|
|
void FUN_10064b50(MxLong p_time);
|
2024-02-10 20:52:16 -05:00
|
|
|
|
2024-06-18 13:35:03 -04:00
|
|
|
MxS32 m_worldId; // 0x08
|
2024-03-15 20:43:45 -04:00
|
|
|
MxU16 m_animCount; // 0x0c
|
|
|
|
MxU16 m_unk0x0e; // 0x0e
|
2024-04-27 09:07:28 -04:00
|
|
|
MxU16 m_unk0x10; // 0x10
|
2024-03-15 20:43:45 -04:00
|
|
|
AnimInfo* m_anims; // 0x14
|
2024-04-27 09:07:28 -04:00
|
|
|
undefined2 m_unk0x18; // 0x18
|
2024-05-01 09:00:42 -04:00
|
|
|
MxBool m_unk0x1a; // 0x1a
|
2024-04-19 11:42:28 -04:00
|
|
|
MxU32 m_unk0x1c; // 0x1c
|
2024-03-15 20:43:45 -04:00
|
|
|
LegoTranInfoList* m_tranInfoList; // 0x20
|
|
|
|
LegoTranInfoList* m_tranInfoList2; // 0x24
|
2024-04-20 09:52:10 -04:00
|
|
|
MxPresenter* m_unk0x28[2]; // 0x28
|
2024-04-20 11:52:46 -04:00
|
|
|
MxLong m_unk0x30[2]; // 0x30
|
2024-04-27 09:46:47 -04:00
|
|
|
MxBool m_unk0x38; // 0x38
|
2024-05-18 14:43:19 -04:00
|
|
|
MxBool m_animRunning; // 0x39
|
|
|
|
MxBool m_enableCamAnims; // 0x3a
|
2024-05-10 10:23:47 -04:00
|
|
|
Extra m_extras[40]; // 0x3c
|
2024-05-10 14:07:38 -04:00
|
|
|
MxU32 m_lastExtraCharacterId; // 0x3fc
|
2024-04-30 06:38:55 -04:00
|
|
|
MxBool m_unk0x400; // 0x400
|
2024-05-02 09:22:09 -04:00
|
|
|
MxBool m_unk0x401; // 0x401
|
|
|
|
MxBool m_unk0x402; // 0x402
|
2024-04-19 11:42:28 -04:00
|
|
|
MxLong m_unk0x404; // 0x404
|
2024-04-27 09:07:28 -04:00
|
|
|
MxLong m_unk0x408; // 0x408
|
|
|
|
MxLong m_unk0x40c; // 0x40c
|
2024-05-02 09:22:09 -04:00
|
|
|
MxLong m_unk0x410; // 0x410
|
2024-05-10 14:07:38 -04:00
|
|
|
MxU32 m_unk0x414; // 0x414
|
2024-05-02 10:51:41 -04:00
|
|
|
MxU32 m_numAllowedExtras; // 0x418
|
2024-04-27 09:07:28 -04:00
|
|
|
undefined4 m_unk0x41c; // 0x41c
|
2024-03-15 20:43:45 -04:00
|
|
|
AnimState* m_animState; // 0x420
|
2024-04-27 08:52:28 -04:00
|
|
|
LegoROIList* m_unk0x424; // 0x424
|
2024-05-18 14:43:19 -04:00
|
|
|
MxBool m_suspendedEnableCamAnims; // 0x428
|
2024-04-30 06:38:55 -04:00
|
|
|
MxBool m_unk0x429; // 0x429
|
2024-05-02 09:22:09 -04:00
|
|
|
MxBool m_unk0x42a; // 0x42a
|
2024-04-30 04:27:57 -04:00
|
|
|
MxBool m_suspended; // 0x42b
|
2024-05-01 09:00:42 -04:00
|
|
|
LegoTranInfo* m_unk0x42c; // 0x42c
|
|
|
|
MxBool m_unk0x430; // 0x430
|
2024-05-17 10:05:06 -04:00
|
|
|
MxLong m_unk0x434; // 0x434
|
|
|
|
MxLong m_unk0x438; // 0x438
|
2024-04-27 08:52:28 -04:00
|
|
|
MxMatrix m_unk0x43c; // 0x43c
|
|
|
|
MxMatrix m_unk0x484; // 0x484
|
|
|
|
UnknownMx4DPointFloat m_unk0x4cc; // 0x4cc
|
2023-04-27 22:19:39 -04:00
|
|
|
};
|
|
|
|
|
2024-05-08 10:28:32 -04:00
|
|
|
// TEMPLATE: LEGO1 0x10061750
|
|
|
|
// MxListCursor<LegoTranInfo *>::MxListCursor<LegoTranInfo *>
|
|
|
|
|
2023-04-27 22:19:39 -04:00
|
|
|
#endif // LEGOANIMATIONMANAGER_H
|