-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCBAS_Config.h
78 lines (53 loc) · 1.2 KB
/
CBAS_Config.h
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
76
77
78
#include "GameObjects.h"
#include "inih/INIReader.h"
namespace CBAS_Config
{
static enum IniValTypes {
CBAS_iniFloat,
CBAS_iniBool,
CBAS_iniInt
};
static enum IniHeadings
{
CBAS_Meta,
CBAS_Components,
CBAS_Settings,
CBAS_EndHeadings
};
enum IniEntries
{
CBAS_Enabled,
CBAS_Creatures,
CBAS_Staves,
CBAS_Hands,
CBAS_Bows,
CBAS_FatigueComponent,
CBAS_EncumbranceComponent,
CBAS_SkillComponent,
CBAS_AttributeComponent,
CBAS_AlacrityComponent,
CBAS_FinalMult,
CBAS_LowMult,
//CBAS_Alacrity_SpeedAgi,
CBAS_FatigueThreshold,
CBAS_LocalisedEncumbrance,
CBAS_EndEntries
};
struct IniEntry {
const char* name;
const char* header;
float value;
IniValTypes type;
IniEntry(const char* h,const char* n, float v, IniValTypes t = CBAS_iniFloat);
};
class IniHandler {
bool bUseAllComponents;
void SetUseAllComponents();
public:
IniHandler();
float operator() (UInt32 iniEntryIndex);
bool operator()();
float LowMult; //used in PRSNK_FACTOR, lowest value of max attack speed is this ratio
float LowComplement; //used in PRSNK_FACTOR, accounts for the weird relationship between the two constants in the formula (see constructor)
};
} //end namespace