84 lines
1.4 KiB
C++
84 lines
1.4 KiB
C++
#pragma once
|
||
|
||
#include <Windows.h>
|
||
|
||
struct RecvProp;
|
||
|
||
class DVariant
|
||
{
|
||
public:
|
||
union
|
||
{
|
||
float m_Float;
|
||
long m_Int;
|
||
char *m_pString;
|
||
void *m_pData;
|
||
float m_Vector[3];
|
||
};
|
||
};
|
||
|
||
namespace SourceEngine
|
||
{
|
||
enum class SendPropType
|
||
{
|
||
DPT_Int = 0,
|
||
DPT_Float,
|
||
DPT_Vector,
|
||
DPT_VectorXY, // Only encodes the XY of a vector, ignores Z
|
||
DPT_String,
|
||
DPT_Array, // An array of the base types (can't be of datatables).
|
||
DPT_DataTable,
|
||
DPT_Int64,
|
||
DPT_NUMSendPropTypes
|
||
};
|
||
};
|
||
|
||
class CRecvProxyData
|
||
{
|
||
public:
|
||
const RecvProp *m_pRecvProp;
|
||
DVariant m_Value;
|
||
int m_iElement;
|
||
int m_ObjectID;
|
||
};
|
||
|
||
typedef void(*RecvVarProxyFn)(const CRecvProxyData *pData, void *pStruct, void *pOut);
|
||
|
||
struct RecvTable
|
||
{
|
||
RecvProp *m_pProps;
|
||
int m_nProps;
|
||
void *m_pDecoder;
|
||
char *m_pNetTableName;
|
||
bool m_bInitialized;
|
||
bool m_bInMainList;
|
||
};
|
||
|
||
struct RecvProp
|
||
{
|
||
char *m_pVarName;
|
||
int m_RecvType;
|
||
int m_Flags;
|
||
int m_StringBufferSize;
|
||
bool m_bInsideArray;
|
||
const void *m_pExtraData;
|
||
RecvProp *m_pArrayProp;
|
||
void* m_ArrayLengthProxy;
|
||
void* m_ProxyFn;
|
||
void* m_DataTableProxyFn;
|
||
RecvTable *m_pDataTable;
|
||
int m_Offset;
|
||
int m_ElementStride;
|
||
int m_nElements;
|
||
const char *m_pParentArrayPropName;
|
||
};
|
||
|
||
struct ClientClass
|
||
{
|
||
BYTE _chPadding[8];
|
||
char * GetName;
|
||
RecvTable * GetTable;
|
||
ClientClass * NextClass;
|
||
int GetClassID;
|
||
};
|