mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-22 23:57:54 -05:00
494a556f8e
* 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 commitd87d665127
. * Revert "FUNCTION to SYNTHETIC where needed" This reverts commit8c815418d2
. * 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>
93 lines
2.2 KiB
C++
93 lines
2.2 KiB
C++
#ifndef LEGONAVCONTROLLER_H
|
|
#define LEGONAVCONTROLLER_H
|
|
|
|
#include "mxcore.h"
|
|
#include "mxtimer.h"
|
|
#include "mxtypes.h"
|
|
|
|
// VTABLE: LEGO1 0x100d85b8
|
|
// SIZE 0x70
|
|
class LegoNavController : public MxCore {
|
|
public:
|
|
__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
|
|
);
|
|
|
|
LegoNavController();
|
|
virtual ~LegoNavController() override; // vtable+0x0
|
|
|
|
// FUNCTION: LEGO1 0x10054b80
|
|
inline const char* ClassName() const override // vtable+0xc
|
|
{
|
|
// GLOBAL: LEGO1 0x100f66d8
|
|
return "LegoNavController";
|
|
}
|
|
|
|
// FUNCTION: LEGO1 0x10054b90
|
|
inline MxBool IsA(const char* name) const override // vtable+0x10
|
|
{
|
|
return !strcmp(name, ClassName()) || MxCore::IsA(name);
|
|
}
|
|
|
|
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);
|
|
|
|
private:
|
|
int m_hMax;
|
|
int m_vMax;
|
|
int m_mouseDeadzone;
|
|
float m_zeroThreshold;
|
|
float unk_18;
|
|
float unk_1C;
|
|
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;
|
|
MxBool m_unk5D;
|
|
char m_unk5E[2];
|
|
int m_unk60;
|
|
int m_unk64;
|
|
int m_unk68;
|
|
MxBool m_unk6C;
|
|
};
|
|
|
|
#endif // LEGONAVCONTROLLER_H
|