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 /game/client/bsp_utils.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/client/bsp_utils.h')
| -rw-r--r-- | game/client/bsp_utils.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/game/client/bsp_utils.h b/game/client/bsp_utils.h new file mode 100644 index 0000000..1cdfaf5 --- /dev/null +++ b/game/client/bsp_utils.h @@ -0,0 +1,21 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: Exposes bsp tools to game for e.g. workshop use +// +// $NoKeywords: $ +//===========================================================================// + +#include "../utils/common/bsplib.h" +#include "ibsppack.h" + +// Loads bsppack module (IBSPPack) and calls RepackBSP() +bool BSP_SyncRepack( const char *pszInputMapFile, + const char *pszOutputMapFile, + IBSPPack::eRepackBSPFlags eRepackFlags = (IBSPPack::eRepackBSPFlags) ( IBSPPack::eRepackBSP_CompressLumps | + IBSPPack::eRepackBSP_CompressPackfile ) ); + +// Helper to spawn a background thread that runs SyncRepack +void BSP_BackgroundRepack( const char *pszInputMapFile, + const char *pszOutputMapFile, + IBSPPack::eRepackBSPFlags eRepackFlags = (IBSPPack::eRepackBSPFlags) ( IBSPPack::eRepackBSP_CompressLumps | + IBSPPack::eRepackBSP_CompressPackfile ) ); |