Started work on build system

This commit is contained in:
2025-05-31 00:42:41 +03:00
parent 953cca2aa4
commit ade32c24a6
33 changed files with 369 additions and 498 deletions

View File

@@ -6,11 +6,29 @@
#include "baseentity.h"
#include "physics.h"
//-----------------------------------------------------------------------------
// Basic triangle structure which is used in brush entities.
//-----------------------------------------------------------------------------
struct Triangle_t
{
float location[9];
float uv[6];
float normal[9];
uint32_t texture;
};
//-----------------------------------------------------------------------------
// Basic brush entity which has its own geometry defined.
// They have constant position, shape, and rotation, so it makes them
// non-interactable with the game world in terms of ability to modify it at
// runtime. Collisions are precise.
//-----------------------------------------------------------------------------
class CBrushEntity: public CBaseEntity
{
public:
virtual void Precache ( void ) override;
virtual void Spawn( void ) override;
virtual void ReadParameter( const char *szName, const char *szValue ) override;
virtual void Destroy( void ) override;
virtual void Think( float fDelta ) override;
@@ -19,6 +37,9 @@ public:
RigidBodyHandle *m_body;
};
//-----------------------------------------------------------------------------
// Client rendering for brush entitites.
//-----------------------------------------------------------------------------
class C_BrushEntity: public C_BaseEntity
{
public:
@@ -29,7 +50,7 @@ public:
private:
IVertexBuffer *vertexBuffer;
IIndexBuffer *indexBuffer;
IBrush *mesh;
IMesh *mesh;
IMaterial material;
ITexture *pAlbedo;
};