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 /public/ibsppack.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'public/ibsppack.h')
| -rw-r--r-- | public/ibsppack.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/public/ibsppack.h b/public/ibsppack.h new file mode 100644 index 0000000..3f115d7 --- /dev/null +++ b/public/ibsppack.h @@ -0,0 +1,48 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef IBSPPACK_H +#define IBSPPACK_H +#ifdef _WIN32 +#pragma once +#endif + +#include "interface.h" +#include "utlvector.h" +#include "utlstring.h" + +class IFileSystem; + +abstract_class IBSPPack +{ +public: + virtual void LoadBSPFile( IFileSystem *pFileSystem, char *filename ) = 0; + virtual void WriteBSPFile( char *filename ) = 0; + virtual void ClearPackFile( void ) = 0; + virtual void AddFileToPack( const char *relativename, const char *fullpath ) = 0; + virtual void AddBufferToPack( const char *relativename, void *data, int length, bool bTextMode ) = 0; + virtual void SetHDRMode( bool bHDR ) = 0; + virtual bool SwapBSPFile( IFileSystem *pFileSystem, const char *filename, const char *swapFilename, bool bSwapOnLoad, VTFConvertFunc_t pVTFConvertFunc, VHVFixupFunc_t pVHVFixupFunc, CompressFunc_t pCompressFunc ) = 0; + + enum eRepackBSPFlags + { + eRepackBSP_CompressLumps = 1 << 0, + eRepackBSP_CompressPackfile = 1 << 1 + }; + virtual bool RepackBSP( CUtlBuffer &inputBuffer, CUtlBuffer &outputBuffer, eRepackBSPFlags repackFlags ) = 0; + + // used to get/set the pak file from a BSP + virtual bool GetPakFileLump( IFileSystem *pFileSystem, const char *pBSPFilename, void **pPakData, int *pPakSize ) = 0; + virtual bool SetPakFileLump( IFileSystem *pFileSystem, const char *pBSPFilename, const char *pNewFilename, void *pPakData, int pakSize ) = 0; + + // populates list of files that bsp owns, i.e. world/cubmap materials, statis props, etc + virtual bool GetBSPDependants( IFileSystem *pFileSystem, const char *pBSPFilename, CUtlVector< CUtlString > *pList ) = 0; +}; + +#define IBSPPACK_VERSION_STRING "IBSPPACK004" + +#endif // IBSPPACK_H |