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 /utils/tfstats/res2c/header.cpp | |
| download | archived-source-engine-2018-hl2-src-3bf9df6b2785fa6d951086978a3e66f49427166a.tar.xz archived-source-engine-2018-hl2-src-3bf9df6b2785fa6d951086978a3e66f49427166a.zip | |
Diffstat (limited to 'utils/tfstats/res2c/header.cpp')
| -rw-r--r-- | utils/tfstats/res2c/header.cpp | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/utils/tfstats/res2c/header.cpp b/utils/tfstats/res2c/header.cpp new file mode 100644 index 0000000..dd621e2 --- /dev/null +++ b/utils/tfstats/res2c/header.cpp @@ -0,0 +1,57 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +// +//=============================================================================// +char* szHeaderFile= +"//=========== (C) Copyright 1999 Valve, L.L.C. All rights reserved. ===========\n"\ +"//\n"\ +"// The copyright to the contents herein is the property of Valve, L.L.C.\n"\ +"// The contents may be used and/or copied only with the written permission of\n"\ +"// Valve, L.L.C., or in accordance with the terms and conditions stipulated in\n"\ +"// the agreement/contract under which the contents have been supplied.\n"\ +"//\n"\ +"// Purpose: \n"\ +"//\n"\ +"// $Workfile: $\n"\ +"// $Date: $\n"\ +"//\n"\ +"//------------------------------------------------------------------------------------------------------\n"\ +"// $Log: $\n"\ +"//\n"\ +"// $NoKeywords: $\n"\ +"//=============================================================================\n"\ +"#ifndef BINARYRESOURCE_H\n"\ +"#define BINARYRESOURCE_H\n"\ +"#ifdef WIN32\n"\ +"#pragma once\n"\ +"#endif\n"\ +"#include <string>\n"\ +"#include <stdio.h>\n"\ +"\n"\ +"class CBinaryResource\n"\ +"{\n"\ +"private:\n"\ +" std::string filename;\n"\ +" size_t numBytes;\n"\ +" unsigned char* pData;\n"\ +"public:\n"\ +" CBinaryResource(char* name, size_t bytes,unsigned char* data)\n"\ +" :filename(name),numBytes(bytes),pData(data)\n"\ +" {}\n"\ +" \n"\ +" bool writeOut()\n"\ +" {\n"\ +" FILE* f=fopen(filename.c_str(),\"wb\");\n"\ +" if (!f)\n"\ +" return false;\n"\ +" fwrite(pData,1,numBytes,f);\n"\ +" fclose(f);\n"\ +" return true;\n"\ +" }\n"\ +"};\n"\ +"\n"\ +"#endif // BINARYRESOURCE_H\n"\ +"\n";
\ No newline at end of file |