Counter Strike : Global Offensive Source Code
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.

27 lines
865 B

  1. //========== Copyright � Valve Corporation, All rights reserved. ========
  2. // NOTE: DO NOT INCLUDE vatoms.h, we don't want to rebuild tier0 every time
  3. // the header changes.
  4. //
  5. #include "tier0/platform.h"
  6. #include "tier0/dbg.h"
  7. #include "tier0/memdbgon.h"
  8. PLATFORM_INTERFACE void** GetVAtom( int nAtomIndex );
  9. static void* g_atoms[16] = {NULL}; // all pointers must be initialized to NULL
  10. void** GetVAtom( int nAtomIndex )
  11. {
  12. if( uint( nAtomIndex ) >= ARRAYSIZE( g_atoms ) )
  13. {
  14. ConMsg (
  15. "*******************************************************************\n"
  16. " *** ERROR *** \n"
  17. "VATOM index %d out of range, recompile tier0 with larger atom table\n"
  18. "*******************************************************************\n",
  19. nAtomIndex );
  20. return NULL;
  21. }
  22. return &g_atoms[nAtomIndex];
  23. }