1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-11-18 06:57:45 +00:00
re3/src/vehicles/Plane.h

73 lines
1.7 KiB
C
Raw Normal View History

2019-06-02 15:13:56 +00:00
#pragma once
#include "Vehicle.h"
2019-07-31 21:57:18 +00:00
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;
};
2019-06-02 15:13:56 +00:00
class CPlane : public CVehicle
{
public:
// 0x288
2019-07-31 21:57:18 +00:00
int16 m_nPlaneId;
int16 m_isFarAway;
int16 m_nCurPathNode;
2019-07-16 15:03:37 +00:00
char field_654;
char field_655;
2019-07-31 21:57:18 +00:00
float m_fSpeed;
uint32 m_nFrameWhenHit;
bool m_bHasBeenHit;
bool m_bIsDrugRunCesna;
bool m_bIsDropOffCesna;
CPlane(int32 id, uint8 CreatedBy);
~CPlane(void);
2019-07-31 21:57:18 +00:00
// from CEntity
void SetModelIndex(uint32 id);
void DeleteRwObject(void);
void ProcessControl(void);
void PreRender(void);
void Render(void);
void FlagToDestroyWhenNextProcessed() { bRemoveFromWorld = true; }
2019-07-31 21:57:18 +00:00
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);
2020-01-23 15:43:19 +00:00
static const CVector FindDrugPlaneCoordinates(void);
static const CVector FindDropOffCesnaCoordinates(void);
2019-07-31 21:57:18 +00:00
static bool HasCesnaLanded(void);
static bool HasCesnaBeenDestroyed(void);
static bool HasDropOffCesnaBeenShotDown(void);
2019-06-02 15:13:56 +00:00
};
static_assert(sizeof(CPlane) == 0x29C, "CPlane: error");
2019-07-31 21:57:18 +00:00
extern float &LandingPoint;
extern float &TakeOffPoint;
extern float *PlanePathPosition; //[3]