summaryrefslogtreecommitdiffstats
path: root/src/vehicles/Plane.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-07-31 23:57:18 +0200
committeraap <aap@papnet.eu>2019-07-31 23:57:18 +0200
commit78c15c4828a540fd6ad4f1816b8cc9610409f740 (patch)
tree800fc93cb0226accb1806a8104bc3eccfb4f71f7 /src/vehicles/Plane.h
parentMerge branch 'master' of github.com:GTAmodding/re3 (diff)
downloadre3-78c15c4828a540fd6ad4f1816b8cc9610409f740.tar
re3-78c15c4828a540fd6ad4f1816b8cc9610409f740.tar.gz
re3-78c15c4828a540fd6ad4f1816b8cc9610409f740.tar.bz2
re3-78c15c4828a540fd6ad4f1816b8cc9610409f740.tar.lz
re3-78c15c4828a540fd6ad4f1816b8cc9610409f740.tar.xz
re3-78c15c4828a540fd6ad4f1816b8cc9610409f740.tar.zst
re3-78c15c4828a540fd6ad4f1816b8cc9610409f740.zip
Diffstat (limited to 'src/vehicles/Plane.h')
-rw-r--r--src/vehicles/Plane.h71
1 files changed, 58 insertions, 13 deletions
diff --git a/src/vehicles/Plane.h b/src/vehicles/Plane.h
index e263766e..eddbc2cd 100644
--- a/src/vehicles/Plane.h
+++ b/src/vehicles/Plane.h
@@ -1,27 +1,72 @@
#pragma once
-#include "common.h"
#include "Vehicle.h"
+enum ePlanePositions
+{
+ PLANE_POS_LIGHT_LEFT,
+ PLANE_POS_LIGHT_RIGHT,
+ PLANE_POS_LIGHT_TAIL,
+};
+
+struct CPlaneNode
+{
+ CVector p; // position
+ float t; // xy-distance from start on path
+ bool bOnGround; // i.e. not flying
+};
+
+struct CPlaneInterpolationLine
+{
+ uint8 type;
+ float time; // when does this keyframe start
+ // initial values at start of frame
+ float position;
+ float speed;
+ float acceleration;
+};
+
class CPlane : public CVehicle
{
public:
// 0x288
- int16 m_wIndex;
- int16 field_650;
- int16 m_wNextPathNode;
+ int16 m_nPlaneId;
+ int16 m_isFarAway;
+ int16 m_nCurPathNode;
char field_654;
char field_655;
- float field_656;
- int m_nFrameWhenHit;
- char m_bHasBeenHit;
- char m_bIsIncomingCesna;
- char m_bIsDropoffCesna;
- char field_667;
-
- CPlane(int, uint8);
+ float m_fSpeed;
+ uint32 m_nFrameWhenHit;
+ bool m_bHasBeenHit;
+ bool m_bIsDrugRunCesna;
+ bool m_bIsDropOffCesna;
+
+ CPlane(int32 id, uint8 CreatedBy);
~CPlane(void);
- CPlane* ctor(int, uint8);
+
+ // from CEntity
+ void SetModelIndex(uint32 id);
+ void DeleteRwObject(void);
+ void ProcessControl(void);
+ void PreRender(void);
+ void Render(void);
void FlagToDestroyWhenNextProcessed() { bRemoveFromWorld = true; }
+
+ static void InitPlanes(void);
+ static void Shutdown(void);
+ static CPlaneNode *LoadPath(char const *filename, int32 &numNodes, float &totalLength, bool loop);
+ static void UpdatePlanes(void);
+ static bool TestRocketCollision(CVector *rocketPos);
+ static void CreateIncomingCesna(void);
+ static void CreateDropOffCesna(void);
+ static CVector FindDrugPlaneCoordinates(void);
+ static CVector FindDropOffCesnaCoordinates(void);
+ static bool HasCesnaLanded(void);
+ static bool HasCesnaBeenDestroyed(void);
+ static bool HasDropOffCesnaBeenShotDown(void);
};
static_assert(sizeof(CPlane) == 0x29C, "CPlane: error");
+
+extern float &LandingPoint;
+extern float &TakeOffPoint;
+extern float *PlanePathPosition; //[3]