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
2.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. //=======================================================================================//
  4. #ifndef ICLIENTREPLAY_H
  5. #define ICLIENTREPLAY_H
  6. #ifdef _WIN32
  7. #pragma once
  8. #endif
  9. //----------------------------------------------------------------------------------------
  10. #include "interface.h"
  11. #include "replay/replayhandle.h"
  12. //----------------------------------------------------------------------------------------
  13. #define CLIENT_REPLAY_INTERFACE_VERSION "ClientReplay001"
  14. //----------------------------------------------------------------------------------------
  15. class IReplayFactory;
  16. class IReplayScreenshotSystem;
  17. class IReplayPerformancePlaybackHandler;
  18. class KeyValues;
  19. class IReplayCamera;
  20. class CReplayPerformance;
  21. struct RenderMovieParams_t;
  22. class IGameEvent;
  23. //----------------------------------------------------------------------------------------
  24. //
  25. // Allows the replay and engine DLL's to talk to the client.
  26. //
  27. class IClientReplay : public IBaseInterface
  28. {
  29. public:
  30. virtual uint64 GetServerSessionId() = 0;
  31. virtual bool CacheReplayRagdolls( const char* pFilename, int nStartTick ) = 0; // Cache replay ragdolls
  32. virtual IReplayScreenshotSystem *GetReplayScreenshotSystem() = 0; // Get the client's replay screenshot system
  33. virtual IReplayPerformancePlaybackHandler *GetPerformancePlaybackHandler() = 0;
  34. virtual IReplayCamera *GetReplayCamera() = 0;
  35. virtual void DisplayReplayMessage( const char *pLocalizeStr, bool bUrgent, bool bDlg, const char *pSound ) = 0;
  36. virtual void DisplayReplayMessage( const wchar_t *pText, bool bUrgent, bool bDlg, const char *pSound ) = 0;
  37. virtual void InitPerformanceEditor( ReplayHandle_t hReplay ) = 0;
  38. virtual void HidePerformanceEditor() = 0;
  39. virtual bool ShouldRender() = 0;
  40. virtual void PlaySound( const char *pSound ) = 0;
  41. virtual void UploadOgsData( KeyValues *pData, bool bIncludeTimeField ) = 0;
  42. virtual bool ShouldCompletePendingReplay( IGameEvent *pEvent ) = 0;
  43. virtual void OnSaveReplay( ReplayHandle_t hNewReplay, bool bShowInputDlg ) = 0;
  44. virtual void OnDeleteReplay( ReplayHandle_t hReplay ) = 0; // Called before replay is actually removed from the replay manager
  45. virtual void OnPlaybackComplete( ReplayHandle_t hReplay, int iPerformance ) = 0;
  46. virtual void OnRenderStart() = 0;
  47. virtual void OnRenderComplete( const RenderMovieParams_t &RenderParams, bool bCancelled, bool bSuccess, bool bShowBrowser ) = 0;
  48. virtual bool OnConfirmQuit() = 0;
  49. virtual bool OnEndOfReplayReached() = 0;
  50. };
  51. //----------------------------------------------------------------------------------------
  52. #endif // ICLIENTREPLAY_H