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.

56 lines
1.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. char* szHeaderFile=
  9. "//=========== (C) Copyright 1999 Valve, L.L.C. All rights reserved. ===========\n"\
  10. "//\n"\
  11. "// The copyright to the contents herein is the property of Valve, L.L.C.\n"\
  12. "// The contents may be used and/or copied only with the written permission of\n"\
  13. "// Valve, L.L.C., or in accordance with the terms and conditions stipulated in\n"\
  14. "// the agreement/contract under which the contents have been supplied.\n"\
  15. "//\n"\
  16. "// Purpose: \n"\
  17. "//\n"\
  18. "// $Workfile: $\n"\
  19. "// $Date: $\n"\
  20. "//\n"\
  21. "//------------------------------------------------------------------------------------------------------\n"\
  22. "// $Log: $\n"\
  23. "//\n"\
  24. "// $NoKeywords: $\n"\
  25. "//=============================================================================\n"\
  26. "#ifndef BINARYRESOURCE_H\n"\
  27. "#define BINARYRESOURCE_H\n"\
  28. "#ifdef WIN32\n"\
  29. "#pragma once\n"\
  30. "#endif\n"\
  31. "#include <string>\n"\
  32. "#include <stdio.h>\n"\
  33. "\n"\
  34. "class CBinaryResource\n"\
  35. "{\n"\
  36. "private:\n"\
  37. " std::string filename;\n"\
  38. " size_t numBytes;\n"\
  39. " unsigned char* pData;\n"\
  40. "public:\n"\
  41. " CBinaryResource(char* name, size_t bytes,unsigned char* data)\n"\
  42. " :filename(name),numBytes(bytes),pData(data)\n"\
  43. " {}\n"\
  44. " \n"\
  45. " bool writeOut()\n"\
  46. " {\n"\
  47. " FILE* f=fopen(filename.c_str(),\"wb\");\n"\
  48. " if (!f)\n"\
  49. " return false;\n"\
  50. " fwrite(pData,1,numBytes,f);\n"\
  51. " fclose(f);\n"\
  52. " return true;\n"\
  53. " }\n"\
  54. "};\n"\
  55. "\n"\
  56. "#endif // BINARYRESOURCE_H\n"\
  57. "\n";