isle-portable/LEGO1/lego/legoomni/include/legoanimationmanager.h

225 lines
6.9 KiB
C
Raw Normal View History

2023-04-27 22:19:39 -04:00
#ifndef LEGOANIMATIONMANAGER_H
#define LEGOANIMATIONMANAGER_H
#include "actionsfwd.h"
#include "decomp.h"
#include "legolocations.h"
#include "legotraninfolist.h"
#include "mxcore.h"
#include "mxgeometry/mxgeometry3d.h"
class AnimState;
class LegoAnimPresenter;
class LegoEntity;
class LegoExtraActor;
class LegoFile;
class LegoPathActor;
class LegoPathBoundary;
class LegoROIList;
struct LegoUnknown100db7f4;
class LegoWorld;
struct ModelInfo;
class MxDSAction;
(Proposal) Adjustments to "decomp" language (#308) * Adjustments to "decomp" language * Fix a comment * Fix accidental clang-formatting * Fix order * Fix order * Remove junk * Fix OFFSET * Adjustments based on new suggestions * Annotate globals * Globals in ISLE * More globals * Merge from parser2 branch * Allow prepending space for exact marker match * To eliminate noise, require the 0x prefix on offset for marker match * fix test from previous * Count tab stops for indented functions to reduce MISSED_END_OF_FUNCTION noise * FUNCTION to SYNTHETIC where needed * Missed marker conversion on SetAtomId * pylint cleanup, remove unused code * Fix unexpected function end, add more unit tests * Be more strict about synthetic name syntax * Revert "Missed marker conversion on SetAtomId" This reverts commit d87d665127fae7dd6e5bd48d9af14a0a829bf9e2. * Revert "FUNCTION to SYNTHETIC where needed" This reverts commit 8c815418d261ba8c5f67a9a2cae349fe4ac92db8. * Implicit lookup by name for functions * Fix VTABLE SYNTHETIC and other decomp markers * Get vtable class name * Vtable marker should identify struct * No colon for SIZE comment * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update CONTRIBUTING.md * Fix destructor/annotation * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md --------- Co-authored-by: disinvite <disinvite@users.noreply.github.com>
2023-12-06 07:10:45 -05:00
// VTABLE: LEGO1 0x100d8c18
// SIZE 0x500
2023-10-24 19:38:27 -04:00
class LegoAnimationManager : public MxCore {
2023-04-27 22:19:39 -04:00
public:
// SIZE 0x18
struct Character {
char* m_name; // 0x00
MxBool m_inExtras; // 0x04
MxS8 m_vehicleId; // 0x05
undefined m_unk0x06; // 0x06 (unused?)
MxBool m_unk0x07; // 0x07
MxBool m_unk0x08; // 0x08
MxBool m_unk0x09; // 0x09
MxS32 m_unk0x0c; // 0x0c
MxS32 m_unk0x10; // 0x10
MxBool m_active; // 0x14
MxU8 m_unk0x15; // 0x15
MxS8 m_unk0x16; // 0x16
};
// SIZE 0x08
struct Vehicle {
char* m_name; // 0x00
MxBool m_unk0x04; // 0x04
MxBool m_unk0x05; // 0x05
};
// SIZE 0x18
struct Extra {
LegoROI* m_roi; // 0x00
MxS32 m_characterId; // 0x04
MxLong m_unk0x08; // 0x08
MxBool m_unk0x0c; // 0x0c
MxBool m_unk0x0d; // 0x0d
float m_speed; // 0x10
MxBool m_unk0x14; // 0x14
};
2023-10-24 19:38:27 -04:00
LegoAnimationManager();
~LegoAnimationManager() override;
MxLong Notify(MxParam& p_param) override; // vtable+0x04
MxResult Tickle() override; // vtable+0x08
(Proposal) Adjustments to "decomp" language (#308) * Adjustments to "decomp" language * Fix a comment * Fix accidental clang-formatting * Fix order * Fix order * Remove junk * Fix OFFSET * Adjustments based on new suggestions * Annotate globals * Globals in ISLE * More globals * Merge from parser2 branch * Allow prepending space for exact marker match * To eliminate noise, require the 0x prefix on offset for marker match * fix test from previous * Count tab stops for indented functions to reduce MISSED_END_OF_FUNCTION noise * FUNCTION to SYNTHETIC where needed * Missed marker conversion on SetAtomId * pylint cleanup, remove unused code * Fix unexpected function end, add more unit tests * Be more strict about synthetic name syntax * Revert "Missed marker conversion on SetAtomId" This reverts commit d87d665127fae7dd6e5bd48d9af14a0a829bf9e2. * Revert "FUNCTION to SYNTHETIC where needed" This reverts commit 8c815418d261ba8c5f67a9a2cae349fe4ac92db8. * Implicit lookup by name for functions * Fix VTABLE SYNTHETIC and other decomp markers * Get vtable class name * Vtable marker should identify struct * No colon for SIZE comment * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update CONTRIBUTING.md * Fix destructor/annotation * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md --------- Co-authored-by: disinvite <disinvite@users.noreply.github.com>
2023-12-06 07:10:45 -05:00
// FUNCTION: LEGO1 0x1005ec80
inline const char* ClassName() const override // vtable+0x0c
2023-10-24 19:38:27 -04:00
{
// STRING: LEGO1 0x100f7508
2023-10-24 19:38:27 -04:00
return "LegoAnimationManager";
}
(Proposal) Adjustments to "decomp" language (#308) * Adjustments to "decomp" language * Fix a comment * Fix accidental clang-formatting * Fix order * Fix order * Remove junk * Fix OFFSET * Adjustments based on new suggestions * Annotate globals * Globals in ISLE * More globals * Merge from parser2 branch * Allow prepending space for exact marker match * To eliminate noise, require the 0x prefix on offset for marker match * fix test from previous * Count tab stops for indented functions to reduce MISSED_END_OF_FUNCTION noise * FUNCTION to SYNTHETIC where needed * Missed marker conversion on SetAtomId * pylint cleanup, remove unused code * Fix unexpected function end, add more unit tests * Be more strict about synthetic name syntax * Revert "Missed marker conversion on SetAtomId" This reverts commit d87d665127fae7dd6e5bd48d9af14a0a829bf9e2. * Revert "FUNCTION to SYNTHETIC where needed" This reverts commit 8c815418d261ba8c5f67a9a2cae349fe4ac92db8. * Implicit lookup by name for functions * Fix VTABLE SYNTHETIC and other decomp markers * Get vtable class name * Vtable marker should identify struct * No colon for SIZE comment * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update CONTRIBUTING.md * Fix destructor/annotation * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md --------- Co-authored-by: disinvite <disinvite@users.noreply.github.com>
2023-12-06 07:10:45 -05:00
// FUNCTION: LEGO1 0x1005ec90
inline MxBool IsA(const char* p_name) const override // vtable+0x10
2023-10-24 19:38:27 -04:00
{
return !strcmp(p_name, ClassName()) || MxCore::IsA(p_name);
2023-10-24 19:38:27 -04:00
}
void Reset(MxBool p_und);
void Suspend();
void Resume();
void FUN_1005f6d0(MxBool p_unk0x400);
void EnableCamAnims(MxBool p_enableCamAnims);
MxResult LoadScriptInfo(MxS32 p_scriptIndex);
MxBool FindVehicle(const char* p_name, MxU32& p_index);
MxResult ReadAnimInfo(LegoFile* p_file, AnimInfo* p_info);
MxResult ReadModelInfo(LegoFile* p_file, ModelInfo* p_info);
void FUN_100604d0(MxBool p_unk0x08);
void FUN_10060540(MxBool p_unk0x29);
void FUN_10060570(MxBool p_unk0x1a);
MxResult StartEntityAction(MxDSAction& p_dsAction, LegoEntity* p_entity);
MxResult FUN_10060dc0(
IsleScript::Script p_objectId,
MxMatrix* p_matrix,
MxBool p_param3,
MxBool p_param4,
LegoROI* p_roi,
MxBool p_param6,
MxBool p_param7,
MxBool p_param8,
MxBool p_param9
);
void CameraTriggerFire(LegoPathActor* p_actor, MxBool, MxU32 p_location, MxBool p_bool);
void FUN_10061010(MxBool p_und);
LegoTranInfo* GetTranInfo(MxU32 p_index);
void FUN_10062770();
void PurgeExtra(MxBool p_und);
void AddExtra(MxS32 p_location, MxBool p_und);
void FUN_10063270(LegoROIList* p_list, LegoAnimPresenter* p_presenter);
void FUN_10063780(LegoROIList* p_list);
MxResult FUN_10064670(Vector3* p_position);
MxResult FUN_10064740(Vector3* p_position);
MxResult FUN_10064880(const char* p_name, MxS32 p_unk0x0c, MxS32 p_unk0x10);
static void configureLegoAnimationManager(MxS32 p_legoAnimationManagerConfig);
// SYNTHETIC: LEGO1 0x1005ed10
// LegoAnimationManager::`scalar deleting destructor'
2023-10-24 19:38:27 -04:00
private:
void Init();
MxResult FUN_100605e0(
MxU32 p_index,
MxBool p_unk0x0a,
MxMatrix* p_matrix,
MxBool p_bool1,
LegoROI* p_roi,
MxBool p_bool2,
MxBool p_bool3,
MxBool p_bool4,
MxBool p_bool5
);
MxResult FUN_100609f0(MxU32 p_objectId, MxMatrix* p_matrix, MxBool p_und1, MxBool p_und2);
void DeleteAnimations();
void FUN_10061530();
MxResult FUN_100617c0(MxS32 p_unk0x08, MxU16& p_unk0x0e, MxU16& p_unk0x10);
MxU16 FUN_10062110(
LegoROI* p_roi,
Vector3& p_direction,
Vector3& p_position,
LegoPathBoundary* p_boundary,
float p_speed,
MxU8 p_unk0x0c,
MxBool p_unk0x14
);
MxS8 GetCharacterIndex(const char* p_name);
MxBool FUN_100623a0(AnimInfo& p_info);
MxBool ModelExists(AnimInfo& p_info, const char* p_name);
void FUN_10062580(AnimInfo& p_info);
MxBool FUN_10062650(Vector3& p_position, float p_und, LegoROI* p_roi);
MxBool FUN_10062710(AnimInfo& p_info);
MxBool FUN_10062e20(LegoROI* p_roi, LegoAnimPresenter* p_presenter);
void FUN_10063950(LegoROI* p_roi);
void FUN_10063aa0();
MxBool FUN_10063b90(LegoWorld* p_world, LegoExtraActor* p_actor, MxU8 p_mood, MxU32 p_characterId);
void FUN_10063d10();
void FUN_10063e40(LegoAnimPresenter* p_presenter);
MxBool FUN_10063fb0(LegoLocation::Boundary* p_boundary, LegoWorld* p_world);
MxBool FUN_10064010(LegoPathBoundary* p_boundary, LegoUnknown100db7f4* p_edge, float p_destScale);
MxBool FUN_10064120(LegoLocation::Boundary* p_boundary, MxBool p_bool1, MxBool p_bool2);
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
);
void FUN_100648f0(LegoTranInfo* p_tranInfo, MxLong p_unk0x404);
void FUN_10064b50(MxLong p_time);
MxS32 m_scriptIndex; // 0x08
MxU16 m_animCount; // 0x0c
MxU16 m_unk0x0e; // 0x0e
MxU16 m_unk0x10; // 0x10
AnimInfo* m_anims; // 0x14
undefined2 m_unk0x18; // 0x18
MxBool m_unk0x1a; // 0x1a
MxU32 m_unk0x1c; // 0x1c
LegoTranInfoList* m_tranInfoList; // 0x20
LegoTranInfoList* m_tranInfoList2; // 0x24
MxPresenter* m_unk0x28[2]; // 0x28
MxLong m_unk0x30[2]; // 0x30
MxBool m_unk0x38; // 0x38
MxBool m_animRunning; // 0x39
MxBool m_enableCamAnims; // 0x3a
Extra m_extras[40]; // 0x3c
MxU32 m_lastExtraCharacterId; // 0x3fc
MxBool m_unk0x400; // 0x400
MxBool m_unk0x401; // 0x401
MxBool m_unk0x402; // 0x402
MxLong m_unk0x404; // 0x404
MxLong m_unk0x408; // 0x408
MxLong m_unk0x40c; // 0x40c
MxLong m_unk0x410; // 0x410
MxU32 m_unk0x414; // 0x414
MxU32 m_numAllowedExtras; // 0x418
undefined4 m_unk0x41c; // 0x41c
AnimState* m_animState; // 0x420
LegoROIList* m_unk0x424; // 0x424
MxBool m_suspendedEnableCamAnims; // 0x428
MxBool m_unk0x429; // 0x429
MxBool m_unk0x42a; // 0x42a
MxBool m_suspended; // 0x42b
LegoTranInfo* m_unk0x42c; // 0x42c
MxBool m_unk0x430; // 0x430
MxLong m_unk0x434; // 0x434
MxLong m_unk0x438; // 0x438
MxMatrix m_unk0x43c; // 0x43c
MxMatrix m_unk0x484; // 0x484
UnknownMx4DPointFloat m_unk0x4cc; // 0x4cc
2023-04-27 22:19:39 -04:00
};
// TEMPLATE: LEGO1 0x10061750
// MxListCursor<LegoTranInfo *>::MxListCursor<LegoTranInfo *>
2023-04-27 22:19:39 -04:00
#endif // LEGOANIMATIONMANAGER_H