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.

38 lines
894 B

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef LOGOFILE_SHARED_H
  7. #define LOGOFILE_SHARED_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "checksum_crc.h"
  12. #define CUSTOM_FILES_FOLDER "downloads"
  13. // Turns a CRC value into a filename.
  14. class CCustomFilename
  15. {
  16. public:
  17. CCustomFilename( CRC32_t value )
  18. {
  19. char hex[16];
  20. Q_binarytohex( (byte *)&value, sizeof( value ), hex, sizeof( hex ) );
  21. Q_snprintf( m_Filename, sizeof( m_Filename ), "%s/%s.dat", CUSTOM_FILES_FOLDER, hex );
  22. }
  23. char m_Filename[MAX_OSPATH];
  24. };
  25. // Validate a VTF file.
  26. bool LogoFile_IsValidVTFFile( const void *pData, int len );
  27. // Read in and validate a logo file.
  28. bool LogoFile_ReadFile( CRC32_t crcValue, CUtlVector<char> &fileData );
  29. #endif // LOGOFILE_SHARED_H