lego1: implement more of LegoNavController (#16)

* implement more of LegoNavController

* merge

* use MX_FALSE

* file file perms

* added Timer(), GetTime to LegoNavController

* add a comment about SetControlMax

* remove colon

* add commented out dtor

* revert inheritance for now so we don't accidentally break the interface to ISLE.exe later

* add missing include

* update project files

* update project files

* fix main.cpp

* add offsets

* update project files

* fix line endings

* fix a bug thanks to ASM checker

* add addr for Timer()

* updated project file
This commit is contained in:
Christian Semmler
2023-06-19 10:34:58 +02:00
committed by GitHub
parent f9f8440a3a
commit 5c440b5878
8 changed files with 334 additions and 35 deletions

View File

@@ -3,6 +3,7 @@
#include "mxcore.h"
#include "mxbool.h"
#include "mxtimer.h"
class LegoNavController : public MxCore
{
@@ -15,25 +16,45 @@ public:
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();
// 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);
private:
int unk_08; // known to be set to window width: 640 (default)
int unk_0C; // known to be set to window height: 480 (default)
int m_hMax;
int m_vMax;
int m_mouseDeadzone;
float m_zeroThreshold;
int unk_18[4];
float unk_18;
float unk_1C;
float m_targetMovementSpeed;
float m_targetTurnSpeed;
float m_movementMaxSpeed;
float m_turnMaxSpeed;
int unk_30[2];
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_rotationSensitivity;
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