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.

68 lines
1.4 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef MODINFO_H
  8. #define MODINFO_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include <vgui/VGUI.h>
  13. class KeyValues;
  14. //-----------------------------------------------------------------------------
  15. // Purpose: contains all the data entered about a mod in gameinfo.txt
  16. //-----------------------------------------------------------------------------
  17. class CModInfo
  18. {
  19. public:
  20. CModInfo();
  21. ~CModInfo();
  22. void FreeModInfo();
  23. // loads mod info from gameinfo.txt
  24. void LoadCurrentGameInfo();
  25. // loads gameinfo from null-terminated string
  26. void LoadGameInfoFromBuffer( const char *buffer );
  27. // data accessors
  28. const wchar_t *GetGameTitle();
  29. const wchar_t *GetGameTitle2();
  30. const char *GetGameName();
  31. bool IsMultiplayerOnly();
  32. bool IsSinglePlayerOnly();
  33. bool HasPortals();
  34. bool NoDifficulty();
  35. bool NoModels();
  36. bool NoHiModel();
  37. bool NoCrosshair();
  38. bool AdvCrosshair();
  39. int AdvCrosshairLevel();
  40. const char *GetFallbackDir();
  41. bool UseGameLogo();
  42. bool UseBots();
  43. bool HasHDContent();
  44. bool SupportsVR();
  45. KeyValues *GetHiddenMaps();
  46. private:
  47. wchar_t m_wcsGameTitle[128];
  48. wchar_t m_wcsGameTitle2[128];
  49. KeyValues *m_pModData;
  50. };
  51. // singleton accessor
  52. extern CModInfo &ModInfo();
  53. #endif // MODINFO_H