summaryrefslogtreecommitdiffstats
path: root/src/vehicles/HandlingMgr.h
diff options
context:
space:
mode:
author_AG <gennariarmando@outlook.com>2019-07-07 15:16:54 +0200
committer_AG <gennariarmando@outlook.com>2019-07-07 15:16:54 +0200
commitd1c6a6aaa6c17250e069d1267b27e13303d6e20f (patch)
tree76d55bfd8bcc8f72cdd4d261c0bb1eaa050e522a /src/vehicles/HandlingMgr.h
parentMerge branch 'master' into master (diff)
parentthe great reorganization (diff)
downloadre3-d1c6a6aaa6c17250e069d1267b27e13303d6e20f.tar
re3-d1c6a6aaa6c17250e069d1267b27e13303d6e20f.tar.gz
re3-d1c6a6aaa6c17250e069d1267b27e13303d6e20f.tar.bz2
re3-d1c6a6aaa6c17250e069d1267b27e13303d6e20f.tar.lz
re3-d1c6a6aaa6c17250e069d1267b27e13303d6e20f.tar.xz
re3-d1c6a6aaa6c17250e069d1267b27e13303d6e20f.tar.zst
re3-d1c6a6aaa6c17250e069d1267b27e13303d6e20f.zip
Diffstat (limited to 'src/vehicles/HandlingMgr.h')
-rw-r--r--src/vehicles/HandlingMgr.h139
1 files changed, 139 insertions, 0 deletions
diff --git a/src/vehicles/HandlingMgr.h b/src/vehicles/HandlingMgr.h
new file mode 100644
index 00000000..958e2351
--- /dev/null
+++ b/src/vehicles/HandlingMgr.h
@@ -0,0 +1,139 @@
+#pragma once
+
+#include "Transmission.h"
+
+enum eHandlingId
+{
+ HANDLING_LANDSTAL,
+ HANDLING_IDAHO,
+ HANDLING_STINGER,
+ HANDLING_LINERUN,
+ HANDLING_PEREN,
+ HANDLING_SENTINEL,
+ HANDLING_PATRIOT,
+ HANDLING_FIRETRUK,
+ HANDLING_TRASH,
+ HANDLING_STRETCH,
+ HANDLING_MANANA,
+ HANDLING_INFERNUS,
+ HANDLING_BLISTA,
+ HANDLING_PONY,
+ HANDLING_MULE,
+ HANDLING_CHEETAH,
+ HANDLING_AMBULAN,
+ HANDLING_FBICAR,
+ HANDLING_MOONBEAM,
+ HANDLING_ESPERANT,
+ HANDLING_TAXI,
+ HANDLING_KURUMA,
+ HANDLING_BOBCAT,
+ HANDLING_MRWHOOP,
+ HANDLING_BFINJECT,
+ HANDLING_POLICE,
+ HANDLING_ENFORCER,
+ HANDLING_SECURICA,
+ HANDLING_BANSHEE,
+ HANDLING_PREDATOR,
+ HANDLING_BUS,
+ HANDLING_RHINO,
+ HANDLING_BARRACKS,
+ HANDLING_TRAIN,
+ HANDLING_HELI,
+ HANDLING_DODO,
+ HANDLING_COACH,
+ HANDLING_CABBIE,
+ HANDLING_STALLION,
+ HANDLING_RUMPO,
+ HANDLING_RCBANDIT,
+ HANDLING_BELLYUP,
+ HANDLING_MRWONGS,
+ HANDLING_MAFIA,
+ HANDLING_YARDIE,
+ HANDLING_YAKUZA,
+ HANDLING_DIABLOS,
+ HANDLING_COLUMB,
+ HANDLING_HOODS,
+ HANDLING_AIRTRAIN,
+ HANDLING_DEADDODO,
+ HANDLING_SPEEDER,
+ HANDLING_REEFER,
+ HANDLING_PANLANT,
+ HANDLING_FLATBED,
+ HANDLING_YANKEE,
+ HANDLING_BORGNINE
+};
+
+enum
+{
+ HANDLING_1G_BOOST = 1,
+ HANDLING_2G_BOOST = 2,
+ HANDLING_REV_BONNET = 4,
+ HANDLING_HANGING_BOOT = 8,
+ HANDLING_NO_DOORS = 0x10,
+ HANDLING_IS_VAN = 0x20,
+ HANDLING_IS_BUS = 0x40,
+ HANDLING_IS_LOW = 0x80,
+ HANDLING_DBL_EXHAUST = 0x100,
+ HANDLING_TAILGATE_BOOT = 0x200,
+ HANDLING_NOSWING_BOOT = 0x400,
+ HANDLING_NONPLAYER_STABILISER = 0x800,
+ HANDLING_NEUTRALHANDLING = 0x1000,
+ HANDLING_HAS_NO_ROOF = 0x2000,
+ HANDLING_IS_BIG = 0x4000,
+ HANDLING_HALOGEN_LIGHTS = 0x8000,
+};
+
+struct tHandlingData
+{
+ int32 nIdentifier;
+ float fMass;
+ float fInvMass;
+ float fTurnMass;
+ CVector Dimension;
+ CVector CentreOfMass;
+ int8 nPercentSubmerged;
+ float fBuoyancy;
+ float fTractionMultiplier;
+ cTransmission TransmissionData;
+ float fBrakeDeceleration;
+ float fBrakeBias;
+ int8 bABS;
+ float fSteeringLock;
+ float fTractionLoss;
+ float fTractionBias;
+ uint32 field_AC;
+ float fSuspensionForceLevel;
+ float fSuspensionDampingLevel;
+ float fSuspensionUpperLimit;
+ float fSuspensionLowerLimit;
+ float fSuspensionBias;
+ float fCollisionDamageMultiplier;
+ uint32 Flags;
+ float fSeatOffsetDistance;
+ int32 nMonetaryValue;
+ int8 FrontLights;
+ int8 RearLights;
+};
+VALIDATE_SIZE(tHandlingData, 0xD8);
+
+class cHandlingDataMgr
+{
+ float field_0; // unused it seems
+ float field_4; // wheel related
+ float field_8; //
+ float field_C; // unused it seems
+ float field_10; //
+ tHandlingData HandlingData[NUMHANDLINGS];
+ uint32 field_302C; // unused it seems, padding?
+
+public:
+ cHandlingDataMgr(void);
+ void Initialise(void);
+ void LoadHandlingData(void);
+ int FindExactWord(const char *word, const char *words, int wordLen, int numWords);
+ void ConvertDataToGameUnits(tHandlingData *handling);
+ int32 GetHandlingId(const char *name);
+ tHandlingData *GetHandlingData(eHandlingId id) { return &HandlingData[id]; }
+};
+VALIDATE_SIZE(cHandlingDataMgr, 0x3030);
+extern cHandlingDataMgr &mod_HandlingManager;