2023-06-11 21:03:54 -04:00
|
|
|
#ifndef LEGONAVCONTROLLER_H
|
|
|
|
#define LEGONAVCONTROLLER_H
|
|
|
|
|
2023-06-13 14:17:20 -04:00
|
|
|
#include "mxcore.h"
|
2023-06-19 04:34:58 -04:00
|
|
|
#include "mxtimer.h"
|
2023-06-27 22:04:07 -04:00
|
|
|
#include "mxtypes.h"
|
2023-06-13 14:17:20 -04:00
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// VTABLE: LEGO1 0x100d85b8
|
2023-06-29 04:10:08 -04:00
|
|
|
// SIZE 0x70
|
2023-10-24 19:38:27 -04:00
|
|
|
class LegoNavController : public MxCore {
|
2023-06-11 21:03:54 -04:00
|
|
|
public:
|
2023-10-24 19:38:27 -04:00
|
|
|
__declspec(dllexport) static void GetDefaults(
|
|
|
|
int* p_mouseDeadzone,
|
|
|
|
float* p_movementMaxSpeed,
|
|
|
|
float* p_turnMaxSpeed,
|
|
|
|
float* p_movementMaxAccel,
|
|
|
|
float* p_turnMaxAccel,
|
|
|
|
float* p_movementDecel,
|
|
|
|
float* p_turnDecel,
|
|
|
|
float* p_movementMinAccel,
|
|
|
|
float* p_turnMinAccel,
|
|
|
|
float* p_rotationSensitivity,
|
|
|
|
MxBool* p_turnUseVelocity
|
|
|
|
);
|
|
|
|
__declspec(dllexport) static void SetDefaults(
|
|
|
|
int p_mouseDeadzone,
|
|
|
|
float p_movementMaxSpeed,
|
|
|
|
float p_turnMaxSpeed,
|
|
|
|
float p_movementMaxAccel,
|
|
|
|
float p_turnMaxAccel,
|
|
|
|
float p_movementDecel,
|
|
|
|
float p_turnDecel,
|
|
|
|
float p_movementMinAccel,
|
|
|
|
float p_turnMinAccel,
|
|
|
|
float p_rotationSensitivity,
|
|
|
|
MxBool p_turnUseVelocity
|
|
|
|
);
|
2023-06-19 04:34:58 -04:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
LegoNavController();
|
2023-11-05 17:41:35 -05:00
|
|
|
virtual ~LegoNavController() override; // vtable+0x0
|
2023-06-29 04:10:08 -04:00
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// FUNCTION: LEGO1 0x10054b80
|
2023-10-24 19:38:27 -04:00
|
|
|
inline const char* ClassName() const override // vtable+0xc
|
|
|
|
{
|
2023-12-27 15:59:42 -05:00
|
|
|
// STRING: LEGO1 0x100f66d8
|
2023-10-24 19:38:27 -04:00
|
|
|
return "LegoNavController";
|
|
|
|
}
|
2023-06-29 04:10:08 -04:00
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// FUNCTION: LEGO1 0x10054b90
|
2023-12-13 05:48:14 -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-19 04:34:58 -04:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
void SetControlMax(int p_hMax, int p_vMax);
|
|
|
|
void ResetToDefault();
|
|
|
|
void SetTargets(int p_hPos, int p_vPos, MxBool p_accel);
|
|
|
|
float CalculateNewTargetSpeed(int p_pos, int p_center, float p_maxSpeed);
|
|
|
|
float CalculateNewAccel(int p_pos, int p_center, float p_maxAccel, int p_minAccel);
|
|
|
|
float CalculateNewVel(float p_targetVel, float p_currentVel, float p_accel, float p_time);
|
2023-06-13 14:17:20 -04:00
|
|
|
|
|
|
|
private:
|
2023-10-24 19:38:27 -04:00
|
|
|
int m_hMax;
|
|
|
|
int m_vMax;
|
|
|
|
int m_mouseDeadzone;
|
|
|
|
float m_zeroThreshold;
|
2023-12-13 05:48:14 -05:00
|
|
|
float m_unk0x18;
|
|
|
|
float m_unk0x1c;
|
2023-10-24 19:38:27 -04:00
|
|
|
float m_targetMovementSpeed;
|
|
|
|
float m_targetTurnSpeed;
|
|
|
|
float m_movementMaxSpeed;
|
|
|
|
float m_turnMaxSpeed;
|
|
|
|
float m_movementAccel;
|
|
|
|
float m_turnAccel;
|
|
|
|
float m_movementMaxAccel;
|
|
|
|
float m_turnMaxAccel;
|
|
|
|
float m_movementMinAccel;
|
|
|
|
float m_turnMinAccel;
|
|
|
|
float m_movementDecel;
|
|
|
|
float m_turnDecel;
|
|
|
|
float m_turnSensitivity;
|
|
|
|
MxBool m_turnUseVelocity;
|
|
|
|
int m_time;
|
|
|
|
MxBool m_trackDefault;
|
2023-12-13 05:48:14 -05:00
|
|
|
MxBool m_unk0x5d;
|
|
|
|
char m_unk0x5e[2];
|
|
|
|
int m_unk0x60;
|
|
|
|
int m_unk0x64;
|
|
|
|
int m_unk0x68;
|
|
|
|
MxBool m_unk0x6c;
|
2023-06-11 21:03:54 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // LEGONAVCONTROLLER_H
|