Counter Strike : Global Offensive Source Code
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.

60 lines
2.1 KiB

  1. //===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //===========================================================================//
  7. #ifndef FILESYSTEM_TOOLS_H
  8. #define FILESYSTEM_TOOLS_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "filesystem.h"
  13. #include "filesystem_init.h"
  14. // This is the the path of the initial source file
  15. extern char qdir[1024];
  16. // This is the base engine + mod-specific game dir (e.g. "d:\tf2\mytfmod\")
  17. extern char gamedir[1024];
  18. // ---------------------------------------------------------------------------------------- //
  19. // Filesystem initialization.
  20. // ---------------------------------------------------------------------------------------- //
  21. enum FSInitType_t
  22. {
  23. FS_INIT_FULL, // Load gameinfo.txt, maybe use filesystem_steam, and setup search paths.
  24. FS_INIT_COMPATIBILITY_MODE // Load filesystem_stdio and that's it.
  25. };
  26. //
  27. // Initializes qdir, and gamedir. Also initializes the VMPI filesystem if MPI is defined.
  28. //
  29. // pFilename can be NULL if you want to rely on vproject and qproject. If it's specified, FileSystem_Init
  30. // will go up directories from pFilename looking for gameinfo.txt (if vproject isn't specified).
  31. //
  32. // If bOnlyUseFilename is true, then it won't use any alternative methods of finding the vproject dir
  33. // (ie: it won't use -game or -vproject or the vproject env var or qproject).
  34. //
  35. bool FileSystem_Init( const char *pFilename, int maxMemoryUsage=0, FSInitType_t initType=FS_INIT_FULL, bool bOnlyUseFilename=false );
  36. void FileSystem_Term();
  37. bool FileSystem_SetGame( const char *szModDir );
  38. // Used to connect app-framework based console apps to the filesystem tools
  39. void FileSystem_SetupStandardDirectories( const char *pFilename, const char *pGameInfoPath );
  40. CreateInterfaceFn FileSystem_GetFactory( void );
  41. extern IBaseFileSystem *g_pFileSystem;
  42. DECLARE_TIER2_INTERFACE( IFileSystem, g_pFullFileSystem ); // NOTE: this is here when VMPI is being used, but a VMPI app can
  43. // ONLY use LoadModule/UnloadModule.
  44. #endif // FILESYSTEM_TOOLS_H