64 lines
1.4 KiB
C++
64 lines
1.4 KiB
C++
#ifndef ASSET_MANAGER_H
|
|
#define ASSET_MANAGER_H
|
|
|
|
#include "materialsystem/imaterialsystem.h"
|
|
#include "worldrender.h"
|
|
#include "datamap.h"
|
|
#include "materials.h"
|
|
#include "iphysics.h"
|
|
#include "tier1/utlstring.h"
|
|
|
|
typedef uint32_t HFunnyMaterial;
|
|
typedef uint32_t HFunnyMesh;
|
|
typedef uint32_t HFunnyPhysics;
|
|
typedef uint32_t HFunnyModel;
|
|
|
|
struct FunnyMaterial_t
|
|
{
|
|
IShader *m_pShaders;
|
|
IMaterial *m_pMaterial;
|
|
CBaseMaterial *m_pLayout;
|
|
};
|
|
|
|
struct FunnyMesh_t
|
|
{
|
|
IMesh *m_pMesh;
|
|
};
|
|
|
|
struct FunnyPhysics_t
|
|
{
|
|
HShape m_hShape;
|
|
};
|
|
|
|
struct FunnyModel_t
|
|
{
|
|
HFunnyMesh m_hMesh;
|
|
HFunnyMaterial m_hMaterial;
|
|
HFunnyPhysics m_hPhysics;
|
|
};
|
|
|
|
|
|
class IAssetManager
|
|
{
|
|
public:
|
|
virtual HFunnyModel LoadModel( const char *szName ) = 0;
|
|
virtual FunnyModel_t *GetModelByIndex( HFunnyModel hModel ) = 0;
|
|
virtual void UnrefModel( HFunnyModel uIndex ) = 0;
|
|
|
|
virtual HFunnyMesh LoadMesh( const char *szName ) = 0;
|
|
virtual FunnyMesh_t *GetMeshByIndex( HFunnyMesh hMesh ) = 0;
|
|
virtual void UnrefMesh( HFunnyMesh hMesh ) = 0;
|
|
|
|
virtual HFunnyMaterial LoadMaterial( const char *szName ) = 0;
|
|
virtual FunnyMaterial_t *GetMaterialByIndex( HFunnyMaterial hMat ) = 0;
|
|
virtual void UnrefMaterial( HFunnyMaterial hMat ) = 0;
|
|
|
|
virtual HFunnyPhysics LoadPhysics( const char *szName ) = 0;
|
|
virtual FunnyPhysics_t *GetPhysicsByIndex( HFunnyPhysics hPhysics ) = 0;
|
|
virtual void UnrefPhysics( HFunnyPhysics hPhysics ) = 0;
|
|
};
|
|
|
|
extern IAssetManager *g_pAssetManager;
|
|
|
|
#endif
|