File: MapFeaturesH3M.h

package info (click to toggle)
vcmi 1.6.5%2Bdfsg-2
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid, trixie
  • size: 32,060 kB
  • sloc: cpp: 238,971; python: 265; sh: 224; xml: 157; ansic: 78; objc: 61; makefile: 49
file content (75 lines) | stat: -rw-r--r-- 1,728 bytes parent folder | download
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
69
70
71
72
73
74
75
/*
 * MapFeaturesH3M.h, part of VCMI engine
 *
 * Authors: listed in file AUTHORS in main folder
 *
 * License: GNU General Public License v2.0 or later
 * Full text of license available in license.txt file, in main folder
 *
 */

#pragma once

VCMI_LIB_NAMESPACE_BEGIN

enum class EMapFormat : uint8_t;

struct MapFormatFeaturesH3M
{
public:
	static MapFormatFeaturesH3M find(EMapFormat format, uint32_t hotaVersion);
	static MapFormatFeaturesH3M getFeaturesROE();
	static MapFormatFeaturesH3M getFeaturesAB();
	static MapFormatFeaturesH3M getFeaturesSOD();
	static MapFormatFeaturesH3M getFeaturesCHR();
	static MapFormatFeaturesH3M getFeaturesWOG();
	static MapFormatFeaturesH3M getFeaturesHOTA(uint32_t hotaVersion);

	MapFormatFeaturesH3M() = default;

	// number of bytes in bitmask of appropriate type

	int factionsBytes;
	int heroesBytes;
	int artifactsBytes;
	int resourcesBytes;
	int skillsBytes;
	int spellsBytes;
	int buildingsBytes;

	// total number of elements of appropriate type

	int factionsCount;
	int heroesCount;
	int heroesPortraitsCount;
	int artifactsCount;
	int resourcesCount;
	int creaturesCount;
	int spellsCount;
	int skillsCount;
	int terrainsCount;
	int roadsCount;
	int riversCount;
	int artifactSlotsCount;
	int buildingsCount;

	// identifier that should be treated as "invalid", usually - '-1'

	int heroIdentifierInvalid;
	int artifactIdentifierInvalid;
	int creatureIdentifierInvalid;
	int spellIdentifierInvalid;

	// features from which map format are available

	bool levelROE = false;
	bool levelAB = false;
	bool levelSOD = false;
	bool levelCHR = false;
	bool levelWOG = false;
	bool levelHOTA0 = false;
	bool levelHOTA1 = false;
	bool levelHOTA3 = false;
};

VCMI_LIB_NAMESPACE_END