summaryrefslogtreecommitdiff
path: root/gameui/ModInfo.h
blob: c2d71e168b30ee2d28c9ecd69cb23cea3c1d95a1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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