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.

45 lines
1.4 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. //=======================================================================================//
  4. #if !defined( RENAMED_RECVTABLE_COMPAT_H )
  5. #define RENAMED_RECVTABLE_COMPAT_H
  6. #ifdef _WIN32
  7. #pragma once
  8. #endif
  9. class CRenamedRecvTableInfo;
  10. extern CRenamedRecvTableInfo *g_pRenamedRecvTableInfoHead;
  11. //-----------------------------------------------------------------------------
  12. // Purpose: Used by NOTE_RENAMED_RECVTABLE() macro.
  13. //-----------------------------------------------------------------------------
  14. class CRenamedRecvTableInfo
  15. {
  16. public:
  17. CRenamedRecvTableInfo( const char *pOldName, const char *pNewName )
  18. : m_pOldName( pOldName ),
  19. m_pNewName( pNewName )
  20. {
  21. m_pNext = g_pRenamedRecvTableInfoHead;
  22. g_pRenamedRecvTableInfoHead = this;
  23. }
  24. public:
  25. const char *m_pOldName;
  26. const char *m_pNewName;
  27. CRenamedRecvTableInfo *m_pNext;
  28. };
  29. //-----------------------------------------------------------------------------
  30. // Purpose: To keep from breaking older demos, use this macro to allow the
  31. // engine to find the new datatable from the old name.
  32. //-----------------------------------------------------------------------------
  33. #define NOTE_RENAMED_RECVTABLE( oldname_, newname_ ) \
  34. static CRenamedRecvTableInfo g_##oldname_##Register( \
  35. #oldname_, \
  36. #newname_ \
  37. );
  38. #endif // RENAMED_RECVTABLE_COMPAT_H