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.

45 lines
1.9 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef IBSPPACK_H
  8. #define IBSPPACK_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "interface.h"
  13. #include "utlvector.h"
  14. #include "utlstring.h"
  15. class IFileSystem;
  16. abstract_class IBSPPack
  17. {
  18. public:
  19. virtual void LoadBSPFile( IFileSystem *pFileSystem, char *filename ) = 0;
  20. virtual void WriteBSPFile( char *filename ) = 0;
  21. virtual void ClearPackFile( void ) = 0;
  22. virtual void AddFileToPack( const char *relativename, const char *fullpath ) = 0;
  23. virtual void AddBufferToPack( const char *relativename, void *data, int length, bool bTextMode ) = 0;
  24. virtual void SetHDRMode( bool bHDR ) = 0;
  25. virtual bool SwapBSPFile( IFileSystem *pFileSystem, const char *filename, const char *swapFilename, bool bSwapOnLoad, VTFConvertFunc_t pVTFConvertFunc, VHVFixupFunc_t pVHVFixupFunc, StudioConvertFunc_t pStudioConvertFunc, CompressFunc_t pCompressFunc, char const *szPlatform ) = 0;
  26. // used to get/set the pak file from a BSP
  27. virtual bool GetPakFileLump( IFileSystem *pFileSystem, const char *pBSPFilename, void **pPakData, int *pPakSize ) = 0;
  28. virtual bool SetPakFileLump( IFileSystem *pFileSystem, const char *pBSPFilename, const char *pNewFilename, void *pPakData, int pakSize ) = 0;
  29. // populates list of files that bsp owns, i.e. world/cubmap materials, statis props, etc
  30. virtual bool GetBSPDependants( IFileSystem *pFileSystem, const char *pBSPFilename, CUtlVector< CUtlString > *pList ) = 0;
  31. // This is here to avoid having things like the runtime engine.dll have to statically link to LZMA for the encoder!!!
  32. virtual void AddBufferToPackAndLZMACompress( const char *relativename, void *data, int length ) = 0;
  33. virtual void RemoveFileFromPack( char const *relativename ) = 0;
  34. };
  35. #define IBSPPACK_VERSION_STRING "IBSPPACK003"
  36. #endif // IBSPPACK_H