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 /common/engine_launcher_api.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'common/engine_launcher_api.h')
| -rw-r--r-- | common/engine_launcher_api.h | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/common/engine_launcher_api.h b/common/engine_launcher_api.h new file mode 100644 index 0000000..56b50f3 --- /dev/null +++ b/common/engine_launcher_api.h @@ -0,0 +1,84 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +// +//=============================================================================// +// engine/launcher interface +#ifndef ENGINE_LAUNCHER_APIH +#define ENGINE_LAUNCHER_APIH +#ifdef _WIN32 +#pragma once +#endif + +#include "appframework/IAppSystem.h" + +class CAppSystemGroup; + + +struct StartupInfo_t +{ + void *m_pInstance; + const char *m_pBaseDirectory; // Executable directory ("c:/program files/half-life 2", for example) + const char *m_pInitialMod; // Mod name ("cstrike", for example) + const char *m_pInitialGame; // Root game name ("hl2", for example, in the case of cstrike) + CAppSystemGroup *m_pParentAppSystemGroup; + bool m_bTextMode; +}; + + +//----------------------------------------------------------------------------- +// Return values from the initialization stage of the application framework +//----------------------------------------------------------------------------- +enum +{ + INIT_RESTART = INIT_LAST_VAL, + RUN_FIRST_VAL, +}; + + +//----------------------------------------------------------------------------- +// Return values from IEngineAPI::Run. +//----------------------------------------------------------------------------- +enum +{ + RUN_OK = RUN_FIRST_VAL, + RUN_RESTART, +}; + + +//----------------------------------------------------------------------------- +// Main engine interface to launcher + tools +//----------------------------------------------------------------------------- +#define VENGINE_LAUNCHER_API_VERSION "VENGINE_LAUNCHER_API_VERSION004" + +abstract_class IEngineAPI : public IAppSystem +{ +// Functions +public: + // This function must be called before init + virtual void SetStartupInfo( StartupInfo_t &info ) = 0; + + // Run the engine + virtual int Run( ) = 0; + + // Sets the engine to run in a particular editor window + virtual void SetEngineWindow( void *hWnd ) = 0; + + // Sets the engine to run in a particular editor window + virtual void PostConsoleCommand( const char *pConsoleCommand ) = 0; + + // Are we running the simulation? + virtual bool IsRunningSimulation( ) const = 0; + + // Start/stop running the simulation + virtual void ActivateSimulation( bool bActive ) = 0; + + // Reset the map we're on + virtual void SetMap( const char *pMapName ) = 0; + +}; + + +#endif // ENGINE_LAUNCHER_APIH |