mirror of
https://github.com/nillerusr/source-engine.git
synced 2024-12-22 06:06:50 +00:00
57 lines
1.6 KiB
C
57 lines
1.6 KiB
C
//========= Copyright Valve Corporation, All rights reserved. ============//
|
|
//
|
|
// Purpose:
|
|
//
|
|
// $NoKeywords: $
|
|
//=============================================================================//
|
|
|
|
#ifndef DATATABLE_INSTRUMENTATION_H
|
|
#define DATATABLE_INSTRUMENTATION_H
|
|
#ifdef _WIN32
|
|
#pragma once
|
|
#endif
|
|
|
|
#include "dt_recv_eng.h"
|
|
#include "dt_encode.h"
|
|
|
|
|
|
// Is instrumentation enabled?
|
|
extern bool g_bDTIEnabled;
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------ //
|
|
// Instrumentation functions.
|
|
// ------------------------------------------------------------------------------------------ //
|
|
|
|
// This is called at startup to enable instrumentation.
|
|
void DTI_Init();
|
|
|
|
// Calls DTI_Flush and cleans up.
|
|
void DTI_Term();
|
|
|
|
// This writes out the instrumentation file.
|
|
void DTI_Flush();
|
|
|
|
// Setup instrumentation on a CRecvDecoder.
|
|
void DTI_HookRecvDecoder( CRecvDecoder *pDecoder );
|
|
|
|
// Notify the instrumentation that a delta bit has been read.
|
|
void DTI_HookDeltaBits( CRecvDecoder *pDecoder, int iProp, int nDataBits, int nIndexBits );
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------ //
|
|
// Inlines.
|
|
// ------------------------------------------------------------------------------------------ //
|
|
|
|
inline void DTI_HookDeltaBits( CRecvDecoder *pDecoder, int iProp, int nDataBits, int nIndexBits )
|
|
{
|
|
if( g_bDTIEnabled )
|
|
{
|
|
extern void _DTI_HookDeltaBits( CRecvDecoder *pDecoder, int iProp, int nDataBits, int nIndexBits );
|
|
_DTI_HookDeltaBits( pDecoder, iProp, nDataBits, nIndexBits );
|
|
}
|
|
}
|
|
|
|
#endif // DATATABLE_INSTRUMENTATION_H
|