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 /engine/iengine.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'engine/iengine.h')
| -rw-r--r-- | engine/iengine.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/engine/iengine.h b/engine/iengine.h new file mode 100644 index 0000000..12a55b5 --- /dev/null +++ b/engine/iengine.h @@ -0,0 +1,59 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $Workfile: $ +// $Date: $ +// $NoKeywords: $ +//===========================================================================// +#if !defined( IENGINE_H ) +#define IENGINE_H +#ifdef _WIN32 +#pragma once +#endif + +#include "interface.h" + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +abstract_class IEngine +{ +public: + enum + { + QUIT_NOTQUITTING = 0, + QUIT_TODESKTOP, + QUIT_RESTART + }; + + // Engine State Flags + enum EngineState_t + { + DLL_INACTIVE = 0, // no dll + DLL_ACTIVE, // engine is focused + DLL_CLOSE, // closing down dll + DLL_RESTART, // engine is shutting down but will restart right away + DLL_PAUSED, // engine is paused, can become active from this state + }; + + + virtual ~IEngine( void ) { } + + virtual bool Load( bool dedicated, const char *rootdir ) = 0; + virtual void Unload( void ) = 0; + virtual void SetNextState( EngineState_t iNextState ) = 0; + virtual EngineState_t GetState( void ) = 0; + + virtual void Frame( void ) = 0; + + virtual float GetFrameTime( void ) = 0; + virtual float GetCurTime( void ) = 0; + + virtual int GetQuitting( void ) = 0; + virtual void SetQuitting( int quittype ) = 0; +}; + +extern IEngine *eng; + +#endif // IENGINE_H |