Team Fortress 2 Source Code as on 22/4/2020
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.

27 lines
903 B

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #include "bspfile.h"
  7. #include "strtools.h"
  8. #include "filesystem.h"
  9. #include "lumpfiles.h"
  10. // memdbgon must be the last include file in a .cpp file!!!
  11. #include "tier0/memdbgon.h"
  12. //-----------------------------------------------------------------------------
  13. // Purpose: Generate a lump file name for a given bsp & index
  14. // Input : *bspfilename -
  15. // *lumpfilename -
  16. // iIndex -
  17. //-----------------------------------------------------------------------------
  18. void GenerateLumpFileName( const char *bspfilename, char *lumpfilename, int iBufferSize, int iIndex )
  19. {
  20. char lumppre[MAX_PATH];
  21. V_StripExtension( bspfilename, lumppre, MAX_PATH );
  22. Q_snprintf( lumpfilename, iBufferSize, "%s_l_%d.lmp", lumppre, iIndex );
  23. }