Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
2.3 KiB

  1. //===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ========//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. // engine/launcher interface
  9. #ifndef ENGINE_LAUNCHER_APIH
  10. #define ENGINE_LAUNCHER_APIH
  11. #ifdef _WIN32
  12. #pragma once
  13. #endif
  14. #include "appframework/iappsystem.h"
  15. class CAppSystemGroup;
  16. struct StartupInfo_t
  17. {
  18. void *m_pInstance;
  19. const char *m_pBaseDirectory; // Executable directory ("c:/program files/half-life 2", for example)
  20. const char *m_pInitialMod; // Mod name ("cstrike", for example)
  21. const char *m_pInitialGame; // Root game name ("hl2", for example, in the case of cstrike)
  22. CAppSystemGroup *m_pParentAppSystemGroup;
  23. bool m_bTextMode;
  24. };
  25. //-----------------------------------------------------------------------------
  26. // Return values from the initialization stage of the application framework
  27. //-----------------------------------------------------------------------------
  28. enum
  29. {
  30. INIT_RESTART = INIT_LAST_VAL,
  31. RUN_FIRST_VAL,
  32. };
  33. //-----------------------------------------------------------------------------
  34. // Return values from IEngineAPI::Run.
  35. //-----------------------------------------------------------------------------
  36. enum
  37. {
  38. RUN_OK = RUN_FIRST_VAL,
  39. RUN_RESTART,
  40. };
  41. //-----------------------------------------------------------------------------
  42. // Main engine interface to launcher + tools
  43. //-----------------------------------------------------------------------------
  44. #define VENGINE_LAUNCHER_API_VERSION "VENGINE_LAUNCHER_API_VERSION004"
  45. abstract_class IEngineAPI : public IAppSystem
  46. {
  47. // Functions
  48. public:
  49. // This function must be called before init
  50. virtual bool SetStartupInfo( StartupInfo_t &info ) = 0;
  51. // Run the engine
  52. virtual int Run( ) = 0;
  53. // Sets the engine to run in a particular editor window
  54. virtual void SetEngineWindow( void *hWnd ) = 0;
  55. // Sets the engine to run in a particular editor window
  56. virtual void PostConsoleCommand( const char *pConsoleCommand ) = 0;
  57. // Are we running the simulation?
  58. virtual bool IsRunningSimulation( ) const = 0;
  59. // Start/stop running the simulation
  60. virtual void ActivateSimulation( bool bActive ) = 0;
  61. // Reset the map we're on
  62. virtual void SetMap( const char *pMapName ) = 0;
  63. };
  64. #endif // ENGINE_LAUNCHER_APIH