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.

56 lines
1.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef DATATABLE_INSTRUMENTATION_H
  8. #define DATATABLE_INSTRUMENTATION_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "dt_recv_eng.h"
  13. #include "dt_encode.h"
  14. // Is instrumentation enabled?
  15. extern bool g_bDTIEnabled;
  16. // ------------------------------------------------------------------------------------------ //
  17. // Instrumentation functions.
  18. // ------------------------------------------------------------------------------------------ //
  19. // This is called at startup to enable instrumentation.
  20. void DTI_Init();
  21. // Calls DTI_Flush and cleans up.
  22. void DTI_Term();
  23. // This writes out the instrumentation file.
  24. void DTI_Flush();
  25. // Setup instrumentation on a CRecvDecoder.
  26. void DTI_HookRecvDecoder( CRecvDecoder *pDecoder );
  27. // Notify the instrumentation that a delta bit has been read.
  28. void DTI_HookDeltaBits( CRecvDecoder *pDecoder, int iProp, int nDataBits, int nIndexBits );
  29. // ------------------------------------------------------------------------------------------ //
  30. // Inlines.
  31. // ------------------------------------------------------------------------------------------ //
  32. inline void DTI_HookDeltaBits( CRecvDecoder *pDecoder, int iProp, int nDataBits, int nIndexBits )
  33. {
  34. if( g_bDTIEnabled )
  35. {
  36. extern void _DTI_HookDeltaBits( CRecvDecoder *pDecoder, int iProp, int nDataBits, int nIndexBits );
  37. _DTI_HookDeltaBits( pDecoder, iProp, nDataBits, nIndexBits );
  38. }
  39. }
  40. #endif // DATATABLE_INSTRUMENTATION_H