diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /engine/logofile_shared.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'engine/logofile_shared.h')
| -rw-r--r-- | engine/logofile_shared.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/engine/logofile_shared.h b/engine/logofile_shared.h new file mode 100644 index 0000000..a9aa56a --- /dev/null +++ b/engine/logofile_shared.h @@ -0,0 +1,36 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//=============================================================================// + +#ifndef LOGOFILE_SHARED_H +#define LOGOFILE_SHARED_H +#ifdef _WIN32 +#pragma once +#endif + +#include "checksum_crc.h" + +// Turns a CRC value into a filename. +class CCustomFilename +{ +public: + CCustomFilename( CRC32_t value ) + { + char hex[16]; + Q_binarytohex( (byte *)&value, sizeof( value ), hex, sizeof( hex ) ); + Q_snprintf( m_Filename, sizeof( m_Filename ), "user_custom/%c%c/%s.dat", hex[0], hex[1], hex ); + } + + char m_Filename[MAX_OSPATH]; +}; + +// Validate a VTF file. +bool LogoFile_IsValidVTFFile( const void *pData, int len ); + +// Read in and validate a logo file. +bool LogoFile_ReadFile( CRC32_t crcValue, CUtlVector<char> &fileData ); + + +#endif // LOGOFILE_SHARED_H |