r5sdk/r5dev/engine/gl_model_private.h
Kawe Mazidjatari 7d89a42b56 Mathlib implementation
SourceSDK mathlib port with light modifications.
Renamed Vector to Vector3D (to avoid confusion with std::vector (declared as vector) and Vector2D/Vector4D).
2022-07-06 21:11:32 +02:00

69 lines
1.7 KiB
C

//=============================================================================//
//
// Purpose:
//
// $Workfile: $
// $Date: $
// $NoKeywords: $
//=============================================================================//
#include "vpc/keyvalues.h"
#include "mathlib/vector.h"
#include "common/qlimits.h"
#include "datacache/imdlcache.h"
#include "public/include/model_types.h"
#ifndef DEDICATED
#include "game/client/enginesprite.h"
#endif // !DEDICATED
typedef int FileNameHandle_t; // 4 bytes in r5, void* originally.
struct brushdata_t // !! UNCONFIRMED !!
{
void* pShared; // worldbrushdata_t
int firstmodelsurface;
int nummodelsurfaces;
// track the union of all lightstyles on this brush. That way we can avoid
// searching all faces if the lightstyle hasn't changed since the last update
int nLightstyleLastComputedFrame;
unsigned short nLightstyleIndex; // g_ModelLoader actually holds the allocated data here
unsigned short nLightstyleCount;
unsigned short renderHandle;
unsigned short firstnode;
};
#ifndef DEDICATED
struct spritedata_t // !! UNCONFIRMED !!
{
int numframes;
int width;
int height;
CEngineSprite* sprite;
};
#endif // !DEDICATED
struct model_t // !! CONFIRMED !!
{
FileNameHandle_t fnHandle;
char szPathName[MAX_OSPATH];
int nLoadFlags; // mark loaded/not loaded
int nServerCount; // marked at load
modtype_t type;
int flags; // MODELFLAG_???
// volume occupied by the model graphics
Vector3D mins, maxs;
float radius;
KeyValues* m_pKeyValues;
union
{
brushdata_t brush;
MDLHandle_t studio;
#ifndef DEDICATED
spritedata_t sprite;
#endif // !DEDICATED
};
};