Files
funnygame/game/client/assetmgr.h
2026-03-04 14:45:34 +02:00

76 lines
1.9 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 HFunnyPhysicalMesh;
typedef uint32_t HFunnyPhysicalMaterial;
typedef uint32_t HFunnyModel;
struct FunnyMaterial_t
{
IShader *m_pShaders;
IMaterial *m_pMaterial;
CBaseMaterial *m_pLayout;
};
struct FunnyMesh_t
{
IMesh *m_pMesh;
};
struct FunnyPhysicalMaterial_t
{
};
struct FunnyPhysicalMesh_t
{
HShape m_hShape;
};
struct FunnyModel_t
{
HFunnyMesh m_hMesh;
HFunnyMaterial m_hMaterial;
HFunnyPhysicalMesh m_hPhysicalMesh;
HFunnyPhysicalMaterial m_hPhysicalMaterial;
};
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 HFunnyPhysicalMesh LoadPhysicalMesh( const char *szName ) = 0;
virtual FunnyPhysicalMesh_t *GetPhysicalMeshByIndex( HFunnyPhysicalMesh hPhysicalMesh ) = 0;
virtual void UnrefPhysicalMesh( HFunnyPhysicalMesh hPhysicalMesh ) = 0;
virtual HFunnyPhysicalMaterial LoadPhysicalMaterial( const char *szName ) = 0;
virtual FunnyPhysicalMaterial_t *GetPhysicalMaterialByIndex( HFunnyPhysicalMaterial hPhysicalMaterial ) = 0;
virtual void UnrefPhysicalMaterial( HFunnyPhysicalMaterial hPhysicalMaterial ) = 0;
};
extern IAssetManager *g_pAssetManager;
#define ASSET_MANAGER_INTERFACE_VERSION "AssetMgr001"
#endif