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 /gameui/ModInfo.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'gameui/ModInfo.h')
| -rw-r--r-- | gameui/ModInfo.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/gameui/ModInfo.h b/gameui/ModInfo.h new file mode 100644 index 0000000..c2d71e1 --- /dev/null +++ b/gameui/ModInfo.h @@ -0,0 +1,68 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef MODINFO_H +#define MODINFO_H +#ifdef _WIN32 +#pragma once +#endif + +#include <vgui/VGUI.h> + +class KeyValues; + +//----------------------------------------------------------------------------- +// Purpose: contains all the data entered about a mod in gameinfo.txt +//----------------------------------------------------------------------------- +class CModInfo +{ +public: + CModInfo(); + ~CModInfo(); + void FreeModInfo(); + + // loads mod info from gameinfo.txt + void LoadCurrentGameInfo(); + + // loads gameinfo from null-terminated string + void LoadGameInfoFromBuffer( const char *buffer ); + + // data accessors + const wchar_t *GetGameTitle(); + const wchar_t *GetGameTitle2(); + const char *GetGameName(); + + bool IsMultiplayerOnly(); + bool IsSinglePlayerOnly(); + + bool HasPortals(); + + bool NoDifficulty(); + bool NoModels(); + bool NoHiModel(); + bool NoCrosshair(); + bool AdvCrosshair(); + int AdvCrosshairLevel(); + const char *GetFallbackDir(); + bool UseGameLogo(); + bool UseBots(); + bool HasHDContent(); + bool SupportsVR(); + + KeyValues *GetHiddenMaps(); + +private: + wchar_t m_wcsGameTitle[128]; + wchar_t m_wcsGameTitle2[128]; + KeyValues *m_pModData; +}; + + +// singleton accessor +extern CModInfo &ModInfo(); + +#endif // MODINFO_H |