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.

63 lines
1.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef CL_DEMOACTIONMANAGER_H
  8. #define CL_DEMOACTIONMANAGER_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. class CUtlBuffer;
  13. namespace vgui
  14. {
  15. class Panel;
  16. };
  17. class CBaseDemoAction;
  18. struct democmdinfo_t;
  19. //-----------------------------------------------------------------------------
  20. // Purpose:
  21. //-----------------------------------------------------------------------------
  22. abstract_class IDemoActionManager
  23. {
  24. public:
  25. virtual ~IDemoActionManager( void ) {}
  26. virtual void Init( void ) = 0;
  27. virtual void Shutdown( void ) = 0;
  28. virtual void StartPlaying( char const *demfilename ) = 0;
  29. virtual void StopPlaying() = 0;
  30. virtual void Update( bool newframe, int demoframe, float demotime ) = 0;
  31. virtual void SaveToBuffer( CUtlBuffer& buf ) = 0;
  32. virtual void SaveToFile( void ) = 0;
  33. virtual char const *GetCurrentDemoFile( void ) = 0;
  34. virtual int GetActionCount( void ) = 0;
  35. virtual CBaseDemoAction *GetAction( int index ) = 0;
  36. virtual void AddAction( CBaseDemoAction *action ) = 0;
  37. virtual void RemoveAction( CBaseDemoAction *action ) = 0;
  38. virtual bool IsDirty( void ) const = 0;
  39. virtual void SetDirty( bool dirty ) = 0;
  40. virtual void ReloadFromDisk( void ) = 0;
  41. virtual void DispatchEvents() = 0;
  42. virtual void InsertFireEvent( CBaseDemoAction *action ) = 0;
  43. virtual bool OverrideView( democmdinfo_t& info, int tick ) = 0;
  44. };
  45. extern IDemoActionManager *demoaction;
  46. #endif // CL_DEMOACTIONMANAGER_H