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.

58 lines
2.8 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. //=======================================================================================//
  4. #ifndef ICLIENTREPLAYCONTEXT_H
  5. #define ICLIENTREPLAYCONTEXT_H
  6. #ifdef _WIN32
  7. #pragma once
  8. #endif
  9. //----------------------------------------------------------------------------------------
  10. #include "replay/ireplaycontext.h"
  11. #include "replay/replayhandle.h"
  12. //----------------------------------------------------------------------------------------
  13. #define REPLAYHISTORYMANAGER_INTERFACE_VERSION_CLIENT "VENGINE_CLIENT_REPLAY_HISTORY_MANAGER_001"
  14. //----------------------------------------------------------------------------------------
  15. class CReplay;
  16. class CReplayPerformance;
  17. class IReplayManager;
  18. class IReplayMovieManager;
  19. class IReplayMovieRenderer;
  20. class IReplayScreenshotManager;
  21. class IReplayPerformanceManager;
  22. class IReplayPerformanceController;
  23. class IReplayRenderQueue;
  24. //----------------------------------------------------------------------------------------
  25. class IClientReplayContext : public IReplayContext
  26. {
  27. public:
  28. virtual CReplay *GetReplay( ReplayHandle_t hReplay ) = 0; // Shorthand to GetReplayManager()->GetReplay()
  29. virtual IReplayManager *GetReplayManager() = 0;
  30. virtual IReplayMovieRenderer *GetMovieRenderer() = 0;
  31. virtual IReplayMovieManager *GetMovieManager() = 0;
  32. virtual IReplayScreenshotManager *GetScreenshotManager() = 0;
  33. virtual IReplayPerformanceManager *GetPerformanceManager() = 0;
  34. virtual IReplayPerformanceController *GetPerformanceController() = 0;
  35. virtual IReplayRenderQueue *GetRenderQueue() = 0;
  36. virtual void SetMovieRenderer( IReplayMovieRenderer *pRenderer ) = 0; // Set to be the panel that renders replay movies, or NULL when nothing is rendering
  37. virtual void OnSignonStateFull() = 0;
  38. virtual void OnClientSideDisconnect() = 0; // Called when client disconnects
  39. virtual void PlayReplay( ReplayHandle_t hReplay, int iPerformance, bool bPlaySound ) = 0; // Play the given replay, from spawn tick to death tick
  40. virtual bool ReconstructReplayIfNecessary( CReplay *pReplay ) = 0;
  41. virtual void OnPlayerSpawn() = 0; // Called on the client when player is spawned
  42. virtual void OnPlayerClassChanged() = 0; // Called when the player's class changes - we use this instead of an event for immediacy
  43. virtual void GetPlaybackTimes( float &flOutTime, float &flOutLength, const CReplay *pReplay, const CReplayPerformance *pPerformance ) = 0; // Calculate the current time and length of a replay or performance - takes in tick and out tick into account for performances - flCurTime should be gpGlobals->curtime. pPerformance can be NULL.
  44. virtual uint64 GetServerSessionId( ReplayHandle_t hReplay ) = 0;
  45. };
  46. //----------------------------------------------------------------------------------------
  47. #endif // ICLIENTREPLAYCONTEXT_H