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 /replay/replay_dbg.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'replay/replay_dbg.h')
| -rw-r--r-- | replay/replay_dbg.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/replay/replay_dbg.h b/replay/replay_dbg.h new file mode 100644 index 0000000..f6765bc --- /dev/null +++ b/replay/replay_dbg.h @@ -0,0 +1,40 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +//=======================================================================================// + +#ifndef REPLAY_DBG_H +#define REPLAY_DBG_H +#ifdef _WIN32 +#pragma once +#endif + +//---------------------------------------------------------------------------------------- + +#include "replay/ienginereplay.h" +#include "convar.h" + +//---------------------------------------------------------------------------------------- + +extern ConVar replay_debug; +extern IEngineReplay *g_pEngine; + +//---------------------------------------------------------------------------------------- + +#define IF_REPLAY_DBG( x_ ) if ( replay_debug.GetBool() ) { x_; } +#define IF_REPLAY_DBGN( x_, n_ ) if ( replay_debug.GetInt() >= n_ ) { x_; } +#define IF_REPLAY_DBG2( x_ ) IF_REPLAY_DBGN( x_, 2 ) +#define IF_REPLAY_DBG3( x_ ) IF_REPLAY_DBGN( x_, 3 ) + +#ifndef DEDICATED +#define DBG( x_ ) IF_REPLAY_DBG( Msg( "%f: " x_, g_pEngine->GetHostTime() ) ) +#define DBGN( x_, n_ ) IF_REPLAY_DBGN( Msg( "%f: " x_, g_pEngine->GetHostTime() ), n_ ) +#define DBG2( x_ ) DBGN( x_, 2 ) +#define DBG3( x_ ) DBGN( x_, 3 ) +#else +#define DBG( x_ ) +#define DBG2( x_ ) +#endif + +//---------------------------------------------------------------------------------------- + +#endif // REPLAY_DBG_H |