diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /common/replay/ireplayperformancecontroller.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'common/replay/ireplayperformancecontroller.h')
| -rw-r--r-- | common/replay/ireplayperformancecontroller.h | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/common/replay/ireplayperformancecontroller.h b/common/replay/ireplayperformancecontroller.h new file mode 100644 index 0000000..70a119e --- /dev/null +++ b/common/replay/ireplayperformancecontroller.h @@ -0,0 +1,107 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +//=======================================================================================// + +#ifndef IREPLAYPERFORMANCECONTROLLER_H +#define IREPLAYPERFORMANCECONTROLLER_H +#ifdef _WIN32 +#pragma once +#endif + +//---------------------------------------------------------------------------------------- + +#include "interface.h" +#include "tier1/strtools.h" + +//---------------------------------------------------------------------------------------- + +class IReplayPerformanceEditor; +class CReplay; +class Vector; +class QAngle; +class CReplayPerformance; + +//---------------------------------------------------------------------------------------- + +// These values are what we use to represent + +struct SetViewParams_t +{ + SetViewParams_t() { V_memset( this, 0, sizeof( SetViewParams_t ) ); } + SetViewParams_t( float flTime, Vector *pOrigin, QAngle *pAngles, float flFov, float flAccel, + float flSpeed, float flRotFilter ) + : m_flTime( flTime ), + m_pOrigin( pOrigin ), + m_pAngles( pAngles ), + m_flFov( flFov ), + m_flAccel( flAccel ), + m_flSpeed( flSpeed ), + m_flRotationFilter( flRotFilter ) + { + } + + float m_flTime; + Vector *m_pOrigin; + QAngle *m_pAngles; + float m_flFov; + + // Right now only used for updating UI during playback: + float m_flAccel; + float m_flSpeed; + float m_flRotationFilter; +}; + +//---------------------------------------------------------------------------------------- + +class IReplayPerformanceController : public IBaseInterface +{ +public: + virtual void SetEditor( IReplayPerformanceEditor *pEditor ) = 0; + + virtual bool IsPlaybackDataLeft() = 0; + + virtual void StartRecording( CReplay *pReplay, bool bSnip ) = 0; + virtual void NotifyRewinding() = 0; + + virtual void Stop() = 0; + virtual bool SaveAsync() = 0; + virtual bool SaveAsAsync( const wchar *pTitle ) = 0; + + virtual bool IsSaving() const = 0; + + virtual void SaveThink() = 0; + + virtual bool GetLastSaveStatus() const = 0; + + virtual bool IsRecording() const = 0; + virtual bool IsPlaying() const = 0; + + virtual bool IsDirty() const = 0; + virtual void NotifyDirty() = 0; + + virtual CReplayPerformance *GetPerformance() = 0; + virtual CReplayPerformance *GetSavedPerformance() = 0; + virtual bool HasSavedPerformance() = 0; + + virtual void NotifyPauseState( bool bPaused ) = 0; + + virtual void ClearRewinding() = 0; + + virtual void OnSignonStateFull() = 0; + + virtual float GetPlaybackTimeScale() const = 0; + + // + // Recorder-specific: + // + virtual void AddEvent_Camera_Change_FirstPerson( float flTime, int nEntityIndex ) = 0; + virtual void AddEvent_Camera_Change_ThirdPerson( float flTime, int nEntityIndex ) = 0; + virtual void AddEvent_Camera_Change_Free( float flTime ) = 0; + virtual void AddEvent_Camera_ChangePlayer( float flTime, int nEntIndex ) = 0; + virtual void AddEvent_Camera_SetView( const SetViewParams_t ¶ms ) = 0; + virtual void AddEvent_TimeScale( float flTime, float flScale ) = 0; +}; + +//---------------------------------------------------------------------------------------- + +#endif // IREPLAYPERFORMANCECONTROLLER_H |