mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-22 07:28:00 -05:00
Merge remote-tracking branch 'upstream/master' into mxautolocker
This commit is contained in:
commit
fdbaf454aa
3 changed files with 98 additions and 4 deletions
66
LEGO1/legonavcontroller.cpp
Normal file
66
LEGO1/legonavcontroller.cpp
Normal file
|
@ -0,0 +1,66 @@
|
|||
#include "legonavcontroller.h"
|
||||
|
||||
int g_mouseDeadzone = 40;
|
||||
float g_zeroThreshold = 0.001f;
|
||||
float g_movementMaxSpeed = 40.0f;
|
||||
float g_turnMaxSpeed = 20.0f;
|
||||
float g_movementMaxAccel = 15.0f;
|
||||
float g_turnMaxAccel = 30.0f;
|
||||
float g_movementMinAccel = 4.0f;
|
||||
float g_turnMinAccel = 15.0f;
|
||||
float g_movementDecel = 50.0f;
|
||||
float g_turnDecel = 50.0f;
|
||||
float g_rotationSensitivity = 0.4f;
|
||||
MxBool g_turnUseVelocity = 0;
|
||||
|
||||
void LegoNavController::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)
|
||||
{
|
||||
*p_mouseDeadzone = g_mouseDeadzone;
|
||||
*p_movementMaxSpeed = g_movementMaxSpeed;
|
||||
*p_turnMaxSpeed = g_turnMaxSpeed;
|
||||
*p_movementMaxAccel = g_movementMaxAccel;
|
||||
*p_turnMaxAccel = g_turnMaxAccel;
|
||||
*p_movementDecel = g_movementDecel;
|
||||
*p_turnDecel = g_turnDecel;
|
||||
*p_movementMinAccel = g_movementMinAccel;
|
||||
*p_turnMinAccel = g_turnMinAccel;
|
||||
*p_rotationSensitivity = g_rotationSensitivity;
|
||||
*p_turnUseVelocity = g_turnUseVelocity;
|
||||
}
|
||||
|
||||
void LegoNavController::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)
|
||||
{
|
||||
g_mouseDeadzone = p_mouseDeadzone;
|
||||
g_movementMaxSpeed = p_movementMaxSpeed;
|
||||
g_turnMaxSpeed = p_turnMaxSpeed;
|
||||
g_movementMaxAccel = p_movementMaxAccel;
|
||||
g_turnMaxAccel = p_turnMaxAccel;
|
||||
g_movementDecel = p_movementDecel;
|
||||
g_turnDecel = p_turnDecel;
|
||||
g_movementMinAccel = p_movementMinAccel;
|
||||
g_turnMinAccel = p_turnMinAccel;
|
||||
g_rotationSensitivity = p_rotationSensitivity;
|
||||
g_turnUseVelocity = p_turnUseVelocity;
|
||||
}
|
||||
|
||||
void LegoNavController::ResetToDefault()
|
||||
{
|
||||
this->m_mouseDeadzone = g_mouseDeadzone;
|
||||
this->m_zeroThreshold = g_zeroThreshold;
|
||||
this->m_turnMaxAccel = g_turnMaxAccel;
|
||||
this->m_movementMaxAccel = g_movementMaxAccel;
|
||||
this->m_turnMinAccel = g_turnMinAccel;
|
||||
this->m_movementMinAccel = g_movementMinAccel;
|
||||
this->m_turnDecel = g_turnDecel;
|
||||
this->m_movementDecel = g_movementDecel;
|
||||
this->m_turnMaxSpeed = g_turnMaxSpeed;
|
||||
this->m_movementMaxSpeed = g_movementMaxSpeed;
|
||||
this->m_turnUseVelocity = g_turnUseVelocity;
|
||||
this->m_rotationSensitivity = g_rotationSensitivity;
|
||||
}
|
|
@ -1,11 +1,39 @@
|
|||
#ifndef LEGONAVCONTROLLER_H
|
||||
#define LEGONAVCONTROLLER_H
|
||||
|
||||
class LegoNavController
|
||||
#include "mxcore.h"
|
||||
#include "mxbool.h"
|
||||
|
||||
class LegoNavController : public MxCore
|
||||
{
|
||||
public:
|
||||
__declspec(dllexport) static void GetDefaults(int *,float *,float *,float *,float *,float *,float *,float *,float *,float *,unsigned char *);
|
||||
__declspec(dllexport) static void SetDefaults(int,float,float,float,float,float,float,float,float,float,unsigned char);
|
||||
__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);
|
||||
void ResetToDefault();
|
||||
|
||||
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_mouseDeadzone;
|
||||
float m_zeroThreshold;
|
||||
int unk_18[4];
|
||||
float m_movementMaxSpeed;
|
||||
float m_turnMaxSpeed;
|
||||
int unk_30[2];
|
||||
float m_movementMaxAccel;
|
||||
float m_turnMaxAccel;
|
||||
float m_movementMinAccel;
|
||||
float m_turnMinAccel;
|
||||
float m_movementDecel;
|
||||
float m_turnDecel;
|
||||
float m_rotationSensitivity;
|
||||
MxBool m_turnUseVelocity;
|
||||
};
|
||||
|
||||
#endif // LEGONAVCONTROLLER_H
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# LEGO Island Decompilation
|
||||
|
||||
[Development Vlog](https://www.youtube.com/playlist?list=PLbpl-gZkNl2COf_bB6cfgTapD5WduAfPz) | [Forums](https://forum.mattkc.com/viewforum.php?f=1) | [Patreon](https://www.patreon.com/mattkc)
|
||||
[Development Vlog](https://www.youtube.com/playlist?list=PLbpl-gZkNl2COf_bB6cfgTapD5WduAfPz) | [Matrix](https://matrix.to/#/#isledecomp:matrix.org) | [Forums](https://forum.mattkc.com/viewforum.php?f=1) | [Patreon](https://www.patreon.com/mattkc)
|
||||
|
||||
This is a **work-in-progress** decompilation of LEGO Island version 1.1. It aims to be relatively faithful, but not byte accurate. The goal is to provide a workable codebase that can be modified, improved, and ported to other platforms later on.
|
||||
|
||||
|
|
Loading…
Reference in a new issue