added main menus, improved shading

This commit is contained in:
2025-07-18 20:37:52 +03:00
parent dddf1b5881
commit 070c3ff309
45 changed files with 859 additions and 271 deletions

34
public/interface.h Normal file
View File

@@ -0,0 +1,34 @@
#ifndef INTERFACE_H
#define INTERFACE_H
#include "tier0/platform.h"
abstract_class IInterface
{
public:
virtual void Init() = 0;
virtual void Frame() = 0;
virtual void Deinit() = 0;
};
typedef IInterface*( *InterfaceRegistryFn )( void );
class CInterfaceRegistry
{
public:
CInterfaceRegistry( const char *szName, InterfaceRegistryFn pfn );
};
#define DECLARE_INTERFACE(iface, impl) \
IInterface *__interface_alloc_##impl() \
{ \
return new impl; \
}; \
CInterfaceRegistry __interface_##name##_registry(#iface, __interface_alloc_##impl); \
I##iface *iface() { \
static I##iface *pInterface = (I##iface*)__interface_alloc_##impl(); \
return pInterface; \
}
#endif