Team Fortress 2 Source Code as on 22/4/2020
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.

59 lines
1.4 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. // $NoKeywords: $
  8. //===========================================================================//
  9. #if !defined( IENGINE_H )
  10. #define IENGINE_H
  11. #ifdef _WIN32
  12. #pragma once
  13. #endif
  14. #include "interface.h"
  15. //-----------------------------------------------------------------------------
  16. // Purpose:
  17. //-----------------------------------------------------------------------------
  18. abstract_class IEngine
  19. {
  20. public:
  21. enum
  22. {
  23. QUIT_NOTQUITTING = 0,
  24. QUIT_TODESKTOP,
  25. QUIT_RESTART
  26. };
  27. // Engine State Flags
  28. enum EngineState_t
  29. {
  30. DLL_INACTIVE = 0, // no dll
  31. DLL_ACTIVE, // engine is focused
  32. DLL_CLOSE, // closing down dll
  33. DLL_RESTART, // engine is shutting down but will restart right away
  34. DLL_PAUSED, // engine is paused, can become active from this state
  35. };
  36. virtual ~IEngine( void ) { }
  37. virtual bool Load( bool dedicated, const char *rootdir ) = 0;
  38. virtual void Unload( void ) = 0;
  39. virtual void SetNextState( EngineState_t iNextState ) = 0;
  40. virtual EngineState_t GetState( void ) = 0;
  41. virtual void Frame( void ) = 0;
  42. virtual float GetFrameTime( void ) = 0;
  43. virtual float GetCurTime( void ) = 0;
  44. virtual int GetQuitting( void ) = 0;
  45. virtual void SetQuitting( int quittype ) = 0;
  46. };
  47. extern IEngine *eng;
  48. #endif // IENGINE_H