mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 00:14:22 +00:00
Animmanager (#712)
* Implement LegoAnimationManager::StartEntityAction Fix some class definitions * Fix style issues * Add size annotations * Fix global pointer * Style/naming --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
@@ -41,8 +41,8 @@ public:
|
||||
// SYNTHETIC: LEGO1 0x10072630
|
||||
// Act3::`scalar deleting destructor'
|
||||
|
||||
MxBool FUN_100727e0(MxU32, Mx3DPointFloat& p_loc, Mx3DPointFloat& p_dir, Mx3DPointFloat& p_up);
|
||||
MxBool FUN_10072980(MxU32, Mx3DPointFloat& p_loc, Mx3DPointFloat& p_dir, Mx3DPointFloat& p_up);
|
||||
MxBool FUN_100727e0(LegoPathController*, Mx3DPointFloat& p_loc, Mx3DPointFloat& p_dir, Mx3DPointFloat& p_up);
|
||||
MxBool FUN_10072980(LegoPathController*, Mx3DPointFloat& p_loc, Mx3DPointFloat& p_dir, Mx3DPointFloat& p_up);
|
||||
void FUN_10073400();
|
||||
void FUN_10073430();
|
||||
|
||||
|
@@ -4,14 +4,33 @@
|
||||
#include "actionsfwd.h"
|
||||
#include "animstate.h"
|
||||
#include "decomp.h"
|
||||
#include "legoentity.h"
|
||||
#include "legotraninfolist.h"
|
||||
#include "mxcore.h"
|
||||
|
||||
// SIZE 0x18
|
||||
struct Character {
|
||||
char* m_name; // 0x00
|
||||
undefined m_unk0x04[0x10]; // 0x04
|
||||
MxBool m_active; // 0x14
|
||||
char* m_name; // 0x00
|
||||
undefined m_unk0x04; // 0x04
|
||||
MxS8 m_vehicleId; // 0x05
|
||||
undefined m_unk0x06; // 0x06
|
||||
MxBool m_unk0x07; // 0x07
|
||||
undefined m_unk0x08[12]; // 0x08
|
||||
MxBool m_active; // 0x14
|
||||
};
|
||||
|
||||
// SIZE 0x08
|
||||
struct Vehicle {
|
||||
char* m_name; // 0x00
|
||||
undefined m_unk0x04; // 0x04
|
||||
MxBool m_unk0x05; // 0x05
|
||||
};
|
||||
|
||||
// SIZE 0x18
|
||||
struct Unknown0x3c {
|
||||
LegoROI* m_roi; // 0x00
|
||||
MxU32 m_id; // 0x04
|
||||
undefined m_unk0x08[0x10]; // 0x08
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d8c18
|
||||
@@ -47,6 +66,7 @@ public:
|
||||
MxResult ReadAnimInfo(LegoFile* p_file, AnimInfo* p_info);
|
||||
MxResult ReadModelInfo(LegoFile* p_file, ModelInfo* p_info);
|
||||
void FUN_100603c0();
|
||||
MxResult StartEntityAction(MxDSAction& p_dsAction, LegoEntity* p_entity);
|
||||
undefined4 FUN_10060dc0(
|
||||
IsleScript::Script,
|
||||
undefined4,
|
||||
@@ -86,7 +106,7 @@ private:
|
||||
undefined m_unk0x38; // 0x38
|
||||
undefined m_unk0x39; // 0x39
|
||||
undefined m_unk0x3a; // 0x3a
|
||||
undefined m_unk0x3b[0x3c1]; // 0x3b
|
||||
Unknown0x3c m_unk0x3c[40]; // 0x3c
|
||||
undefined4 m_unk0x3fc; // 0x3fc
|
||||
MxU8 m_unk0x400; // 0x400
|
||||
undefined m_unk0x401; // 0x401
|
||||
|
@@ -2,6 +2,7 @@
|
||||
#define LEGOCHARACTERMANAGER_H
|
||||
|
||||
#include "decomp.h"
|
||||
#include "legoextraactor.h"
|
||||
#include "legovariables.h"
|
||||
#include "misc/legostorage.h"
|
||||
#include "mxstl/stlcompat.h"
|
||||
@@ -51,6 +52,7 @@ public:
|
||||
void FUN_100832a0();
|
||||
void FUN_10083db0(LegoROI* p_roi);
|
||||
void FUN_10083f10(LegoROI* p_roi);
|
||||
LegoExtraActor* FUN_10084c40(const LegoChar*);
|
||||
LegoCharacterData* Find(const char* p_key);
|
||||
MxBool FUN_10084ec0(LegoROI* p_roi);
|
||||
MxU32 FUN_10085140(LegoROI*, MxBool);
|
||||
|
@@ -70,9 +70,10 @@ public:
|
||||
Mx3DPointFloat GetWorldUp();
|
||||
Mx3DPointFloat GetWorldPosition();
|
||||
|
||||
inline LegoROI* GetROI() { return m_roi; }
|
||||
inline MxU8 GetFlags() { return m_flags; }
|
||||
inline MxBool GetUnknown0x10IsSet(MxU8 p_flag) { return m_unk0x10 & p_flag; }
|
||||
inline MxU8 GetFlags() { return m_flags; }
|
||||
inline LegoROI* GetROI() { return m_roi; }
|
||||
inline MxU8 GetUnknown0x59() { return m_unk0x59; }
|
||||
|
||||
inline void SetFlags(MxU8 p_flags) { m_flags = p_flags; }
|
||||
inline void SetFlag(MxU8 p_flag) { m_flags |= p_flag; }
|
||||
@@ -90,7 +91,7 @@ protected:
|
||||
MxFloat m_worldSpeed; // 0x50
|
||||
LegoROI* m_roi; // 0x54
|
||||
MxBool m_cameraFlag; // 0x58
|
||||
undefined m_unk0x59; // 0x59
|
||||
MxU8 m_unk0x59; // 0x59
|
||||
// For tokens from the extra string that look like this:
|
||||
// "Action:openram;\lego\scripts\Race\CarRaceR;0"
|
||||
Extra::ActionType m_actionType; // 0x5c
|
||||
|
@@ -200,6 +200,7 @@ public:
|
||||
void RemoveWorld(const MxAtomId& p_atom, MxLong p_objectId);
|
||||
MxResult RegisterScripts();
|
||||
MxS32 GetScriptIndex(const char* p_key);
|
||||
void DeleteAction();
|
||||
|
||||
static MxS32 GetCurrPathInfo(LegoPathBoundary**, MxS32&);
|
||||
const char* FindScript(MxU32 p_id);
|
||||
@@ -228,6 +229,13 @@ public:
|
||||
inline void SetCurrentActor(IslePathActor* p_currentActor) { m_currentActor = p_currentActor; }
|
||||
inline void SetCurrentWorld(LegoWorld* p_currentWorld) { m_currentWorld = p_currentWorld; }
|
||||
inline void SetExit(MxBool p_exit) { m_exit = p_exit; }
|
||||
inline MxResult StartActionIfUnknown0x13c(MxDSAction& p_dsAction)
|
||||
{
|
||||
if (m_unk0x13c) {
|
||||
return Start(&p_dsAction);
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
inline void CloseMainWindow() { PostMessageA(m_windowHandle, WM_CLOSE, 0, 0); }
|
||||
|
||||
|
@@ -5,6 +5,8 @@
|
||||
#include "mxtypes.h"
|
||||
#include "realtime/matrix.h"
|
||||
|
||||
class LegoPathController;
|
||||
|
||||
// VTABLE: LEGO1 0x100d6e28
|
||||
// SIZE 0x154
|
||||
class LegoPathActor : public LegoActor {
|
||||
@@ -82,28 +84,35 @@ public:
|
||||
virtual void VTable0xc8(MxU8 p_unk0x148) { m_unk0x148 = p_unk0x148; } // vtable+0xc8
|
||||
|
||||
inline MxU32 GetUnknown88() { return m_unk0x88; }
|
||||
inline LegoPathController* GetController() { return m_controller; }
|
||||
|
||||
inline void SetUnknown88(MxU32 p_unk0x88) { m_unk0x88 = p_unk0x88; }
|
||||
inline void SetUnknownDC(MxU32 p_unk0xdc) { m_unk0xdc = p_unk0xdc; }
|
||||
inline void ClearController() { m_controller = NULL; }
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1002d800
|
||||
// LegoPathActor::`scalar deleting destructor'
|
||||
|
||||
protected:
|
||||
undefined m_unk0x78[0x10]; // 0x78
|
||||
MxU32 m_unk0x88; // 0x88
|
||||
undefined m_unk0x8c[0x50]; // 0x8c
|
||||
MxU32 m_unk0xdc; // 0xdc
|
||||
undefined m_unk0xe0[0xa]; // 0xe0
|
||||
MxU8 m_unk0xea; // 0xea
|
||||
undefined m_unk0xef[0x4d]; // 0xef
|
||||
MxU32 m_unk0x138; // 0x138
|
||||
MxFloat m_unk0x13c; // 0x13c
|
||||
MxFloat m_unk0x140; // 0x140
|
||||
MxFloat m_unk0x144; // 0x144
|
||||
MxU8 m_unk0x148; // 0x148
|
||||
MxS32 m_unk0x14c; // 0x14c
|
||||
MxFloat m_unk0x150; // 0x150
|
||||
undefined m_unk0x78[0xa]; // 0x78
|
||||
MxBool m_userNavFlag; // 0x82
|
||||
undefined4 m_unk0x84; // 0x84
|
||||
MxU32 m_unk0x88; // 0x88
|
||||
undefined4 m_boundary; // 0x8c
|
||||
undefined m_unk0x8c[0x4c]; // 0x90
|
||||
MxU32 m_unk0xdc; // 0xdc
|
||||
undefined4 m_unk0xe0; // 0xe0
|
||||
undefined4 m_destEdge; // 0xe4
|
||||
undefined2 m_unk0xe8; // 0xe8
|
||||
MxU8 m_unk0xea; // 0xea
|
||||
undefined m_unk0xef[0x4d]; // 0xef
|
||||
LegoPathController* m_controller; // 0x138
|
||||
MxFloat m_unk0x13c; // 0x13c
|
||||
MxFloat m_unk0x140; // 0x140
|
||||
MxFloat m_unk0x144; // 0x144
|
||||
MxU8 m_unk0x148; // 0x148
|
||||
MxS32 m_unk0x14c; // 0x14c
|
||||
MxFloat m_unk0x150; // 0x150
|
||||
};
|
||||
|
||||
#endif // LEGOPATHACTOR_H
|
||||
|
@@ -2,9 +2,8 @@
|
||||
#define LEGOPATHCONTROLLER_H
|
||||
|
||||
#include "decomp.h"
|
||||
#include "legopathactor.h"
|
||||
#include "mxcore.h"
|
||||
|
||||
class IslePathActor;
|
||||
class LegoPathBoundary;
|
||||
|
||||
// VTABLE: LEGO1 0x100d7d60
|
||||
@@ -35,7 +34,7 @@ public:
|
||||
virtual void VTable0x14(); // vtable+0x14
|
||||
virtual void Destroy(); // vtable+0x18
|
||||
|
||||
undefined4 FUN_10046770(IslePathActor* p_actor);
|
||||
undefined4 FUN_10046770(LegoPathActor* p_actor);
|
||||
MxResult FUN_10046b30(LegoPathBoundary** p_path, MxS32& p_value);
|
||||
void Enable(MxBool p_enable);
|
||||
|
||||
|
@@ -3,6 +3,9 @@
|
||||
|
||||
#include "compat.h"
|
||||
#include "decomp.h"
|
||||
#include "legoinputmanager.h"
|
||||
#include "legoomni.h"
|
||||
#include "legovideomanager.h"
|
||||
// Long include path due to dependency of misc library on LegoOmni
|
||||
#include "lego/legoomni/include/actions/actionsfwd.h"
|
||||
#include "mxtypes.h"
|
||||
@@ -13,7 +16,6 @@ class LegoBuildingManager;
|
||||
class LegoCharacterManager;
|
||||
class LegoControlManager;
|
||||
class LegoGameState;
|
||||
class LegoInputManager;
|
||||
class LegoNavController;
|
||||
class LegoOmni;
|
||||
class LegoPlantManager;
|
||||
@@ -32,32 +34,40 @@ class ViewManager;
|
||||
extern MxBool g_isWorldActive;
|
||||
|
||||
LegoOmni* Lego();
|
||||
LegoInputManager* InputManager();
|
||||
LegoSoundManager* SoundManager();
|
||||
MxBackgroundAudioManager* BackgroundAudioManager();
|
||||
LegoGameState* GameState();
|
||||
MxTransitionManager* TransitionManager();
|
||||
LegoVideoManager* VideoManager();
|
||||
MxBackgroundAudioManager* BackgroundAudioManager();
|
||||
LegoInputManager* InputManager();
|
||||
LegoControlManager* ControlManager();
|
||||
LegoGameState* GameState();
|
||||
LegoAnimationManager* AnimationManager();
|
||||
LegoNavController* NavController();
|
||||
LegoBuildingManager* BuildingManager();
|
||||
LegoControlManager* ControlManager();
|
||||
IslePathActor* CurrentActor();
|
||||
ViewManager* GetViewManager();
|
||||
LegoPlantManager* PlantManager();
|
||||
LegoWorld* CurrentWorld();
|
||||
LegoCharacterManager* CharacterManager();
|
||||
ViewManager* GetViewManager();
|
||||
LegoPlantManager* PlantManager();
|
||||
LegoBuildingManager* BuildingManager();
|
||||
LegoTextureContainer* TextureContainer();
|
||||
ViewLODListManager* GetViewLODListManager();
|
||||
LegoWorld* FindWorld(const MxAtomId& p_atom, MxS32 p_entityid);
|
||||
void FUN_10015820(MxBool p_disable, MxU16 p_flags);
|
||||
LegoROI* FindROI(const char* p_name);
|
||||
void SetROIVisible(const char* p_name, MxBool p_visible);
|
||||
void SetCurrentActor(IslePathActor* p_currentActor);
|
||||
MxResult StartActionIfUnknown0x13c(MxDSAction& p_dsAction);
|
||||
void DeleteAction();
|
||||
LegoWorld* FindWorld(const MxAtomId& p_atom, MxS32 p_entityid);
|
||||
MxDSAction& GetCurrentAction();
|
||||
void SetCurrentWorld(LegoWorld* p_world);
|
||||
MxTransitionManager* TransitionManager();
|
||||
void PlayMusic(JukeboxScript::Script p_script);
|
||||
void SetIsWorldActive(MxBool p_isWorldActive);
|
||||
void DeleteObjects(MxAtomId* p_id, MxS32 p_first, MxS32 p_last);
|
||||
void SetCurrentWorld(LegoWorld* p_world);
|
||||
void FUN_10015820(MxBool p_disable, MxU16 p_flags);
|
||||
void SetROIVisible(const char* p_name, MxBool p_visible);
|
||||
void SetCurrentActor(IslePathActor* p_currentActor);
|
||||
|
||||
// FUNCTION: LEGO1 0x10015890
|
||||
inline MxResult StartActionIfUnknown0x13c(MxDSAction& p_dsAction)
|
||||
{
|
||||
return LegoOmni::GetInstance()->StartActionIfUnknown0x13c(p_dsAction);
|
||||
}
|
||||
|
||||
#endif // MISC_H
|
||||
|
Reference in New Issue
Block a user