diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /dedicated/dedicated.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'dedicated/dedicated.h')
| -rw-r--r-- | dedicated/dedicated.h | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/dedicated/dedicated.h b/dedicated/dedicated.h new file mode 100644 index 0000000..1dbe25f --- /dev/null +++ b/dedicated/dedicated.h @@ -0,0 +1,78 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// Purpose: Defines a group of app systems that all have the same lifetime +// that need to be connected/initialized, etc. in a well-defined order +// +// $NoKeywords: $ +// +//===========================================================================// + +#ifndef DEDICATED_H +#define DEDICATED_H + +#ifdef _WIN32 +#pragma once +#endif + +#include "appframework/tier3app.h" + + +//----------------------------------------------------------------------------- +// Forward declarations +//----------------------------------------------------------------------------- +class IDedicatedServerAPI; + + +//----------------------------------------------------------------------------- +// Singleton interfaces +//----------------------------------------------------------------------------- +extern IDedicatedServerAPI *engine; + + +extern char g_szEXEName[ MAX_PATH ]; + + +//----------------------------------------------------------------------------- +// Inner loop: initialize, shutdown main systems, load steam to +//----------------------------------------------------------------------------- +#ifdef POSIX +#define DEDICATED_BASECLASS CTier2SteamApp +#else +#define DEDICATED_BASECLASS CVguiSteamApp +#endif + +class CDedicatedAppSystemGroup : public DEDICATED_BASECLASS +{ + typedef DEDICATED_BASECLASS BaseClass; + +public: + // Methods of IApplication + virtual bool Create( ); + virtual bool PreInit( ); + virtual int Main( ); + virtual void PostShutdown(); + virtual void Destroy(); + + // Used to chain to base class + AppModule_t LoadModule( CreateInterfaceFn factory ) + { + return CSteamAppSystemGroup::LoadModule( factory ); + } + + // Method to add various global singleton systems + bool AddSystems( AppSystemInfo_t *pSystems ) + { + return CSteamAppSystemGroup::AddSystems( pSystems ); + } + + void *FindSystem( const char *pInterfaceName ) + { + return CSteamAppSystemGroup::FindSystem( pInterfaceName ); + } +}; + + + +#endif // DEDICATED_H |