summaryrefslogtreecommitdiffstats
path: root/src/vehicles/HandlingMgr.h
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-11-23 17:59:50 +0100
committerSergeanur <s.anureev@yandex.ua>2020-11-23 17:59:50 +0100
commit833bf4a619c7bd40ea69731abe3d31770815d863 (patch)
treed351d9d80d332118621b9023fbe176928fe8e2b9 /src/vehicles/HandlingMgr.h
parenttwo unused functions (diff)
downloadre3-833bf4a619c7bd40ea69731abe3d31770815d863.tar
re3-833bf4a619c7bd40ea69731abe3d31770815d863.tar.gz
re3-833bf4a619c7bd40ea69731abe3d31770815d863.tar.bz2
re3-833bf4a619c7bd40ea69731abe3d31770815d863.tar.lz
re3-833bf4a619c7bd40ea69731abe3d31770815d863.tar.xz
re3-833bf4a619c7bd40ea69731abe3d31770815d863.tar.zst
re3-833bf4a619c7bd40ea69731abe3d31770815d863.zip
Diffstat (limited to 'src/vehicles/HandlingMgr.h')
-rw-r--r--src/vehicles/HandlingMgr.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/vehicles/HandlingMgr.h b/src/vehicles/HandlingMgr.h
index 10e25573..4d3b8389 100644
--- a/src/vehicles/HandlingMgr.h
+++ b/src/vehicles/HandlingMgr.h
@@ -2,7 +2,7 @@
#include "Transmission.h"
-enum eHandlingId
+enum tVehicleType
{
HANDLING_LANDSTAL,
HANDLING_IDAHO,
@@ -65,6 +65,11 @@ enum eHandlingId
NUMHANDLINGS
};
+enum tField : uint32 // most likely a handling field enum, never used so :shrug:
+{
+
+};
+
enum
{
HANDLING_1G_BOOST = 1,
@@ -87,7 +92,7 @@ enum
struct tHandlingData
{
- eHandlingId nIdentifier;
+ tVehicleType nIdentifier;
float fMass;
float fInvMass;
float fTurnMass;
@@ -118,6 +123,8 @@ struct tHandlingData
};
VALIDATE_SIZE(tHandlingData, 0xD8);
+class CVehicle;
+
class cHandlingDataMgr
{
float field_0; // unused it seems
@@ -135,11 +142,15 @@ public:
void Initialise(void);
void LoadHandlingData(void);
int FindExactWord(const char *word, const char *words, int wordLen, int numWords);
+ void ConvertDataToWorldUnits(tHandlingData *handling);
void ConvertDataToGameUnits(tHandlingData *handling);
+ void RangeCheck(tHandlingData *handling);
+ void ModifyHandlingValue(CVehicle *, const tVehicleType &, const tField &, const bool &);
+ void DisplayHandlingData(CVehicle *, tHandlingData *, uint8, bool);
int32 GetHandlingId(const char *name);
- tHandlingData *GetHandlingData(eHandlingId id) { return &HandlingData[id]; }
- bool HasRearWheelDrive(eHandlingId id) { return HandlingData[id].Transmission.nDriveType == 'R'; }
- bool HasFrontWheelDrive(eHandlingId id) { return HandlingData[id].Transmission.nDriveType == 'F'; }
+ tHandlingData *GetHandlingData(tVehicleType id) { return &HandlingData[id]; }
+ bool HasRearWheelDrive(tVehicleType id) { return HandlingData[id].Transmission.nDriveType == 'R'; }
+ bool HasFrontWheelDrive(tVehicleType id) { return HandlingData[id].Transmission.nDriveType == 'F'; }
};
VALIDATE_SIZE(cHandlingDataMgr, 0x3030);
extern cHandlingDataMgr mod_HandlingManager;