SilentPatch/SilentPatchVC/VehicleVC.h

58 lines
1.1 KiB
C++

#pragma once
#include <cstdint>
#include "Maths.h"
enum eVehicleType
{
VEHICLE_AUTOMOBILE,
VEHICLE_BOAT,
VEHICLE_TRAIN,
VEHICLE_HELI,
VEHICLE_PLANE,
VEHICLE_BIKE
};
constexpr uint16_t MI_FBICAR = 147;
constexpr uint16_t MI_TAXI = 150;
constexpr uint16_t MI_FBIRANCH = 220;
constexpr uint16_t MI_VICECHEE = 236;
class CVehicle
{
protected:
// TODO: Make this part of CEntity properly
void* __vmt;
CMatrix m_matrix;
uint8_t __pad4[16];
uint16_t m_modelIndex; // TODO: THE FLA
uint8_t __pad1[414];
uint8_t m_BombOnBoard : 3;
uint8_t __pad2[17];
class CEntity* m_pBombOwner;
uint8_t __pad3[136];
uint32_t m_dwVehicleClass;
public:
int32_t GetModelIndex() const
{ return m_modelIndex; }
const CMatrix& GetMatrix() const
{ return m_matrix; }
uint32_t GetClass() const
{ return m_dwVehicleClass; }
void SetBombOnBoard( uint32_t bombOnBoard )
{ m_BombOnBoard = bombOnBoard; }
void SetBombOwner( class CEntity* owner )
{ m_pBombOwner = owner; }
};
class CAutomobile : public CVehicle
{
};
static_assert(sizeof(CVehicle) == 0x2A0, "Wrong size: CVehicle");