summaryrefslogtreecommitdiffstats
path: root/src/vehicles/Bike.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-06-02 23:35:20 +0200
committeraap <aap@papnet.eu>2020-06-02 23:35:20 +0200
commit2ca3c50463eff025b9783930d112dd0c257c040e (patch)
tree1601340bc1b3d51542aad6f448f52c89badfd89d /src/vehicles/Bike.h
parentfixed radar rendering (diff)
downloadre3-2ca3c50463eff025b9783930d112dd0c257c040e.tar
re3-2ca3c50463eff025b9783930d112dd0c257c040e.tar.gz
re3-2ca3c50463eff025b9783930d112dd0c257c040e.tar.bz2
re3-2ca3c50463eff025b9783930d112dd0c257c040e.tar.lz
re3-2ca3c50463eff025b9783930d112dd0c257c040e.tar.xz
re3-2ca3c50463eff025b9783930d112dd0c257c040e.tar.zst
re3-2ca3c50463eff025b9783930d112dd0c257c040e.zip
Diffstat (limited to '')
-rw-r--r--src/vehicles/Bike.h59
1 files changed, 51 insertions, 8 deletions
diff --git a/src/vehicles/Bike.h b/src/vehicles/Bike.h
index f68a9513..ba93fda0 100644
--- a/src/vehicles/Bike.h
+++ b/src/vehicles/Bike.h
@@ -1,5 +1,6 @@
#pragma once
+#include "Vehicle.h"
#include "Skidmarks.h"
enum eBikeNodes {
@@ -14,20 +15,23 @@ enum eBikeNodes {
BIKE_NUM_NODES
};
-enum eBikePositions
-{
- BIKE_POS_HEADLIGHTS,
- BIKE_POS_TAILLIGHTS,
- BIKE_POS_FRONTSEAT,
- BIKE_POS_BACKSEAT,
- BIKE_POS_EXHAUST
+enum {
+ BIKEWHEEL_FRONT,
+ BIKEWHEEL_REAR,
+};
+
+enum {
+ BIKESUSP_FRONT_1,
+ BIKESUSP_FRONT_2,
+ BIKESUSP_REAR_1,
+ BIKESUSP_REAR_2,
};
class CBike : public CVehicle
{
public:
RwFrame *m_aBikeNodes[BIKE_NUM_NODES];
- bool m_bLeanMatrixCalculated;
+ bool bLeanMatrixClean;
CMatrix m_leanMatrix;
CVector wheelieNormal;
CVector wheelieRight;
@@ -83,4 +87,43 @@ public:
uint8 m_nDriveWheelsOnGroundPrev;
float m_fGasPedalAudio;
tWheelState m_aWheelState[2];
+
+ CBike(int32 id, uint8 CreatedBy);
+
+ // from CEntity
+ void SetModelIndex(uint32 id);
+ void ProcessControl(void);
+ void Teleport(CVector v);
+ void PreRender(void);
+ void Render(void);
+
+ // from CPhysical
+ int32 ProcessEntityCollision(CEntity *ent, CColPoint *colpoints);
+
+ // from CVehicle
+ void ProcessControlInputs(uint8);
+ void GetComponentWorldPosition(int32 component, CVector &pos);
+ bool IsComponentPresent(int32 component);
+ void SetComponentRotation(int32 component, CVector rotation);
+ bool IsDoorReady(eDoors door);
+ bool IsDoorFullyOpen(eDoors door);
+ bool IsDoorClosed(eDoors door);
+ bool IsDoorMissing(eDoors door);
+ void RemoveRefsToVehicle(CEntity *ent);
+ void BlowUpCar(CEntity *ent);
+ bool SetUpWheelColModel(CColModel *colModel);
+ void BurstTyre(uint8 tyre, bool applyForces);
+ bool IsRoomForPedToLeaveCar(uint32 component, CVector *doorOffset);
+ float GetHeightAboveRoad(void);
+ void PlayCarHorn(void);
+
+ void PlayHornIfNecessary(void);
+ void ResetSuspension(void);
+ void SetupSuspensionLines(void);
+ void CalculateLeanMatrix(void);
+ void GetCorrectedWorldDoorPosition(CVector &pos, CVector p1, CVector p2);
+
+ void Fix(void);
+ void SetupModelNodes(void);
+ void ReduceHornCounter(void);
};