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.

68 lines
1.5 KiB

  1. //========= Copyright � 1996-2005, 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. const char *GetFallbackDir();
  40. bool UseGameLogo();
  41. KeyValues *GetHiddenMaps();
  42. private:
  43. wchar_t m_wcsGameTitle[128];
  44. wchar_t m_wcsGameTitle2[128];
  45. KeyValues *m_pModData;
  46. // Deleted copy operations (rule of 3!)
  47. CModInfo( const CModInfo& ); // = delete
  48. CModInfo& operator= ( const CModInfo& ); // = delete
  49. };
  50. // singleton accessor
  51. extern CModInfo &ModInfo();
  52. #endif // MODINFO_H