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-06-29 04:10:08 -04:00
|
|
|
// VTABLE 0x100d85b8
|
|
|
|
// SIZE 0x70
|
2023-06-13 14:17:20 -04:00
|
|
|
class LegoNavController : public MxCore
|
2023-06-11 21:03:54 -04:00
|
|
|
{
|
|
|
|
public:
|
2023-06-13 14:17:20 -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
|
|
|
|
|
|
|
LegoNavController();
|
2023-06-29 04:10:08 -04:00
|
|
|
// virtual ~LegoNavController(); // vtable+0x0
|
|
|
|
|
|
|
|
// OFFSET: LEGO1 0x10054b80
|
|
|
|
inline const char *ClassName() const override // vtable+0xc
|
|
|
|
{
|
|
|
|
// 0x100f66d8
|
|
|
|
return "LegoNavController";
|
|
|
|
}
|
|
|
|
|
|
|
|
// OFFSET: LEGO1 0x10054b90
|
|
|
|
inline MxBool IsA(const char *name) const override // vtable+0x10
|
|
|
|
{
|
2023-06-29 12:05:45 -04:00
|
|
|
return !strcmp(name, ClassName()) || MxCore::IsA(name);
|
2023-06-29 04:10:08 -04:00
|
|
|
}
|
2023-06-19 04:34:58 -04:00
|
|
|
|
2023-06-24 13:09:46 -04:00
|
|
|
void SetControlMax(int p_hMax, int p_vMax);
|
2023-06-13 14:17:20 -04:00
|
|
|
void ResetToDefault();
|
2023-06-19 04:34:58 -04:00
|
|
|
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);
|
2023-06-30 19:24:46 -04:00
|
|
|
float CalculateNewVel(float p_targetVel, float p_currentVel, float p_accel, float p_time);
|
2023-06-13 14:17:20 -04:00
|
|
|
|
|
|
|
private:
|
2023-06-19 04:34:58 -04:00
|
|
|
int m_hMax;
|
|
|
|
int m_vMax;
|
2023-06-13 14:17:20 -04:00
|
|
|
int m_mouseDeadzone;
|
|
|
|
float m_zeroThreshold;
|
2023-06-19 04:34:58 -04:00
|
|
|
float unk_18;
|
|
|
|
float unk_1C;
|
|
|
|
float m_targetMovementSpeed;
|
|
|
|
float m_targetTurnSpeed;
|
2023-06-13 14:17:20 -04:00
|
|
|
float m_movementMaxSpeed;
|
|
|
|
float m_turnMaxSpeed;
|
2023-06-19 04:34:58 -04:00
|
|
|
float m_movementAccel;
|
|
|
|
float m_turnAccel;
|
2023-06-13 14:17:20 -04:00
|
|
|
float m_movementMaxAccel;
|
|
|
|
float m_turnMaxAccel;
|
|
|
|
float m_movementMinAccel;
|
|
|
|
float m_turnMinAccel;
|
|
|
|
float m_movementDecel;
|
|
|
|
float m_turnDecel;
|
2023-06-19 04:34:58 -04:00
|
|
|
float m_turnSensitivity;
|
2023-06-13 14:17:20 -04:00
|
|
|
MxBool m_turnUseVelocity;
|
2023-06-19 04:34:58 -04:00
|
|
|
int m_time;
|
|
|
|
MxBool m_trackDefault;
|
|
|
|
MxBool m_unk5D;
|
|
|
|
char m_unk5E[2];
|
|
|
|
int m_unk60;
|
|
|
|
int m_unk64;
|
|
|
|
int m_unk68;
|
|
|
|
MxBool m_unk6C;
|
2023-06-11 21:03:54 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // LEGONAVCONTROLLER_H
|