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/lumpfiles.cpp | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'public/lumpfiles.cpp')
| -rw-r--r-- | public/lumpfiles.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/public/lumpfiles.cpp b/public/lumpfiles.cpp new file mode 100644 index 0000000..eb11e78 --- /dev/null +++ b/public/lumpfiles.cpp @@ -0,0 +1,27 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//============================================================================= + +#include "bspfile.h" +#include "strtools.h" +#include "filesystem.h" +#include "lumpfiles.h" + +// memdbgon must be the last include file in a .cpp file!!! +#include "tier0/memdbgon.h" + +//----------------------------------------------------------------------------- +// Purpose: Generate a lump file name for a given bsp & index +// Input : *bspfilename - +// *lumpfilename - +// iIndex - +//----------------------------------------------------------------------------- +void GenerateLumpFileName( const char *bspfilename, char *lumpfilename, int iBufferSize, int iIndex ) +{ + char lumppre[MAX_PATH]; + V_StripExtension( bspfilename, lumppre, MAX_PATH ); + Q_snprintf( lumpfilename, iBufferSize, "%s_l_%d.lmp", lumppre, iIndex ); +} + |