Re3/src/control/Cranes.h

62 lines
1.4 KiB
C
Raw Normal View History

2019-08-11 13:11:54 -04:00
#pragma once
#include "common.h"
class CVehicle;
2020-02-24 14:40:39 -05:00
class CEntity;
class CObject;
class CCrane
{
public:
CEntity *m_pObject;
CObject *m_pMagnet;
int m_nAudioEntity;
float m_fPickupX1;
float m_fPickupX2;
float m_fPickupY1;
float m_fPickupY2;
CVector m_vecDropoffTarget;
float m_fDropoffHeading;
float m_fPickupAngle;
float m_fDropoffAngle;
float m_fPickupDistance;
float m_fDropoffDistance;
float m_fAngle;
float m_fDistance;
float m_fHeight;
float m_fHookOffset;
float m_fHookHeight;
CVector m_vecHookInitPos;
CVector m_vecHookCurPos;
float m_fHookVelocityX;
float m_fHookVelocityY;
CVehicle *m_pVehiclePickedUp;
int m_nUpdateTimer;
char m_bCraneActive;
char m_bCraneStatus;
char m_bVehiclesCollected;
char m_bIsCrusher;
char m_bIsMilitaryCrane;
char field_125;
char m_bNotMilitaryCrane;
char gap_127[1];
};
static_assert(sizeof(CCrane) == 128, "CCrane: error");
2019-08-11 13:11:54 -04:00
class CCranes
{
public:
static bool IsThisCarBeingTargettedByAnyCrane(CVehicle*);
2019-10-06 17:39:25 -04:00
static bool IsThisCarBeingCarriedByAnyCrane(CVehicle*);
2020-02-02 06:47:03 -05:00
static bool IsThisCarPickedUp(float, float, CVehicle*);
2020-02-16 15:08:54 -05:00
static bool HaveAllCarsBeenCollectedByMilitaryCrane();
2019-10-13 07:46:09 -04:00
static void ActivateCrane(float, float, float, float, float, float, float, float, bool, bool, float, float);
static void DeActivateCrane(float, float);
2019-10-18 18:23:40 -04:00
static void InitCranes(void);
static void UpdateCranes(void);
2020-03-10 23:25:50 -04:00
static void Save(uint8*, uint32*);
2019-08-11 13:11:54 -04:00
};
2020-03-10 23:25:50 -04:00
void CranesLoad(uint8*, uint32); // is this really outside CCranes?