summaryrefslogtreecommitdiff
path: root/game/client/bsp_utils.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/client/bsp_utils.h
downloadarchived-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.h21
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 ) );